Batch

Create a batch job (many URLs in one request)

Submit a job. A closed job carries all its URLs up front in tasks; an open job is created empty and receives URLs through addBatchTasks until one call sets last_batch. zenrows_params applies to every task and a per-task zenrows_params overrides it. Returns 201 under 10,000 inline tasks and 202 at or above that (or for a CSV input); the body is identical, so treat both the same.

post/jobs

Request

  • Base URL: https://async.api.zenrows.com/v1
  • URL: https://async.api.zenrows.com/v1/jobs
  • Auth: API key in header X-API-Key

Headers

Idempotency-Keystring

Optional guard against creating duplicate jobs. Each key can be used once: the first submit with a key creates the job, and any later submit reusing it returns 409 idempotency_key_conflict, whether or not the body is identical. The original response is not replayed, so this is not a safe-retry token: if a submit fails midway, list your recent jobs to see whether it was created, then reuse its job_id or submit again with a new key.

Request body

type'regular' | 'scheduled' required

regular runs once; scheduled runs on a cron you set with putBatchSchedule.

status'closed' | 'open' required

closed carries every URL now; open accepts URLs over time.

namestring

Your own label for the job.

zenrows_paramsobject

Fetch parameters applied to every task, using the names in the fetchPage operation.

input_idstring

Identifier returned by uploadBatchInput, to run a job from an uploaded CSV instead of inline tasks.

webhookobject

Where to deliver results as they complete.

Response

Job accepted, under 10,000 inline tasks.

job_idstring

Identifier to poll and to collect results with.

namestring
type'regular' | 'scheduled'
status'open' | 'closed'

Whether the job still accepts new tasks.

Example response

{
  "latest_run": {
    "status": "running"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.