# Get changed jobs

> One sync feed: every job that became listed, changed, or stopped being listed, as ids and a kind, oldest first.

Source: https://hyperjobs.io/docs/api-reference/jobs-changes

<EndpointHeader method="GET" path="/v1/jobs/changes" />

The whole sync in one feed. Each row is a job `id`, a `kind` and the moment
of the change, **oldest first**:

| `kind` | Means | Do |
| --- | --- | --- |
| `new` | Now listed and was not: newly indexed, reopened, or no longer folded into another posting. | Fetch it, store it. |
| `updated` | A listed job's fields changed. A re-read that changed nothing is not a change. | Fetch it again. |
| `closed` | No longer listed: expired, removed, or folded into another posting. | Delete it (or mark it dead). |

Keep the `changed_at` of the last row you processed as your checkpoint and
resume with `changed_gte`. Then fetch what you need with
[`/v1/jobs`](/docs/api-reference/jobs-list)`?id=…&fields=…`: up to 200 ids a
call, only the keys you store. Changes are kept for **30 days**, and the last
two minutes are not served yet, so a checkpoint never skips a change that was
still being written.

<CodeGroup>
```bash title="cURL"
curl -G https://api.hyperjobs.io/v1/jobs/changes \
  -H "Authorization: Bearer $HYPERJOBS_KEY" \
  --data-urlencode "changed_gte=2026-11-09T00:00:00Z"
```

```js title="Node"
const headers = { Authorization: `Bearer ${process.env.HYPERJOBS_KEY}` };
const base = "https://api.hyperjobs.io/v1";
let qs = new URLSearchParams({ changed_gte: checkpoint });
const fetchIds = new Set(), closed = new Set();

while (true) {
  const { data, next_cursor } = await (await fetch(`${base}/jobs/changes?${qs}`, { headers })).json();
  for (const row of data) {
    if (row.kind === "closed") { closed.add(row.id); fetchIds.delete(row.id); }
    else { fetchIds.add(row.id); closed.delete(row.id); }
    checkpoint = row.changed_at;
  }
  if (!next_cursor) break;
  qs = new URLSearchParams({ changed_gte: checkpoint, cursor: next_cursor });
}
// Then: GET /v1/jobs?id=<200 ids>&fields=title,company,locations,salary · DELETE the closed ids
```

```python title="Python"
import os, requests

headers = {"Authorization": f"Bearer {os.environ['HYPERJOBS_KEY']}"}
params = {"changed_gte": checkpoint}
to_fetch, closed = set(), set()

while True:
    res = requests.get("https://api.hyperjobs.io/v1/jobs/changes",
                       params=params, headers=headers, timeout=30)
    res.raise_for_status()
    payload = res.json()
    for row in payload["data"]:
        (closed if row["kind"] == "closed" else to_fetch).add(row["id"])
        (to_fetch if row["kind"] == "closed" else closed).discard(row["id"])
        checkpoint = row["changed_at"]
    if not payload["next_cursor"]:
        break
    params["cursor"] = payload["next_cursor"]
```
</CodeGroup>

## Query parameters

<Fields>
  <ParamField query="since" type="&lt;number&gt;&lt;m|h|d&gt;" default="24h">
    Relative window: changes within it. `15m`, `2h`, `24h`, `7d` (`m` is
    minutes). A window longer than 30 days returns everything still held, not an
    error. Compare `retention_days` with your sync interval.
  </ParamField>
  <ParamField query="changed_gte" type="ISO 8601 date">
    Absolute alternative to `since`: changes at or after this instant. Resume
    from the `changed_at` of the last row you processed.
  </ParamField>
  <ParamField query="kind" type="&quot;new&quot; | &quot;updated&quot; | &quot;closed&quot;">
    Only this kind. Omit it to get all three.
  </ParamField>
  <ParamField query="limit" type="integer" default="1000">
    Results per page, 1 to **5,000**: the payload is ids, timestamps and a kind.
  </ParamField>
  <ParamField query="cursor" type="string">
    Opaque keyset cursor from the previous page's `next_cursor`. Page until it
    comes back `null`.
  </ParamField>
</Fields>

<Note title="Ids are free">
  This endpoint bills nothing against your [monthly quota](/docs/rate-limits)
  (since 1.37.0), and it keeps answering after the month's jobs are spent: it
  returns ids, not jobs. What you pay for is the jobs you then fetch:
  `/v1/jobs?id=…&fields=…` with the `new` and `updated` ids you want, each
  billed once. The per-minute rate still applies.
</Note>

## Response

<Fields>
  <ResponseField name="count" type="integer">
    Rows in `data`: this page, not a total.
  </ResponseField>
  <ResponseField name="data" type="{ id, kind, changed_at }[]">
    Changes, **oldest first**. A job that changed several times in the window
    appears once per change; the last one wins.
  </ResponseField>
  <ResponseField name="retention_days" type="integer">
    How long changes are kept: `30`. A sync that runs less often than this can
    miss one.
  </ResponseField>
  <ResponseField name="next_cursor" type="string | null">
    Pass it back as `?cursor=`; `null` means the window is drained.
  </ResponseField>
</Fields>

```json title="Response"
{
  "count": 3,
  "data": [
    { "id": "j_9b03e5f1c27a48d6", "kind": "new", "changed_at": "2026-11-09T08:00:41.000Z" },
    { "id": "j_e71d4a0f9c58b213", "kind": "updated", "changed_at": "2026-11-09T08:02:09.000Z" },
    { "id": "j_40c1d2e3f4a5b6c7", "kind": "closed", "changed_at": "2026-11-09T08:05:30.000Z" }
  ],
  "retention_days": 30,
  "next_cursor": null
}
```

## Errors

| Status | Cause |
| --- | --- |
| `400` | Invalid parameter or value: the body names the `param` and carries a `hint`. |
| `401` | Missing, unknown, revoked, or expired key. |
| `402` | Monthly [quota](/docs/rate-limits) exhausted. |
| `429` | [Rate limit](/docs/rate-limits) exceeded. |
| `500` | Server error. Retry with backoff. |

## Next

<CardGroup cols={2}>
  <Card title="List jobs" icon="List" href="/docs/api-reference/jobs-list">
    Fetch the changed ids with `id=` and only the keys you store with `fields=`.
  </Card>
  <Card title="Syncing the feed" icon="RefreshCw" href="/docs/guides/feed-sync">
    Snapshot, then poll: the whole mirroring pattern.
  </Card>
</CardGroup>
