searchJobs
This method allows you to search for jobs applying various filtering criteria.
typescript
try {
const workflow = await linkedapi.searchJobs.execute({
term: "product manager",
limit: 10,
filter: {
location: "San Francisco, California, United States",
datePosted: "pastWeek",
experienceLevels: ["midSeniorLevel", "director"],
employmentTypes: ["fullTime"],
workplaceTypes: ["remote", "hybrid"],
companies: ["Example Company"],
industries: ["Software Development"],
jobFunctions: ["Product Management"],
easyApply: true,
hasVerifications: true,
under10Applicants: false,
inYourNetwork: false,
fairChanceEmployer: false
},
customSearchUrl: "https://www.linkedin.com/jobs/search/?keywords=product%20manager"
});
const { data, errors } = await linkedapi.searchJobs.result(workflow.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);
}
}Params
term(optional) – keyword or phrase to search. If omitted, starts from a broad jobs search and applies the filters.limit(optional) – number of search results to return. Defaults to 10, with a maximum value of 1000.filter(optional) – object that specifies filtering criteria for jobs. When multiple filter fields are specified, they are combined usingANDlogic.location(optional) – free-form location string.datePosted(optional) – one ofanyTime,past24Hours,pastWeek,pastMonth.experienceLevels(optional) – array ofinternship,entryLevel,associate,midSeniorLevel,director,executive.employmentTypes(optional) – array offullTime,partTime,contract,temporary,volunteer,internship,other.workplaceTypes(optional) – array ofonSite,remote,hybrid.companies(optional) – array of company names.industries(optional) – array of industry names.jobFunctions(optional) – array of job function names.easyApply(optional) – whentrue, only jobs with Easy Apply.hasVerifications(optional) – whentrue, only jobs with verification signals.under10Applicants(optional) – whentrue, only jobs with fewer than 10 applicants.inYourNetwork(optional) – whentrue, only jobs from your network.fairChanceEmployer(optional) – whentrue, only fair chance employer jobs.
customSearchUrl(optional) – URL copied from a LinkedIn jobs search page after configuring filters. When specified, overridestermandfilter.
Data
Array of search results. Each result contains:
jobId– LinkedIn job identifier, when it can be extracted.jobUrl– LinkedIn job URL, whenjobIdcan be extracted.title– job title.companyName– company name, if available.location– free-form job location, if available.workplaceType– workplace type label as shown by LinkedIn, if available.salary– parsed salary range, if LinkedIn shows one.currency– lowercase currency code, such asusd,eur, orgbp.minAmount– minimum amount in the range.maxAmount– maximum amount in the range.period– one ofyearly,monthly,hourly.
easyApply– whether the card mentions Easy Apply.isPromoted– whether the card is promoted.
Errors
searchingNotAllowed– LinkedIn has blocked performing the search due to exceeding limits or other restrictions.