curl --request POST \
--url https://api.spidra.io/api/batch/scrape \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"urls": [
"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
"https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html"
]
}
'{
"batchId": "38ae74ab-3a7f-421f-9d02-50c6b48d8c49",
"status": "completed",
"totalUrls": 3,
"completedCount": 2,
"failedCount": 1,
"items": [
{
"uuid": "f43aef75-1f51-455b-b4c0-bbd01c703f46",
"url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
"jobId": "12389b87-11da-4aad-ab47-218d07b08ccf",
"status": "completed",
"result": {
"title": "A Light in the Attic",
"price": 51.77
},
"error": null,
"creditsUsed": 2,
"startedAt": "2026-10-25T03:09:38.000Z",
"finishedAt": "2026-10-25T03:09:44.000Z",
"screenshotUrl": null
},
{
"uuid": "445691ac-b528-4368-85d8-3451f0fa8c75",
"url": "https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html",
"jobId": "41b0f1c0-119b-4875-9b39-a235fe95a140",
"status": "completed",
"result": {
"title": "Tipping the Velvet",
"price": 53.74
},
"error": null,
"creditsUsed": 2,
"startedAt": "2026-10-25T03:09:38.000Z",
"finishedAt": "2026-10-25T03:09:46.000Z",
"screenshotUrl": null
},
{
"uuid": "ac714786-f04e-44dc-8f83-2806e6d799ec",
"url": "https://this-domain-does-not-exist-spidra-test.invalid",
"jobId": "6dfa2214-0fdc-4d71-9c74-0776201741c4",
"status": "failed",
"result": null,
"error": "Failed to scrape https://this-domain-does-not-exist-spidra-test.invalid: the page could not be reached (ERR_TUNNEL_CONNECTION_FAILED)",
"creditsUsed": 0,
"startedAt": "2026-10-25T03:09:38.000Z",
"finishedAt": "2026-10-25T03:09:43.000Z",
"screenshotUrl": null
}
],
"createdAt": "2026-10-25T03:09:37.000Z",
"finishedAt": "2026-10-25T03:09:45.000Z"
}Batch scrape
Starts a batch that scrapes up to 50 URLs, each on its own with its own result, and returns a batchId. Poll Get a batch until status is completed. Guide: Batch scrape.
Every option applies to all the URLs. Browser actions aren’t supported in a batch, so use Start a scrape for pages that need them.
With wait: true and up to 10 URLs, the request waits up to 45 seconds and answers 200 with the finished batch, in the same shape as Get a batch. If the batch has more than 10 URLs or takes longer, you get the usual 202 and poll.
Batches are kept, so you can come back to one at any time and list, retry or cancel it.
Credits: the same as a scrape for each URL: 1 per URL, plus AI credits when you send a prompt or schema, plus 5 per CAPTCHA solved. 1 credit per URL is held when you submit, and a URL that fails costs nothing. See How credits work.
Rate limits: 20 batches a minute, and up to 50 unfinished URLs at a time across your batches and scrapes.
curl --request POST \
--url https://api.spidra.io/api/batch/scrape \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"urls": [
"https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
"https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html"
]
}
'{
"batchId": "38ae74ab-3a7f-421f-9d02-50c6b48d8c49",
"status": "completed",
"totalUrls": 3,
"completedCount": 2,
"failedCount": 1,
"items": [
{
"uuid": "f43aef75-1f51-455b-b4c0-bbd01c703f46",
"url": "https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html",
"jobId": "12389b87-11da-4aad-ab47-218d07b08ccf",
"status": "completed",
"result": {
"title": "A Light in the Attic",
"price": 51.77
},
"error": null,
"creditsUsed": 2,
"startedAt": "2026-10-25T03:09:38.000Z",
"finishedAt": "2026-10-25T03:09:44.000Z",
"screenshotUrl": null
},
{
"uuid": "445691ac-b528-4368-85d8-3451f0fa8c75",
"url": "https://books.toscrape.com/catalogue/tipping-the-velvet_999/index.html",
"jobId": "41b0f1c0-119b-4875-9b39-a235fe95a140",
"status": "completed",
"result": {
"title": "Tipping the Velvet",
"price": 53.74
},
"error": null,
"creditsUsed": 2,
"startedAt": "2026-10-25T03:09:38.000Z",
"finishedAt": "2026-10-25T03:09:46.000Z",
"screenshotUrl": null
},
{
"uuid": "ac714786-f04e-44dc-8f83-2806e6d799ec",
"url": "https://this-domain-does-not-exist-spidra-test.invalid",
"jobId": "6dfa2214-0fdc-4d71-9c74-0776201741c4",
"status": "failed",
"result": null,
"error": "Failed to scrape https://this-domain-does-not-exist-spidra-test.invalid: the page could not be reached (ERR_TUNNEL_CONNECTION_FAILED)",
"creditsUsed": 0,
"startedAt": "2026-10-25T03:09:38.000Z",
"finishedAt": "2026-10-25T03:09:43.000Z",
"screenshotUrl": null
}
],
"createdAt": "2026-10-25T03:09:37.000Z",
"finishedAt": "2026-10-25T03:09:45.000Z"
}Authorizations
Body
1 to 50 pages to scrape, each starting with http:// or https://. Send plain strings or { "url": "..." } objects. An object may only have url. Private and internal addresses are rejected, and tracking parameters such as utm_source are removed.
1 - 50 elementsA JSON Schema for each item's result. You get exactly these fields and types, with null for anything the page doesn't show. The root must be "type": "object". Sending a schema sets output to "json".
markdown returns each page as Markdown, or the AI's answer as text when you send a prompt. json returns structured data: on popular sites with no prompt, the page's data; elsewhere, data the AI extracts. Lowercase only.
markdown, json Turns on Stealth Mode for every URL. Billed by bandwidth, not credits. Not needed when you set proxyCountry. false keeps the proxy off, even with a country. When Stealth Mode can't be used because your proxy bandwidth ran out, the request runs without it and warnings says so.
The country to read pages from, as a two-letter code such as us, gb or de, or eu or asia. Setting a country turns Stealth Mode on (billed by bandwidth), and the response's warnings says so, unless useProxy is false: then the country isn't used, and warnings says that instead. global means any country.
"gb"
Cookies from your own signed-in browser session, sent with every URL. Either name=value; name2=value2 or rows pasted from your browser's DevTools. Never stored, so send them again when you retry. See Logged-in pages.
Response
Only with wait: true and up to 10 URLs. The batch finished within 45 seconds, and here it is in full.
A batch with every item.
pending: queued, no URL has started yet.running: at least one URL is being scraped.completed: every URL has finished. Some may have failed, so checkfailedCountand each item'sstatus.cancelled: you cancelled the batch. Items that had finished keep their results.
pending, running, completed, cancelled Was this page helpful?

