Atomically validate and enqueue a batch

Atomically validate and enqueue a batch

POST
/api/v1/data/batches

Atomically validate and enqueue a batch

Authorization

headerX-API-Key<token>

Header Parameters

Idempotency-Key?string

Optional. 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.

Length8 <= length <= 200

Request Body

application/json
  1. body
jobs*array<>

Raw scrape requests only; structured extraction is not accepted in a batch.

Items1 <= items

Response Body

Batch accepted or idempotently replayed Error body uses the documented PublicError DTO.

application/json
  1. response
batch_id*string
Formatuuid
status*string
Value in"pending""completed"
jobs*array<>
charged_tokens*integer

Base credits charged by this submission operation; dynamic protected/CAPTCHA debits occur later. Zero on an idempotent replay.

Range0 <= value
pricing_version*integer
Range1 <= value
route_mode*DataRouteMode
Value in"direct""auto""browser""http""residential""residential_browser""mixed"
idempotent_replay*boolean

True 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"}