When to use this
When you don’t want to hold the connection open.POST /v1/runs accepts a
job, returns 202 with a run_id immediately, and executes in the
background — you read its state whenever you like:
- Poll:
GET /v1/runs/{run_id}— status, progress, and (once terminal) the result. This is the source of truth. - Stream:
GET /v1/runs/{run_id}/events— server-sent events; astatusframe on every change and a terminalfinalframe carrying the full run. A convenience over polling, not a second contract.
fetch_batch — the exact
/v1/fetch/batch request, same validation, same
limits, same result body. More kinds hang off this spine as they ship.
Submit
400 fields_unknown, 422, …) on the POST
itself — a run never exists only to fail on something validation could have
caught.
Poll
status walks queued → running → done | failed. Once done, result
carries exactly the body the synchronous endpoint would have returned. Once
failed, error carries {error, message, retryable} — a
run_interrupted failure (the worker restarted mid-run, e.g. during a
deploy) is always retryable: resubmit the same request.
Stream
final frame. A run that finished before you
connected skips straight to final. Streams are capped at 15 minutes
(events_timeout error frame) — past that, poll.
Artifacts: the result as a file
Once a run isdone, download its result instead of parsing it:
/artifacts/csv— one row per location, index-aligned: identity columns (index, ok, lat, lng, source, error), one column per field carrying the value (empty when absent or failed), and afailed_fieldscolumn naming what to distrust. Spreadsheet-ready./artifacts/geojson— aFeatureCollection, onePointper location (GeoJSON[lng, lat]axis order), field values asproperties. A failed location keeps its slot as a null-geometry feature, so the collection stays index-aligned too.
queued/running
returns 409 run_not_ready (retryable); a failed run returns
409 run_failed (resubmit). PDF is deliberately not offered here: branded
report generation lives in the delivery tooling, not the serving API.
Ownership, retention, errors
- A run belongs to the account that submitted it. Anyone else’s
run_id— and any unknown id — reads as404 run_not_found: a run id does not leak whether someone else’s job exists. - Runs expire 30 days after submission and then read as
404. This is the same clock as every other address-holding store: afetch_batchrequest can contain street addresses, and the disclosed 30-day retention applies to run documents too. - A batch location’s failure is inside the result (
ok: falseentries), exactly as on the synchronous endpoint — a failed location never fails the run.