Jobs and results
Fetch a job that is still running, and read its result.
Every call is a job with a job_id. When a call is still running after its wait, you fetch the job until it has finished.
Fetch a job
curl https://data.upscrape.com/jobs/d7ef67f5-8cb8-4989-8b55-8ba67a1aab4f \ -H "Authorization: Bearer $UPSCRAPE_API_KEY"
poll_url in a pending response is this address, ready to use. Only keys of the same account can fetch a job.
| The job is | HTTP | You get |
|---|---|---|
queued, running or retrying | 202 | The job with poll_url and poll_after_ms. Fetch again later. |
completed | 200 | The result, in results[0].data, and billing.credits_charged. |
failed | 200 | success: false and an error.code. |
| Unknown, or another account's | 404 | not_found. |
A failed job also answers 200, so check state or success on every response rather than the HTTP status alone.
How often to check
Wait poll_after_ms before the first fetch, then a little longer each time: for example 1, 2, 4, 8 seconds, then every 10 seconds. Set a deadline in your code and stop there; giving up does not cancel the job, and you can fetch it again later.
Long-running calls has a complete loop in Python and Node.js.
A pending job
{ "job_id": "d7ef67f5-8cb8-4989-8b55-8ba67a1aab4f", "state": "running", "platform": "googlemaps", "capability": "googlemaps.search", "poll_url": "https://data.upscrape.com/jobs/d7ef67f5-8cb8-4989-8b55-8ba67a1aab4f", "poll_after_ms": 2000}
A finished job
A completed job has state: "completed", success: true, the result in results[0].data and billing.credits_charged, the same as a call that finished while you waited. Run an endpoint shows the whole response.
A failed job has state: "failed", success: false and error with its code and message; Errors and retries lists every code. Nothing is charged for it.
In the console
Every job shows in the console under Runs, whichever way it was started: your code, an AI app over MCP, a monitor or the console itself. Open one to see its input, cost and error, or download its result as a JSON file.
Something missing or unclear? Ask the team that builds the endpoints.