# st.searchJobs

> The API Reference is also the SDK and CLI reference. Consecutive code fences marked `tab=HTTP`, `tab=Node`, `tab=Python` and `tab=CLI` are the same call on each surface (a fence marked `tab=HTTP,CLI` is the same text for both), and a block between `:::surface <names>` and `:::` applies only to the surfaces it names. Identifiers in the text are written as in Node and in HTTP JSON (camelCase); the Python SDK spells methods, parameters and result attributes in snake_case (`sendMessage` → `send_message`, `reconnectionLink` → `reconnection_link`), while names inside HTTP JSON stay camelCase.

This action allows you to search for jobs applying various filtering criteria.

:::surface node,python
In the SDK this is the `searchJobs` method. It takes the parameters below except `label` and `then`, which exist only in workflow JSON, and returns the result below in `data`.
:::

:::surface cli
In the CLI this is `linkedin jobs search` – the command is below, under [Parameters](#parameters).
:::

## Constraints

> ⏺️ **Root Start:** allowed.

> ⬆️ **Parent Actions:** N/A.

> ⬇️ **Child Actions:** [st.doForJobs](/docs/action-st-do-for-jobs).

## Parameters

```json tab=HTTP
{
  "actionType": "st.searchJobs",
  "label": "productManagerSearch1",
  "term": "product manager",
  "limit": 2,
  "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
  },
  "customSearchUrl": "https://www.linkedin.com/jobs/search/?keywords=product%20manager"
}
```

```typescript tab=Node
const workflow = await linkedapi.searchJobs.execute({
  term: "product manager",
  limit: 2,
  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
  },
  customSearchUrl: "https://www.linkedin.com/jobs/search/?keywords=product%20manager"
});

const { data, errors } = await linkedapi.searchJobs.result(workflow.workflowId);
```

```python tab=Python
from linkedapi import SearchJobsParams

workflow = linkedapi.search_jobs.execute(
    SearchJobsParams(
        term="product manager",
        limit=2,
        location="San Francisco, California, United States",
        allow_similar_results=True,
        filter={
            "date_posted": "pastWeek",
            "experience_levels": ["midSeniorLevel", "director"],
            "employment_types": ["fullTime"],
            "workplace_types": ["remote", "hybrid"],
            "companies": ["Example Company"],
            "industries": ["Software Development"],
            "job_functions": ["Product Management"],
            "easy_apply": True,
            "has_verifications": True,
        },
        custom_search_url="https://www.linkedin.com/jobs/search/?keywords=product%20manager",
    )
)

result = linkedapi.search_jobs.result(workflow.workflow_id)
```

```bash tab=CLI
# Not available in the CLI: customSearchUrl
linkedin jobs search \
  --term "product manager" \
  --limit 2 \
  --location "San Francisco, California, United States" \
  --date-posted pastWeek \
  --experience-levels midSeniorLevel,director \
  --employment-types fullTime \
  --workplace-types remote,hybrid \
  --companies "Example Company" \
  --industries "Software Development" \
  --job-functions "Product Management" \
  --easy-apply \
  --has-verifications
```

In AI assistants, the MCP server runs this action as the `search_jobs` tool.

:::surface cli
In the CLI this is `linkedin jobs search`:

```bash
linkedin jobs search [flags]
```

| Flag | Type | Description |
| --- | --- | --- |
| `--term` | string | Search keyword or phrase |
| `--limit` | integer | Max results to return |
| `--location` | string | Location, applied on both versions of LinkedIn jobs search |
| `--exclude-similar-results` | boolean | Exclude near matches, which only the AI-powered search returns |
| `--date-posted` | string | One of `anyTime`, `past24Hours`, `pastWeek`, `pastMonth` |
| `--experience-levels` | string | Comma-separated: `internship`, `entryLevel`, `associate`, `midSeniorLevel`, `director`, `executive` |
| `--employment-types` | string | Comma-separated: `fullTime`, `partTime`, `contract`, `temporary`, `volunteer`, `internship`, `other` |
| `--workplace-types` | string | Comma-separated: `onSite`, `remote`, `hybrid` |
| `--companies` | string | Comma-separated company names |
| `--industries` | string | Comma-separated industries |
| `--job-functions` | string | Comma-separated job functions |
| `--easy-apply` | boolean | Only jobs with Easy Apply |
| `--has-verifications` | boolean | Only jobs with verification signals |
| `--under-10-applicants` | boolean | Only jobs with fewer than 10 applicants |
| `--in-your-network` | boolean | Only jobs from your network |
| `--fair-chance-employer` | boolean | Only fair chance employer jobs |

```bash
linkedin jobs search --term "product manager" --location "San Francisco" --limit 20
linkedin jobs search --term "engineer" --workplace-types "remote,hybrid" --easy-apply --json
```

**AI-powered search**

LinkedIn is rolling out an AI-powered jobs search alongside the classic one, and the two do not offer the same refinements. The flags above target the classic version. To target the AI-powered one, use the `--pref-*` flags instead:

| Flag | Type | Description |
| --- | --- | --- |
| `--pref-date-posted` | string | One of `anyTime`, `past24Hours`, `pastWeek`, `pastMonth` |
| `--pref-experience-levels` | string | Comma-separated: `entryLevel`, `senior`, `manager`, `director`, `executive` |
| `--pref-employment-types` | string | Comma-separated: `fullTime`, `partTime`, `contract`, `internship`, `volunteer` |
| `--pref-companies` | string | Comma-separated company names |
| `--pref-remote` | boolean | Only remote jobs |
| `--pref-easy-apply` | boolean | Only jobs with Easy Apply |
| `--pref-under-10-applicants` | boolean | Only jobs with fewer than 10 applicants |
| `--pref-in-your-network` | boolean | Only jobs from your network |
| `--pref-keywords` | string | Comma-separated skills, technologies, or topics, such as `AWS` or `Fintech` |


The `--pref-*` flags cannot be combined with the classic filter flags. Which version an account has is decided by LinkedIn and can change over time, so a search whose criteria the account's version cannot apply fails with `searchInterfaceMismatch`. See [two versions of LinkedIn jobs search](/docs/searching-for-jobs).
:::

- `label` (optional) – custom label for tracking this action in workflow completion.
- `term` (optional) – keyword or phrase to search, from 1 to 200 characters. If omitted, Linked API starts from a broad jobs search and applies the provided criteria.
- `limit` (optional) – number of search results to return. Defaults to **10**, with a maximum value of **1000**.
- `location` (optional) – free-form location string selected through LinkedIn jobs location search. Applied on both [versions of LinkedIn jobs search](/docs/searching-for-jobs).
- `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) – object that specifies 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) – enum with possible values:
    - `anyTime`.
    - `past24Hours`.
    - `pastWeek`.
    - `pastMonth`.
  - `experienceLevels` (optional) – array of enums with possible values:
    - `internship`.
    - `entryLevel`.
    - `associate`.
    - `midSeniorLevel`.
    - `director`.
    - `executive`.
  - `employmentTypes` (optional) – array of enums with possible values:
    - `fullTime`.
    - `partTime`.
    - `contract`.
    - `temporary`.
    - `volunteer`.
    - `internship`.
    - `other`.
  - `workplaceTypes` (optional) – array of enums with possible values:
    - `onSite`.
    - `remote`.
    - `hybrid`.
  - `companies` (optional) – array of company names selected through LinkedIn jobs company search.
  - `industries` (optional) – array of industry names selected through LinkedIn jobs industry search.
  - `jobFunctions` (optional) – array of job function names selected through LinkedIn jobs job-function search.
  - `easyApply` (optional) – when `true`, filters to jobs with Easy Apply.
  - `hasVerifications` (optional) – when `true`, filters to jobs with verification signals.
  - `under10Applicants` (optional) – when `true`, filters to jobs with fewer than 10 applicants.
  - `inYourNetwork` (optional) – when `true`, filters to jobs from your network.
  - `fairChanceEmployer` (optional) – when `true`, filters to fair chance employer jobs.
- `preferences` (optional) – object that specifies 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) – enum with possible values:
    - `anyTime`.
    - `past24Hours`.
    - `pastWeek`.
    - `pastMonth`.
  - `experienceLevels` (optional) – array of enums with possible values, where `senior` corresponds to `midSeniorLevel` in `filter`:
    - `entryLevel`.
    - `senior`.
    - `manager`.
    - `director`.
    - `executive`.
  - `employmentTypes` (optional) – array of enums with possible values:
    - `fullTime`.
    - `partTime`.
    - `contract`.
    - `internship`.
    - `volunteer`.
  - `companies` (optional) – array of company names selected through LinkedIn jobs company search.
  - `remote` (optional) – when `true`, filters to remote jobs. The AI-powered search has no on-site or hybrid equivalent.
  - `easyApply` (optional) – when `true`, filters to jobs with Easy Apply.
  - `under10Applicants` (optional) – when `true`, filters to jobs with fewer than 10 applicants.
  - `inYourNetwork` (optional) – when `true`, filters to 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 desired filters. When specified, it overrides `term`, `location`, `filter`, and `preferences`. The URL has to come from the same version of LinkedIn jobs search as the account has, otherwise the action fails with `searchInterfaceMismatch`.
- `then` (optional) – object or array of child actions to be executed within this action.

> `filter` and `preferences` are mutually exclusive, and sending both is rejected when the workflow is submitted. See [two versions of LinkedIn jobs search](/docs/searching-for-jobs) to learn which one to send.

## Result options

1. **Successful search:**

```json
{
  "actionType": "st.searchJobs",
  "label": "productManagerSearch1",
  "success": true,
  "data": [
    {
      "jobId": "4416248954",
      "urn": "urn:li:jobPosting:4416248954",
      "jobUrl": "https://www.linkedin.com/jobs/view/4416248954/",
      "title": "Senior Product Manager",
      "companyName": "Example Company",
      "location": "San Francisco, CA",
      "workplaceType": "remote",
      "salary": {
        "currency": "usd",
        "minAmount": 140000,
        "maxAmount": 180000,
        "period": "yearly"
      },
      "easyApply": true,
      "isPromoted": false,
      "isSimilarMatch": false,
      "then": { ... }
    }
  ]
}
```

- `label` – included only if specified in the action parameters.
- `data` – array of search outputs with results of child actions execution.
  - `jobId` – LinkedIn job identifier, when it can be extracted.
  - `urn` – [URN](/docs/data-conventions#linkedin-urns) 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 (such as `remote`, `hybrid`, or `on-site`), if available. Not one of the `workplaceTypes` filter values.
  - `salary` – parsed salary range, if LinkedIn shows one.
    - `currency` – lowercase currency code, such as `usd`, `eur`, or `gbp`.
    - `minAmount` – minimum amount in the parsed range.
    - `maxAmount` – maximum amount in the parsed range.
    - `period` – salary period. Possible values are `yearly`, `monthly`, and `hourly`.
  - `easyApply` – boolean indicating whether the search card mentions Easy Apply.
  - `isPromoted` – boolean indicating whether the search card is promoted.
  - `isSimilarMatch` – boolean indicating whether LinkedIn returned the job as a near match rather than an exact one. Always `false` on the classic LinkedIn jobs search.
  - `then` – results of child actions execution.

2. **Failed search:**

```json
{
  "actionType": "st.searchJobs",
  "label": "productManagerSearch1",
  "success": false,
  "error": {
    "type": "searchingNotAllowed",
    "message": "LinkedIn has blocked performing the search."
  }
}
```

- `label` – included only if specified in the action parameters.
- `error.type` – enum with the following possible values:
  - `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.
