Batch
Submit a batch
Scrape a list of URLs or crawl a site asynchronously. Send an Idempotency-Key header to make retries safe: resubmitting with the same key returns the batch the first attempt created instead of creating and charging a second one.
post/batch/submit
Headers
Idempotency-Keystring
Any string unique to this submission, at most 200 characters. Retries with the same key return the original batch; reusing a key with a different body fails with IDEMPOTENCY_KEY_CONFLICT.
Any string unique to this submission, at most 200 characters. Retries with the same key return the original batch; reusing a key with a different body fails with IDEMPOTENCY_KEY_CONFLICT.
Request body
Example request
{
"input": {
"data": {
"urls": [
{
"url": "https://example.com/products/anvil",
"itemId": "sku-1"
}
],
"options": {
"country": "de"
}
}
},
"tags": [
"docs",
"competitor"
]
}Response
Batch created
Example response
{
"id": "batch_9f2c8a",
"tags": [
"docs"
],
"input": {
"submitted": 25000,
"accepted": 24817,
"duplicates": 183
},
"progress": {
"succeeded": 18091,
"failed": 311,
"pending": 6415
},
"credits": {
"estimated": 24817,
"charged": 18091
},
"errors": [
{
"code": "WEBSITE_ACCESS_ERROR",
"count": 204
}
],
"invalid_urls": [
{
"reason": "Must be a public http:// or https:// URL"
}
]
}