# st.retrieveCompanyJobs

> 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 retrieve the jobs a company has posted and perform additional job-related actions if needed.

:::surface node,python
In the SDK this action runs inside `fetchCompany` with `retrieveJobs` enabled; its result comes back in `data.jobs`, and its errors in `errors`.
:::

:::surface cli
In the CLI this action runs inside `linkedin company fetch` with `--jobs`; that command's other options are on [`st.openCompanyPage`](/docs/action-st-open-company-page).
:::

## Constraints

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

> ⬆️ **Parent Actions:** [st.openCompanyPage](/docs/action-st-open-company-page).

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

## Parameters

```json tab=HTTP
{
  "actionType": "st.retrieveCompanyJobs",
  "label": "company1Jobs",
  "limit": 25,
  "location": "United States",
  "includeSubsidiaries": false,
  "datePosted": "pastWeek",
  "then": { ... }
}
```

```typescript tab=Node
const workflow = await linkedapi.fetchCompany.execute({
  companyUrl: "https://www.linkedin.com/company/company1",
  retrieveJobs: true,
  jobsRetrievalConfig: {
    limit: 25,
    location: "United States",
    datePosted: "pastWeek"
  }
});

const { data, errors } = await linkedapi.fetchCompany.result(workflow.workflowId);
console.log(data?.jobs);
console.log(errors);
```

```python tab=Python
from linkedapi import FetchCompanyParams

workflow = linkedapi.fetch_company.execute(
    FetchCompanyParams(
        company_url="https://www.linkedin.com/company/company1",
        retrieve_jobs=True,
        jobs_retrieval_config={
            "limit": 25,
            "location": "United States",
            "date_posted": "pastWeek",
        },
    )
)

result = linkedapi.fetch_company.result(workflow.workflow_id)
if result.data:
    print(result.data.jobs)
print(result.errors)
```

```bash tab=CLI
linkedin company fetch https://www.linkedin.com/company/company1 \
  --jobs \
  --jobs-limit 25 \
  --jobs-location "United States" \
  --jobs-date-posted pastWeek \
  --json
```

- `label` (optional) – custom label for tracking this action in workflow completion.
- `limit` (optional) – number of jobs to retrieve. Defaults to **25**, with a maximum value of **100**.
- `location` (optional) – where the jobs are: a free-form location selected through LinkedIn jobs location search, as in [`st.searchJobs`](/docs/action-st-search-jobs). Defaults to **United States**.
- `includeSubsidiaries` (optional) – defaults to **false**. When set to `true`, the jobs of the companies LinkedIn groups with this one are returned too. See [Which jobs are returned](#which-jobs-are-returned).
- `datePosted` (optional) – how recently the job was posted, in the same buckets as [`st.searchJobs`](/docs/action-st-search-jobs). Defaults to `anyTime`. Enum with possible values:
  - `anyTime`.
  - `past24Hours`.
  - `pastWeek`.
  - `pastMonth`.
- `then` (optional) – object or array of child actions to be executed within this action.

## Which jobs are returned

- **The company's own jobs, by default.** Every job returned is one the company itself posted.
- **With `includeSubsidiaries`, the company's whole employer family.** The jobs of the companies LinkedIn itself groups with this one are returned as well – for Microsoft, that includes GitHub. A job may then name a company other than the one you opened, so read each job's own `companyName`. A job from another company of the family that LinkedIn marks as a near match is not returned, so the list can be shorter than the family's openings. The company's own jobs are returned either way, near matches included.
- **No openings is not an error.** A company with no open jobs returns an empty array.

## Result options

1. **Successful retrieval:**

```json
{
  "actionType": "st.retrieveCompanyJobs",
  "label": "company1Jobs",
  "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",
      "postedDate": "3d",
      "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 jobs with results of child actions execution. Each job is the same object [`st.searchJobs`](/docs/action-st-search-jobs#result-options) returns for a search result.
  - `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. With `includeSubsidiaries`, it can be another company of the family.
  - `location` – free-form job location, if available.
  - `workplaceType` – workplace type label as shown by LinkedIn (such as `remote`, `hybrid`, or `on-site`), if available.
  - `postedDate` – how long ago the job was posted, as a compact relative age such as `35min`, `9h`, `3d` or `2w` (`0s` for a job posted moments ago). `null` when LinkedIn does not show one.
  - `salary` – parsed salary range, if LinkedIn shows one: `currency`, `minAmount`, `maxAmount` and `period`, as in [`st.searchJobs`](/docs/action-st-search-jobs#result-options).
  - `easyApply` – boolean indicating whether the job card mentions Easy Apply.
  - `isPromoted` – boolean indicating whether the job card is promoted.
  - `isSimilarMatch` – boolean indicating whether LinkedIn returned the job as a near match rather than an exact one.
  - `then` – results of child actions execution.

To save the jobs you retrieve, or open each of them for its full details, put [`st.doForJobs`](/docs/action-st-do-for-jobs) under this action – see its [usage examples](/docs/action-st-do-for-jobs#usage-examples).

2. **Failed retrieval:**

```json
{
  "actionType": "st.retrieveCompanyJobs",
  "label": "company1Jobs",
  "success": false,
  "error": {
    "type": "searchInterfaceMismatch",
    "message": "This account's LinkedIn search interface does not support the requested criteria."
  }
}
```

- `label` – included only if specified in the action parameters.
- `error.type` – enum with the following possible values:
  - `companyNotFound` – the company page does not exist or is not visible to the account.
  - `retrievingNotAllowed` – LinkedIn has blocked performing the retrieval due to exceeding limits or other restrictions.
  - `searchingNotAllowed` – LinkedIn has blocked performing the search due to exceeding limits or other restrictions.
  - `searchInterfaceMismatch` – LinkedIn's jobs search did not apply what was asked – the `location`, the `datePosted` window, or the company itself – so no jobs are returned rather than jobs that do not match.
