nvSearchCompanies
This method allows you to search for companies in Sales Navigator applying various filtering criteria.
try {
const workflowId = await linkedapi.nvSearchCompanies.execute({
term: "TechCorp",
limit: 10,
filter: {
sizes: ["51-200", "201-500"] as TSearchCompanySize[],
locations: ["San Francisco", "New York"],
industries: ["Software Development", "Technology"],
annualRevenue: {
min: "10",
max: "100"
}
}
});
const { data, errors } = await linkedapi.nvSearchCompanies.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}`);
});
}
if (data) {
console.log('Search completed successfully.');
console.log('Found companies:', 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 for.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 usingAND
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.annualRevenue
(optional) – object representing company annual revenue range in million USD:min
– enum with options:0
.0.5
.1
.2.5
.5
.10
.20
.50
.100
.500
.1000
.
max
– enum with options:0.5
.1
.2.5
.5
.10
.20
.50
.100
.500
.1000
.1000+
.
Data
Array of search results. Each search result contains:
name
– name of the company.hashedUrl
– hashed LinkedIn URL of the company.industry
– enum representing the company industry. Takes specific values available in the LinkedIn interface.employeesCount
– total number of employees associated with the company.
Errors
noSalesNavigator
– your account does not have Sales Navigator subscription.searchingNotAllowed
– LinkedIn has blocked performing the search due to exceeding limits or other restrictions.