Skip to main content

Sales Navigator

nvFetchCompany

This method allows you to retrieve various data about a company from Sales Navigator: basic information, employees, and decision makers.


try {
  const workflowId = await linkedapi.nvFetchCompany.execute({
    companyHashedUrl: "https://www.linkedin.com/company/12345678",
    retrieveEmployees: true,
    retrieveDMs: true,
    employeesRetrievalConfig: {
      limit: 25,
      filter: {
        firstName: "John",
        lastName: "Smith",
        positions: ["engineer", "manager"],
        locations: ["United States", "Canada"],
        industries: ["Software Development"],
        schools: ["Stanford University", "MIT"],
        yearsOfExperiences: ["threeToFive", "sixToTen"]
      }
    },
    dmsRetrievalConfig: {
      limit: 5
    }
  });
  
  const { data, errors } = await linkedapi.nvFetchCompany.result(workflowId);
  
  // The list of possible execution errors is below
  if (errors && errors.length > 0) {
    console.warn('Workflow completed with execution errors:');
    errors.forEach(error => {
      console.warn(` - Type: ${error.type}, Message: ${error.message}`);
    });
  }
  
  // The structure of the 'data' object is below
  if (data) {
    console.log('Company name:', data.name);
    console.log('Description:', data.description);
    console.log('Location:', data.location);
    console.log('Industry:', data.industry);
    console.log('Employee count:', data.employeeCount);
    console.log('Employees:', data.employees);
    console.log('Decision makers:', data.dms);
    console.log('Workflow completed successfully. Data:', data);
  }
} catch (e) {
  // A list of all critical errors can be found here:
  // https://linkedapi.io/sdks/handling-results-and-errors/#handling-critical-errors
  if (e instanceof LinkedApiError) {
    console.error(`Critical Error - Type: ${e.type}, Message: ${e.message}`);
  } else {
    console.error('An unexpected, non-API error occurred:', e);
  }
}

# Python SDK is coming soon!
#
# You can always use Linked API through HTTP
# https://linkedapi.io/docs/

// Go SDK is coming soon!
//
// You can always use Linked API through HTTP
// https://linkedapi.io/docs/

Params

  • companyHashedUrlhashedLinkedIn URL of the company.
  • retrieveEmployees (optional) – when set to true, includes company employees with their profiles in the results.
  • retrieveDMs (optional) – when set to true, includes decision makers and key personnel in the results.
  • employeesRetrievalConfig (optional) – configuration for retrieving employees. Available only if retrieveEmployees is true.
    • limit – (optional) maximum number of employees to retrieve. Defaults to 500, with a maximum value of 500.
    • filter (optional) – object that specifies filtering criteria for employees. When multiple filter fields are specified, they are combined using AND logic.
      • firstName (optional) – first name of employee.
      • lastName (optional) – last name of employee.
      • positions (optional) – array of job position names. Matches if employee's current position is any of the listed options.
      • locations (optional) – array of free-form strings representing locations. Matches if employee is located in any of the listed locations.
      • industries (optional) – array of enums representing industries. Matches if employee works in any of the listed industries. Takes specific values available in the LinkedIn interface.
      • schools (optional) – array of institution names. Matches if employee currently attends or previously attended any of the listed institutions.
      • yearsOfExperiences (optional) – array of enums representing professional experience. Matches if employee’s experience falls within any of the listed ranges. Options:
        • lessThanOne – less than 1 year.
        • oneToTwo – 1 to 2 years.
        • threeToFive – 3 to 5 years.
        • sixToTen – 6 to 10 years.
        • moreThanTen – more than 10 years.
  • dmsRetrievalConfig (optional) – configuration for retrieving decision makers. Available only if retrieveDMs is true.
    • limit (optional) – number of decision makers to retrieve. Defaults to 20, with a maximum value of 20. If a company has fewer decision makers than specified, only the available ones will be returned.

Data

  • name – name of the company.
  • publicUrl – public LinkedIn URL of the company.
  • description – description of the company.
  • location – free-form string representing the company headquarters location.
  • headquarters – two-character country code (e.g., "US", "UK") representing headquarters location.
  • industry – enum representing the company industry. Takes specific values available in the LinkedIn interface.
  • website – company's official website URL.
  • employeeCount – total number of employees associated with the company.
  • yearFounded – year the company was established, if available.
  • employees – array of employee profiles (included only if retrieveEmployees is true).
    • name – full name of the employee.
    • publicUrlpublic LinkedIn URL of the employee.
    • headline – headline of the employee.
    • location – free-form string indicating the employee's location.
  • dms – array of decision makers (included only if retrieveDMs is true).
    • name – full name of the decision-maker.
    • hashedUrl – hashed LinkedIn URL of the decision-maker.
    • position – job position of the decision-maker.
    • location – free-form string indicating the decision-maker's location.
    • countryCode – two-character code of the decision-maker's country.

Errors

  • noSalesNavigator – your account does not have Sales Navigator subscription.
  • companyNotFound – provided URL is not an existing LinkedIn company.
  • retrievingNotAllowed – LinkedIn has blocked performing the retrieval due to exceeding limits or other restrictions.