Skip to main content

Standard Interface

searchCompanies

This method allows you to search for companies applying various filtering criteria.


try {
  const workflowId = await linkedapi.searchCompanies.execute({
    term: "Technology",
    limit: 10,
    filter: {
      sizes: ["51-200", "201-500"] as TSearchCompanySize[],
      locations: ["San Francisco", "New York"],
      industries: ["Software Development", "Information Technology"]
    }
  });
  
  const { data, errors } = await linkedapi.searchCompanies.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('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

  • term (optional) – keyword or phrase to search.
  • limit (optional) – number of search results to return. Defaults to 10, with a maximum value of 100.
  • filter (optional) – object that specifies filtering criteria for companies. When multiple filter fields are specified, they are combined using AND logic.
    • sizes (optional) – array of enums representing employee count ranges. Matches if company’s size falls within any of the listed ranges. Options:
      • 1-10.
      • 11-50.
      • 51-200
      • 201-500.
      • 501-1000.
      • 1001-5000.
      • 5001-10000.
      • 10001+.
    • locations (optional) – array of free-form strings representing locations. Matches if company is headquartered in any of the listed locations.
    • industries (optional) – array of enums representing industries. Matches if company operates in any of the listed industries. Takes specific values available in the LinkedIn interface.

Data

Array of search results. Each search result contains:

  • name – name of the company.
  • publicUrl – public LinkedIn URL of the company.
  • industry – enum representing the company industry. Takes specific values available in the LinkedIn interface.
  • location – free-form string representing the company headquarters location.

Errors

  • searchingNotAllowed – LinkedIn has blocked performing the search due to exceeding limits or other restrictions.