API DOCUMENTATION / JOBS ENDPOINTS
Jobs endpoints
Methods, query behavior, response differences, and change retrieval for jobs.
List jobs
| Method | Path | Success envelope | Pagination |
|---|---|---|---|
| GET | /v1/jobs | {data, next_cursor, snapshot_watermark} | limit defaults to 50; valid range 1–250, or 1–1,000 when fields is exactly job_id. |
One result is a combined job_id with its associated postings. By default, results sort by job_updated_at descending, then job_id descending; text-search requests default to relevance, and sort=updated selects updated order explicitly. The REST page limit is at most 250 (1,000 when fields is exactly job_id), while the MCP search_jobs tool takes pages of 10 to 100 jobs (default 50), or 10 to 25 with descriptions: "full". For job titles use title rather than q: q is a broad full-text search of titles and descriptions and the slowest filter, and with narrow filters it can run past the 90-second limit (503 query_too_broad, no records used). The response serializer is list-specific; see field shapes.
Count jobs
| Method | Path | Success envelope | Pagination |
|---|---|---|---|
| GET | /v1/jobs/count | {count, snapshot_watermark} | None. The route rejects pagination and change-feed parameters. |
The count uses a distinct included-job count at a projection watermark. It is a separate request from list paging; a changing projection or query scope can make totals differ from a client’s accumulated pages.
curl --request GET "$HEADCOUNTLABS_BASE_URL/v1/jobs/count?company_id=12345678-1234-4234-8234-123456789abc¤tness=current" --header 'Authorization: Bearer <API_KEY>'Read one job
| Method | Path | Result |
|---|---|---|
| GET | /v1/jobs/{jobId} | One {data: job} envelope when found. Merged IDs return 308 and a merge envelope; withdrawn IDs return 410; unknown IDs return 404. |
The identifier is a canonical lowercase UUID for the combined job. A posting identifier and source posting identifier refer to different records. Detail serialization differs from list serialization.
curl --request GET "$HEADCOUNTLABS_BASE_URL/v1/jobs/12345678-1234-4234-8234-123456789abc" --header 'Authorization: Bearer <API_KEY>'Search with a JSON body
POST /v1/jobs/search takes the same filters as GET /v1/jobs in a JSON body and returns the same envelope, with the same paging and the same cost. country, employment_type and fields can be arrays. Send cursor in the body to read the next page.
curl --request POST "$HEADCOUNTLABS_BASE_URL/v1/jobs/search" --header 'Authorization: Bearer <API_KEY>' --header 'Content-Type: application/json' --data-raw '{"title":"nurse","country":["US","CA"],"employment_type":"full_time","fields":["job_id","title","locations"],"limit":50}'Elasticsearch-style search
POST /v1/jobs/search/es_dsl takes {"query": ...} in Elasticsearch query syntax, plus the usual limit, cursor, sort, fields, include and description_format. The query is translated to the list filters and run as the same search, so results, paging and cost match POST /v1/jobs/search.
Supported clauses: match_all; bool with must and filter; bool.should over one field that accepts a list (country, employment_type); bool.must_not for source and for exists; term, terms, match and match_phrase on any list filter name; range on date and pay fields (gt and lt are treated as gte and lte); exists on a field with a has_* filter; and query_string or simple_query_string over title or description. These field names are also accepted: created_at (first seen), last_updated (updated), keyword_description (description), company_name (company), application_active and deleted. A clause or field outside this list returns 400 invalid_request and names it.
curl --request POST "$HEADCOUNTLABS_BASE_URL/v1/jobs/search/es_dsl" --header 'Authorization: Bearer <API_KEY>' --header 'Content-Type: application/json' --data-raw '{"query":{"bool":{"must":[{"match":{"title":"nurse"}},{"terms":{"country":["US","CA"]}}],"filter":[{"range":{"created_at":{"gte":"2026-10-01"}}}]}},"limit":50}'Bulk export to files
POST /v1/jobs/exports writes every job matching a search to files, so you do not page through it. The body is a POST /v1/jobs/search body without limit and cursor, plus an optional max_records from 1 to 100,000 (the default). The response is 202 with an export object: export_id, status (queued, running, completed, failed or expired), record_count, snapshot_watermark and files.
curl --request POST "$HEADCOUNTLABS_BASE_URL/v1/jobs/exports" --header 'Authorization: Bearer <API_KEY>' --header 'Content-Type: application/json' --data-raw '{"country":"CA","title":"nurse","fields":["job_id","title","locations"],"max_records":20000}'Poll GET /v1/jobs/exports/{exportId} until status is completed, then download each entry in files from its url. A file is gzipped JSON lines: one job per line, shaped as the search would return it, with up to 10,000 jobs per file. Files are kept for 24 hours after the export completes. GET /v1/jobs/exports lists your 20 most recent exports.
curl --request GET "$HEADCOUNTLABS_BASE_URL/v1/jobs/exports/12345678-1234-4234-8234-123456789abc" --header 'Authorization: Bearer <API_KEY>'curl --request GET "$HEADCOUNTLABS_BASE_URL/v1/jobs/exports/12345678-1234-4234-8234-123456789abc/files/1" --header 'Authorization: Bearer <API_KEY>' --output jobs-1.jsonl.gzAn export is counted when it completes, as one list request for every 100 jobs written (at least one). A failed export uses nothing, and export requests do not count toward the per-minute rate limit. The bulk download walkthrough shows the steps. An account can run one export at a time; a second request returns 409 export_in_progress. A job that changes while an export runs can be missing from it: to catch up, read GET /v1/jobs/changes with since set to the export's created_at. If the whole catalog is republished while an export runs, the export fails with a message asking you to create it again.
Read job changes
GET /v1/jobs/changes is available with an API key. Start with a since timestamp or continue with the opaque after cursor. The response contains data, resume_cursor, has_more, and snapshot_watermark; created and updated events can include a job, while expired events identify the job and event time. The route can return 503 if the projection is unavailable or changes during the request.
curl --request GET "$HEADCOUNTLABS_BASE_URL/v1/jobs/changes?after=opaque_cursor_example&limit=100" --header 'Authorization: Bearer <API_KEY>'Request example
curl --request GET "$HEADCOUNTLABS_BASE_URL/v1/jobs?currentness=current&limit=50" --header 'Authorization: Bearer <API_KEY>'The list response contains combined jobs and their postings.
Continue in the reference
Check related request behavior before you build.
View route status and methods Discuss API requirements