Atomically validate and enqueue a batch
Atomically validates and enqueues a batch of requests: either every item is accepted and the batch id is returned, or nothing is created. Use it for many URLs in one call and data_create_request for a single one. Follow up with data_wait_batch or data_get_batch. Send an Idempotency-Key so an exact-body retry replays the original batch instead of enqueuing a duplicate.
Atomically validates and enqueues a batch of requests: either every item is accepted and the batch id is returned, or nothing is created. Use it for many URLs in one call and data_create_request for a single one. Follow up with data_wait_batch or data_get_batch. Send an Idempotency-Key so an exact-body retry replays the original batch instead of enqueuing a duplicate.
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.
8 <= length <= 200application/json- body
jobs*array<>Raw scrape requests only; structured extraction is not accepted in a batch.
1 <= itemsBatch accepted or idempotently replayed Error body uses the documented PublicError DTO.
application/json- response
batch_id*stringuuidstatus*string"pending""completed"jobs*array<>charged_tokens*integerBase credits charged by this submission operation; dynamic protected/CAPTCHA debits occur later. Zero on an idempotent replay.
0 <= valuepricing_version*integer1 <= valueroute_mode*DataRouteMode"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"}List owned batches GET
Lists this tenant's batches as a cursor page; use it to find batch ids and data_get_batch to read one batch with its jobs. Pass the returned next cursor back to read the following page. For individual requests use data_list_requests.
Read owned batch and jobs GET
Reads one batch of this tenant with its jobs and their statuses, without waiting. The id is the batch id returned by data_create_batch or data_list_batches. Use data_wait_batch to block until the batch finishes and data_list_batches to enumerate batches. An unknown id or one owned by another tenant returns 404.