# Tracking jobs

Read and change the account's LinkedIn job tracker: save jobs, move them between stages, archive and delete them.

> 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.

LinkedIn keeps a job tracker for every member: the jobs they saved and the ones they started or finished applying to. Linked API reads that tracker and changes it.

:::surface node
Each example below has its Node SDK call in the Node tab.
:::

:::surface python
Each example below has its Python SDK call in the Python tab.
:::

:::surface cli
Each example below has its CLI command in the CLI tab.
:::

## Stages

A job sits in exactly one stage, and you read one stage at a time:

| Stage | What it means |
| --- | --- |
| `saved` | Saved, not started. |
| `draft` | An application was started on LinkedIn and not submitted. Only LinkedIn puts a job here. |
| `clickedApply` | Apply was clicked, or the job was moved to `inProgress`. |
| `applied` | Applied. |
| `interview` | In interview. |
| `archived` | Set aside. Keeps everything else about the job. |

[`st.setJobStage`](/docs/action-st-set-job-stage) and [`st.unarchiveJob`](/docs/action-st-unarchive-job) take `saved`, `inProgress`, `applied` and `interview` as destinations. A job moved to `inProgress` is read back as `clickedApply`, and a job already in `draft` or `clickedApply` counts as `inProgress`. Archiving has its own two actions.

## Reading the tracker

**Workflow:**

```json tab=HTTP
{
  "actionType": "st.retrieveTrackedJobs",
  "stage": "applied",
  "limit": 10
}
```

```typescript tab=Node
const workflow = await linkedapi.retrieveTrackedJobs.execute({
  stage: "applied",
  limit: 10
});

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

```python tab=Python
from linkedapi import RetrieveTrackedJobsParams

workflow = linkedapi.retrieve_tracked_jobs.execute(
    RetrieveTrackedJobsParams(stage="applied", limit=10)
)

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

```bash tab=CLI
linkedin jobs tracked --stage applied --limit 10
```

:::surface http
**Completion:**
:::

:::surface node,python
**Completion** – `result()` returns its `data` in `data`, and a failed action in `errors`:
:::

:::surface cli
**Completion** – with `--json` the CLI prints its `data` as `data`:
:::

```json
{
  "actionType": "st.retrieveTrackedJobs",
  "success": true,
  "data": [
    {
      "jobId": "4450053454",
      "urn": "urn:li:jobPosting:4450053454",
      "jobUrl": "https://www.linkedin.com/jobs/view/4450053454/",
      "title": "Senior Software Engineer",
      "companyName": "Example Company",
      "location": "United States",
      "workplaceType": "remote",
      "postedDate": "3mo",
      "markedAppliedDate": "2d"
    }
  ]
}
```

## Changing the tracker

| To | Use |
| --- | --- |
| Put a job in the tracker | [`st.saveJob`](/docs/action-st-save-job) |
| Move it between stages | [`st.setJobStage`](/docs/action-st-set-job-stage) |
| Set it aside | [`st.archiveJob`](/docs/action-st-archive-job) |
| Bring it back | [`st.unarchiveJob`](/docs/action-st-unarchive-job) |
| Take it out | [`st.unsaveJob`](/docs/action-st-unsave-job) |
| Delete it from the tracker | [`st.deleteTrackedJob`](/docs/action-st-delete-tracked-job) |

Each one takes the job's `jobUrl`, and repeating one is harmless: a change that is already true succeeds without doing anything, and deleting a job that is no longer tracked returns `jobNotTracked`. The exception is `stageNotHonoured` from [`st.setJobStage`](/docs/action-st-set-job-stage): LinkedIn has already moved the job to another stage, and repeating the call would move it again, so read it back with [`st.retrieveTrackedJobs`](/docs/action-st-retrieve-tracked-jobs) instead.

**Save a job:**

```json tab=HTTP
{
  "actionType": "st.saveJob",
  "jobUrl": "https://www.linkedin.com/jobs/view/4450053454/"
}
```

```typescript tab=Node
const workflow = await linkedapi.saveJob.execute({
  jobUrl: "https://www.linkedin.com/jobs/view/4450053454/"
});

const { errors } = await linkedapi.saveJob.result(workflow.workflowId);
```

```python tab=Python
from linkedapi import SaveJobParams

workflow = linkedapi.save_job.execute(
    SaveJobParams(job_url="https://www.linkedin.com/jobs/view/4450053454/")
)

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

```bash tab=CLI
linkedin jobs save https://www.linkedin.com/jobs/view/4450053454/
```

## Finding the job faster

To change a job, Linked API has to find it in the tracker, and it does that by walking the stages. On a large tracker that costs page loads, and past a point the job cannot be located at all – the action then returns `trackerTooLarge`.

Pass `currentStage` with the stage the job is in to [`st.setJobStage`](/docs/action-st-set-job-stage), [`st.archiveJob`](/docs/action-st-archive-job) or [`st.deleteTrackedJob`](/docs/action-st-delete-tracked-job): that stage is searched first, and when the job is there no other stage is. [`st.retrieveTrackedJobs`](/docs/action-st-retrieve-tracked-jobs) tells you which stage that is.

## What the tracker does not mean

- **Nothing here applies to a job.** Linked API never submits an application. `applied` is a label in the account's own tracker.
- **`markedAppliedDate` is not proof of an application.** LinkedIn stamps it when a job reaches `applied` or beyond, including when [`st.setJobStage`](/docs/action-st-set-job-stage) put it there. It then sticks through later stages, through archiving and through a return to `saved`.
- **The stamp is lost when the job leaves the tracker.** A job deleted or unsaved and saved again comes back without it.
- **LinkedIn decides which stages it offers for each job.** The `stage*` errors of [`st.setJobStage`](/docs/action-st-set-job-stage#error-result) say what it answered.

> This page provides examples of [workflows](/docs/building-workflows) and their [completions](/docs/executing-workflows). For detailed documentation on constraints, parameters, and possible results of specific actions, always refer to the corresponding [action documentation pages](/docs/actions-overview).
