Skip to main content
Batch scraping lets you queue up to 50 URLs in one API call. Each URL is processed independently and in parallel. You get back per-item results with status, content, credits used, and timestamps — all under a single batchId. Use batch scraping when:
  • You have a list of product, article, or listing URLs to extract
  • You want one API call per dataset rather than managing dozens of individual jobs
  • You need to retry only the URLs that failed without re-running the whole set

How It Works

1

Submit

Send a POST /api/batch/scrape with your URL list and extraction options. You get a batchId back immediately — the job is queued.
2

Process

Spidra processes each URL independently using a real browser. CAPTCHA solving, proxy routing, and AI extraction all run per-item.
3

Poll

Call GET /api/batch/scrape/{batchId} every few seconds. The response includes live progress counters (completedCount, failedCount) and per-item results.
4

Handle failures

If any items fail, call POST /api/batch/scrape/{batchId}/retry. Only the failed items are re-queued — successful ones are untouched.

Quick Start


Polling Pattern

Batch jobs are asynchronous. Poll GET /api/batch/scrape/{batchId} every 2–5 seconds until status is a terminal value.
completed does not mean every URL succeeded. A batch is completed when all items have reached a terminal state (completed or failed). Always check failedCount and inspect individual item statuses.

Per-Item Results

Each item in the items array represents one URL:

Structured Output

Pass a schema to enforce a specific output shape across all URLs in the batch. The AI will return JSON matching your schema for every item.
When a schema is provided, output is automatically set to "json". The schema is validated before the batch is queued — a 422 is returned if it is malformed.

Structured Output Guide

Full guide on nested objects, arrays, nullable fields, and schema limits

Retrying Failed Items

When a batch completes with some failures, retry only those items — no need to re-run the whole batch:
The batch status resets to running and you poll the same batchId until it completes again. Successfully completed items are never touched.

Cancelling a Batch

Cancel a running or pending batch to stop processing and refund credits for items that have not started yet:
Items already running will complete normally. Only pending items are cancelled and refunded.

Proxy & Geo-Targeting

Apply stealth proxy routing to every URL in the batch with useProxy and proxyCountry:

Stealth Mode & Geo-Targeting

Full country list, EU rotation, and billing details

Cookies & Authenticated Pages

Pass session cookies to scrape pages behind a login. Cookies are never stored — they are passed ephemerally to the worker and discarded after processing.

Authenticated Scraping

Full guide on obtaining and formatting cookies

Submit a Batch

Full request reference

Get Batch Status

Polling and response shape

List Batches

See all your batch jobs

Cancel & Retry

Stop a batch or re-run failures