Atomically validate and enqueue a batch
Atomically validate and enqueue a batch
POST
Atomically validate and enqueue a batch
header
X-API-Key<token>Idempotency-Key?stringOptional. Generate a unique value before a write and retain it for an exact-body retry; replay is free and a different body returns 409 IDEMPOTENCY_CONFLICT.
Length
8 <= length <= 200application/json- body
jobs*array<>Raw scrape requests only; structured extraction is not accepted in a batch.
Items
1 <= itemsBatch accepted or idempotently replayed Error body uses the documented PublicError DTO.
application/json- response
batch_id*stringFormat
uuidstatus*stringValue in
"pending""completed"jobs*array<>charged_tokens*integerBase credits charged by this submission operation; dynamic protected/CAPTCHA debits occur later. Zero on an idempotent replay.
Range
0 <= valuepricing_version*integerRange
1 <= valueroute_mode*DataRouteModeValue in
"direct""auto""browser""http""residential""residential_browser""mixed"idempotent_replay*booleanTrue only when this response replays a previous submission with the same idempotency key and payload.
curl -X POST 'https://api.runharvester.com/api/v1/data/batches' \ -H 'Content-Type: application/json' \ -d '{ "jobs": [ { "url": "http://example.com" } ]}' \ --header "X-API-Key: ${RUNHARVESTER_API_KEY:?Set your Data API key}" \ --header "Idempotency-Key: ${RUNHARVESTER_IDEMPOTENCY_KEY:?Set a unique key for this submission; reuse it for retries}"{ "id": "9a20bd58-ed33-4a5b-b63f-b52bb1a62248", "status": "pending"}