GET /jobs/{id}/results?status=failed), reruns (POST /jobs/{id}/rerun?status=failed) and error codes
Ask your AI agent
Paste this prompt into a coding agent such as Claude Code or Cursor, with the Zenrows docs connected. The agent looks up the details and writes the calls.See which tasks failed and why
CallGET /jobs/{job_id}/results with status=failed. Every row has an error object with a code you can look up in API error codes and the HTTP status of the failure. Page through with cursor until there is no next_cursor.
Python (Requests)
mode=auto), so the protected page failed along with a product page that doesn’t exist:
Output
stats also count failures by reason in failure_reasons, for example {"bad_target": 2}, so you see the shape of a large run before you read every row.
Decide per code:
Rerun the failures as they are
POST /jobs/{job_id}/rerun?status=failed starts a new run of the same job. Failed tasks run again with their original settings, and successful tasks carry over with their results. Use it for temporary failures. Run it once the previous run has finished.
404 page is gone and the protected page needs stronger settings. Add ,pending to the status (include_pending=True in Python, includePending: true in Node.js) to also run tasks that never started, for example after you stopped a run.
Retry with stronger settings
A rerun keeps each task’s settings. To retry with different ones, collect the failed URLs worth retrying and submit them as a new job with strongerzenrows_params. Adaptive Stealth Mode (mode=auto) is the usual choice: it escalates to JavaScript rendering and premium proxies only where a page needs them.
Python (Requests)
Example output
The stronger-settings script on the same job skips the404 page and resubmits the protected one:
external_id on each task lets you merge the retried results back with the first job’s results.
Customize it
Troubleshooting
- The rerun returns
409withrun_not_terminal: the previous run is still going. Wait for it to finish (job.run.wait()orzenrows batch wait), then rerun. - The rerun returns
409withno_matching_tasks: no task failed in the latest run. Read the results withstatus=allto confirm. - The same tasks fail again after a rerun: their codes point to the page or the settings, not to a temporary problem. Drop
404pages and retry the rest with stronger settings. - A retried task fails with
REQS004aboutmode=auto: the task setsjs_renderorpremium_proxywhile the job usesmode=auto. Keep one approach per task, see Use different settings for each URL in one job. - The whole run ended
failedwith afailure_reason: the account needs credits, or the key’s credit cap needs raising. Add them, then rerun withstatus=failed,pending.
Related recipes
Scrape a list of URLs
Submit thousands of URLs as one Batch job.
Use different settings for each URL in one job
Override the job’s settings for a single task.
Retry failed requests
Handle errors when you call Fetch directly.
Download all results of a job at once
Save every page to a folder or one ZIP file.