Skip to content

Jobs

The jobs endpoints are the read side of async jobs: list your jobs, poll one for status, and page through its results. All three are GETs and consume no credits — you paid when the job processed its roles.

MethodPathWhat it returns
GET/v1/jobsYour jobs, newest first, filterable by status
GET/v1/jobs/{id}One job object
GET/v1/jobs/{id}/resultsThe job’s output, paginated, in JSON, CSV, or NDJSON
Terminal window
curl "https://api.rolesapi.com/v1/jobs?status=running&limit=20" \
-H "Authorization: Bearer rk_live_your_key"

What is in a job object?

{
"data": {
"id": "5f0f6c2e-4b3a-4e9c-9c74-31d1f2a30c11",
"type": "batch_detail",
"status": "succeeded",
"progress": { "done": 120, "total": 120 },
"result_count": 120,
"error": null,
"created_at": "2026-07-01T09:15:00Z",
"started_at": "2026-07-01T09:15:01Z",
"completed_at": "2026-07-01T09:32:41Z"
},
"request_id": "req_e01b7d2c"
}
FieldTypeMeaning
idstringJob id (UUID).
typestringWhat created it: batch_detail (roles batch), search (deep search), chained_search_detail (search with details).
statusstringqueued, running, succeeded, failed, timed_out, or aborted.
progressobject{ "done": n, "total": n } — units processed vs. planned.
created_atstringSubmission time, ISO 8601.
result_countinteger or nullRows produced, set on completion.
started_at / completed_atstring or nullSet when the job starts / reaches a terminal state.
errorstring or nullSet when the job fails.

What is the lifecycle?

FromToWhen
queuedSubmission accepted (the 202 response).
queuedrunningA worker picks the job up; progress.done starts advancing.
runningsucceededEvery unit processed; results ready.
runningfailedUnrecoverable error; error is set, partial results (if any) remain readable.

succeeded, failed, timed_out, and aborted are terminal. Poll every few seconds with backoff, or skip polling with a webhook.

GET /v1/jobs

ParameterInTypeDescription
statusquerystringFilter: queued, running, succeeded, failed, timed_out, aborted.
limitqueryintegerPage size.
offsetqueryintegerItems to skip. See Pagination.

Returns an array of job objects with the standard meta block.

GET /v1/jobs/{id}

Returns the single job object shown above. 404 not_found if the id does not exist on your account.

GET /v1/jobs/{id}/results

ParameterInTypeDescription
limitqueryintegerPage size.
offsetqueryintegerItems to skip.
formatquerystringjson (default), csv, or ndjson. See Output formats.

JSON results are full role objects in the standard envelope:

Terminal window
curl "https://api.rolesapi.com/v1/jobs/job_01hxyz/results?limit=100&offset=0" \
-H "Authorization: Bearer rk_live_your_key"
{
"data": [
{
"job_key": "a1b2c3d4e5f60718",
"title": "Senior Backend Engineer",
"company": { "name": "Acme Logistics", "rating": 4.1, "url": "https://www.indeed.com/cmp/Acme-Logistics" },
"location": "Austin, TX",
"remote": false,
"employment_type": "Full-time",
"salary": { "min": 140000, "max": 175000, "currency": "USD", "period": "year", "source": "employer" },
"benefits": ["Health insurance", "401(k) matching", "Paid time off"],
"description": "Acme Logistics is hiring a Senior Backend Engineer to build the services that power our fulfillment network...",
"posted_at": "2026-06-28",
"url": "https://www.indeed.com/viewjob?jk=a1b2c3d4e5f60718",
"country": "us"
}
],
"meta": { "total": 120, "count": 1, "limit": 1, "offset": 0, "has_more": true },
"request_id": "req_ab44c8e0"
}

With format=csv or format=ndjson, the whole result set is returned as one download — rows only, no envelope. Results for a failed job return whatever was processed before the failure. Calling /results on a queued or running job returns the rows processed so far, so you can stream partial output from long jobs.

RolesAPI is not affiliated with, endorsed by, or sponsored by Indeed, Inc. Indeed is a registered trademark of Indeed, Inc. RolesAPI provides access to publicly available data via a stable REST API.