Skip to main content
A finished Batch run holds one result per task. Instead of fetching them one by one, save them all in one step: as one file per task in a folder, named by your external_id, or as a single ZIP archive that Zenrows builds for you. Uses: Batch results (GET /jobs/{id}/results) and bulk export (POST /jobs/{id}/runs/{run_id}/exports)

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.

Pick a method

Save every result to a folder

Both SDKs page through the results and download each body for you. The CLI does the same and also writes a _manifest.jsonl index with each task’s external_id, metadata, url and file name.
job.run is the job’s latest run. To save another run, use client.run(job_id, run_id). Over the raw REST API, the loop in Scrape a list of URLs does the same: page through GET /jobs/{job_id}/results with cursor and download each result_url. The CLI run on a job with three successful tasks:
Folder
In the CLI folder, each file’s extension follows the result type: .md for markdown, .json for CSS-extracted fields, .html for pages. The SDKs name files differently: the Python SDK adds the result type as the extension (hoodie-markdown.markdown, capri-fields.json), and the Node.js SDK adds none (hoodie-markdown).

Export the whole run as a ZIP

  1. Read the run’s run_id from latest_run on GET /jobs/{job_id}.
  2. POST /jobs/{job_id}/runs/{run_id}/exports starts the export and returns an export_id.
  3. Poll GET /jobs/{job_id}/runs/{run_id}/exports/{export_id} until status is completed, then download download_url.
The SDK methods start the export, poll it and stream the archive to disk when the archive is ready.

Example output

The Python (Requests) run. Inside the ZIP, files are named by task_id with an extension for the result type:
The SDK runs:
To map ZIP files back to your own IDs, list the results once (GET /jobs/{job_id}/results?status=successful) and join on task_id, or use the CLI’s _manifest.jsonl.

Customize it

Troubleshooting

  • Fewer files than tasks: the folder download saves successful results. Read the failures with status=failed, see Retry the tasks that failed.
  • A result_url or download_url returns 403: the presigned link is stale. List the results or poll the export again for a fresh link.
  • The export stays pending or running: Zenrows is still building the archive. Keep polling every few seconds.
  • The files are named by task_id: pass use_external_id=True (useExternalId: true), and give each task an external_id when you submit it.

Scrape a list of URLs

Submit thousands of URLs as one Batch job.

Start a Batch job from a CSV file

Upload a whole CSV of URLs at once.

Get notified when a Batch job finishes

Receive a webhook instead of polling.

Retry the tasks that failed

Rerun only the failures and keep the successes.