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 filter for the classic version or preferences for 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 to false, 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 than limit. 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 using AND logic.
    • location (optional) – use the top-level location instead. Still accepted here, but the top-level value takes precedence.
    • datePosted (optional) – one of anyTime, past24Hours, pastWeek, pastMonth.
    • experienceLevels (optional) – array of internship, entryLevel, associate, midSeniorLevel, director, executive.
    • employmentTypes (optional) – array of fullTime, partTime, contract, temporary, volunteer, internship, other.
    • workplaceTypes (optional) – array of onSite, remote, hybrid.
    • companies (optional) – array of company names.
    • industries (optional) – array of industry names.
    • jobFunctions (optional) – array of job function names.
    • easyApply (optional) – when true, only jobs with Easy Apply.
    • hasVerifications (optional) – when true, only jobs with verification signals.
    • under10Applicants (optional) – when true, only jobs with fewer than 10 applicants.
    • inYourNetwork (optional) – when true, only jobs from your network.
    • fairChanceEmployer (optional) – when true, 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 using AND logic.
    • datePosted (optional) – one of anyTime, past24Hours, pastWeek, pastMonth.
    • experienceLevels (optional) – array of entryLevel, senior, manager, director, executive, where senior corresponds to midSeniorLevel in filter.
    • employmentTypes (optional) – array of fullTime, partTime, contract, internship, volunteer.
    • companies (optional) – array of company names.
    • remote (optional) – when true, only remote jobs. The AI-powered search has no on-site or hybrid equivalent.
    • easyApply (optional) – when true, only jobs with Easy Apply.
    • under10Applicants (optional) – when true, only jobs with fewer than 10 applicants.
    • inYourNetwork (optional) – when true, only jobs from your network.
    • keywords (optional) – array of free-form skills, technologies, or topics to narrow the search by, such as AWS or Fintech. LinkedIn suggests a different set for every search.
  • customSearchUrl (optional) – URL copied from a LinkedIn jobs search page after configuring filters. When specified, overrides term, location, filter, and preferences. 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.
  • urnURN of the job posting, when jobId can be extracted.
  • jobUrl – LinkedIn job URL, when jobId can 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 as usd, eur, or gbp.
    • minAmount – minimum amount in the range.
    • maxAmount – maximum amount in the range.
    • period – one of yearly, 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. Always false on 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"]
  }
});