searchJobs
This method allows you to search for jobs applying various filtering criteria.
LinkedIn is rolling out an AI-powered jobs search alongside the classic one, and the two do not offer the same refinements. Pass
filterfor the classic version orpreferencesfor the AI-powered one, never both. See two versions of LinkedIn jobs search.
typescript
try {
const workflow = await linkedapi.searchJobs.execute({
term: "product manager",
limit: 10,
location: "San Francisco, California, United States",
allowSimilarResults: true,
filter: {
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 criteria.limit(optional) – number of search results to return. Defaults to 10, with a maximum value of 1000.location(optional) – free-form location string. Applied on both versions of LinkedIn jobs search.allowSimilarResults(optional) – defaults to true. When set tofalse, near matches are excluded from the results, and since LinkedIn places them after the exact ones, the search stops at the first near match and may return fewer results thanlimit. Only relevant to the AI-powered LinkedIn jobs search.filter(optional) – filtering criteria for the classic LinkedIn jobs search. Every specified field is applied, or the action fails. When multiple filter fields are specified, they are combined usingANDlogic.location(optional) – use the top-levellocationinstead. Still accepted here, but the top-level value takes precedence.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.
preferences(optional) – filtering criteria for the AI-powered LinkedIn jobs search. LinkedIn decides which of them it offers for a given search, and the ones it does not offer are skipped instead of failing the action. When multiple preference fields are specified, they are combined usingANDlogic.datePosted(optional) – one ofanyTime,past24Hours,pastWeek,pastMonth.experienceLevels(optional) – array ofentryLevel,senior,manager,director,executive, whereseniorcorresponds tomidSeniorLevelinfilter.employmentTypes(optional) – array offullTime,partTime,contract,internship,volunteer.companies(optional) – array of company names.remote(optional) – whentrue, only remote jobs. The AI-powered search has no on-site or hybrid equivalent.easyApply(optional) – whentrue, only jobs with Easy Apply.under10Applicants(optional) – whentrue, only jobs with fewer than 10 applicants.inYourNetwork(optional) – whentrue, only jobs from your network.keywords(optional) – array of free-form skills, technologies, or topics to narrow the search by, such asAWSorFintech. LinkedIn suggests a different set for every search.
customSearchUrl(optional) – URL copied from a LinkedIn jobs search page after configuring filters. When specified, overridesterm,location,filter, andpreferences. The URL has to come from the same version of LinkedIn jobs search as the account has.
Data
Array of search results. Each result contains:
jobId– LinkedIn job identifier, when it can be extracted.urn– URN of the job posting, whenjobIdcan 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.isSimilarMatch– whether LinkedIn returned the job as a near match rather than an exact one. Alwaysfalseon the classic LinkedIn jobs search.
Errors
searchInterfaceMismatch– the version of LinkedIn jobs search the account has cannot apply the criteria that were sent. Criteria that exist in only one of the two objects are the usual cause. Which version an account has is decided by LinkedIn and can change over time, so handle this as a normal condition rather than as a permanent setting.searchingNotAllowed– LinkedIn has blocked performing the search due to exceeding limits or other restrictions.
Searching on the AI-powered version
The AI-powered version offers fewer refinements than the classic one, plus free-form keywords that LinkedIn suggests per search. It also decides how strictly to match: when it finds few exact matches, it appends near matches below them, and those come back with isSimilarMatch set to true.
typescript
const workflow = await linkedapi.searchJobs.execute({
term: "product manager",
limit: 10,
location: "San Francisco, California, United States",
allowSimilarResults: false,
preferences: {
datePosted: "pastWeek",
experienceLevels: ["senior", "director"],
employmentTypes: ["fullTime"],
remote: true,
keywords: ["Fintech"]
}
});