POST /job_inputs, then POST /jobs with file_input_id) and zenrows_params
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.Prepare the CSV
Any CSV works. You tell Batch which column holds the URL and, optionally, which one holds your ID. This recipe uses a file with a header row:products.csv
name here, are ignored.
Upload the file and create the job
Three calls do it:POST /job_inputswith"type": "csv"creates an upload slot. Incsv.fields, mapurl(required) andexternal_id(optional) to your column names. The response holds afile_input_idand a presigneduploadURL.PUTthe file toupload.url, sending the headers listed inupload.headers.POST /jobswithfile_input_idinstead oftasks. Scrape settings go inzenrows_paramsas usual.
jq to read the slot response. Check progress and read results the same way as any job, see Scrape a list of URLs.
Example output
The Python run:POST /job_inputs response, with the presigned link shortened:
Use the SDKs
Both SDKs wrap the slot and the upload in one call,upload_csv in Python and uploadCsv in Node.js, and return the file_input_id:
Output
use_external_id=True (useExternalId: true in Node.js) each file is named after your sku column: MH09, WJ08, WP07. The Python SDK adds the result type as an extension, for example MH09.markdown.
Customize it
Troubleshooting
- The upload returns
403: the presigned upload link is no longer fresh. Create a new slot withPOST /job_inputsand upload right away. POST /jobsreturns400withheader has no column: the names infieldsmust match your header row exactly, including case and spaces. Open the file and copy the header names, or switch to column indexes with"header": false.- Results have no
external_id: add"external_id": "<column>"tofields. Without it, match results byurlortask_id. - Some rows failed: list them with
status=failedand rerun them, see Retry the tasks that failed.
Related recipes
Scrape a list of URLs
Send URLs inline as one Batch job.
Add URLs to a job while it runs
Stream URLs into an open job as you find them.
Download all results of a job at once
Save every page to a folder or one ZIP file.
Retry the tasks that failed
Rerun only the failures and keep the successes.