- Documentation
- Get started
Pagination
Cursor and offset paging, their limits, and how to walk a large result set without missing rows.
The job lists and the feeds page with a cursor: the response
carries a next_cursor, and you pass it back as ?cursor= to get the next
page. offset is still there on /v1/jobs for shallow, random-access paging,
and it's how /v1/companies pages. There are no Link headers.
curl -H "Authorization: Bearer $HYPERJOBS_KEY" \
"https://api.hyperjobs.io/v1/jobs?skill=python&limit=200"{
"data": [ … ],
"count": 200,
"limit": 200,
"offset": 0,
"has_more": true,
"next_cursor": "eyJwIjoiMjAyNi0xMC0yOFQxNDowMjoxMS4xMjM0NTYrMDAiLCJpZCI6ImpfNGI3ZTFjOTBhMmQzNWY2OCIsInMiOiJwb3N0ZWQifQ"
}count is the rows on this page: limit, or fewer on the last one. has_more
says whether another page follows. A page doesn't say how many jobs match in all,
so every page costs the same however broad the search is. When you want that
number, ask /v1/jobs/count.
To page by number, send limit and offset: page 3 of 100 is
limit=100&offset=200. offset stops at 10,000; use a cursor past that, or to
walk a whole result set.
Cursors
next_cursor is an opaque base64url keyset cursor. Don't parse it, just send
it back:
curl -H "Authorization: Bearer $HYPERJOBS_KEY" \
"https://api.hyperjobs.io/v1/jobs?skill=python&limit=200&cursor=eyJwIjoiMjAyNi0xMC0yOFQx…"nullmeans done. The last page carries"next_cursor": null.- Stable at any depth. A cursor pins your position by key, not by row count, so page 500 costs the same as page 2 and rows ingested mid-walk can't shift under you. See deep paging below.
- Cursor wins over offset. On
/v1/jobs, passingcursorignoresoffset, and the response omits theoffsetkey. Pick one style per walk. - A malformed or hand-edited cursor is a
400, not an empty page. - The feeds (
/v1/jobs/feed](/docs/api-reference/jobs-feed),/v1/jobs/expired,/v1/jobs/modified) return rows in ascending index order and page the same way: follownext_cursoruntilnulland you've drained the window.
A collapse response has no next_cursor: collapsed groups have no stable
keyset to cursor over. Page those with offset, which collapse supports as
usual.
Offset
/v1/jobs and /v1/companies also take offset (min 0, max 10,000) for
shallow or random-access paging, jumping straight to page 12 of a UI, say.
Beyond 10,000, or for any full walk, use the cursor.
Limits
| Endpoint | Default limit | Max limit | Cursor? | Offset? |
|---|---|---|---|---|
/v1/jobs | 50 | 200 | Yes | Yes (max 10,000) |
/v1/jobs/feed | 200 | 1,000 | Yes | No |
/v1/jobs/expired | 1,000 | 5,000 | Yes | No |
/v1/jobs/modified | 200 | 1,000 | Yes | No |
/v1/companies | 50 | 200 | No | Yes (max 10,000) |
/v1/locations | 100 | 1,000 | No | No, narrow with q |
Out-of-range values are rejected, not clamped: limit=5000 on /v1/jobs is a
400 with "hint": "maximum is 200", and the minimum everywhere is 1:
limit=0 and limit=-1 are 400s too. (An early draft of this API had a
negative-limit-returns-everything backdoor; it's gone.)
Walking a full result set
async function* allJobs(params, key) {
const PAGE = 200; // the max: fewer, bigger pages spend fewer requests (quota counts rows, not pages)
let cursor = null;
for (;;) {
const qs = new URLSearchParams({ ...params, limit: PAGE });
if (cursor) qs.set("cursor", cursor);
const res = await fetch(`https://api.hyperjobs.io/v1/jobs?${qs}`, {
headers: { Authorization: `Bearer ${key}` },
});
if (!res.ok) throw new Error(`${res.status}`);
const { data, next_cursor } = await res.json();
yield* data;
if (!next_cursor) return;
cursor = next_cursor;
}
}No bookkeeping, no short-page heuristics: the cursor is the loop condition.
Deep paging drifts
Results are sorted newest-first, and the dataset is continuously ingested. Both facts together mean offset paging over a live index is not a consistent snapshot: if 30 new jobs are indexed while you're on page 3, the rows that were on page 3 shift to page 4, and you'll see 30 rows twice, while rows that fall off the far end are missed entirely.
This is inherent to offset paging, not specific to this API, and it's what the cursor fixes. A keyset cursor pins your position to the last row you saw, so new rows arriving above you can't shift the pages below. In order of preference:
Use the cursor
For any walk longer than a page or two, follow
next_cursor. No drift, no depth limit, no duplicates from ingestion racing your walk.If you must offset-page, deduplicate by id
Collapsed results have no cursor, so offset paging is sometimes unavoidable. Collect into a
Mapkeyed byjob.idrather than an array: costs nothing, fixes double-counting, doesn't fix misses.Sync with the feed instead
For anything that needs completeness (keeping a local mirror, driving alerts), don't walk the index at all. Take one full snapshot, then poll
/v1/jobs/feedwith a cutoff. Syncing the feed has the pattern.
Counting without fetching
Counting has its own endpoint now:
/v1/jobs/count takes the same filters as
/v1/jobs and returns just the number.
curl -H "Authorization: Bearer $HYPERJOBS_KEY" \
"https://api.hyperjobs.io/v1/jobs/count?skill=rust&remote=1"{ "count": 1284 }Counts are an exact COUNT(*) over the same filters, not an estimate, so
a very broad one takes longest. If you only need "are there any", call
/v1/jobs?limit=1 and check data.length.
Sorting
/v1/jobs defaults to newest-first by posted_at, with id as the
tiebreak. Jobs with no posting date (posted_at: null, date_source: unknown) come after every dated job, in either date order, by when we first
saw them (created_at): we know they were up by then, not that they are new.
Its sort parameter changes that: posted_asc, salary /
salary_asc (annualised USD, jobs without a salary last), or relevance
(which needs a text search). A cursor is bound to the sort that issued it:
changing sort mid-walk is a 400, not silently wrong pages. The feeds (/feed, /expired, /modified) are the opposite:
ascending by index, expiry, and modification time respectively, so a
cursor walk drains them oldest-first. /v1/companies is always ordered by
live jobs (most first), then LinkedIn followers, then id.
If you need an order sort can't express, fetch the filtered set and sort
client-side: with limit=200 and a tight filter that's usually one or two
requests, and the same jobs from your quota either way.