Submit a batch scrape job
spicrawl_batch_submitSubmit many URLs to be scraped as one asynchronous job, with shared settings applied to every URL. Give EITHER urls or items, not both (at least one URL, unless open is true). Returns the job object (id, status, estimated_credits, progress). Poll with spicrawl_batch_status, read with spicrawl_batch_results or spicrawl_batch_task_content. Use this instead of many spicrawl_scrape calls when you have tens or thousands of URLs. Set open: true to keep the job accepting more URLs via spicrawl_batch_add_items; an open job never finishes until you call spicrawl_batch_close.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "spicrawl_batch_submit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | A human label for the job. | |
| open | No | Keep the job accepting items after submission (append with spicrawl_batch_add_items, finish with spicrawl_batch_close). | |
| urls | No | Shorthand: URLs scraped with the shared settings and no per-item overrides. Mutually exclusive with `items`. | |
| wait | No | Milliseconds to wait after load (rendered scrapes). | |
| items | No | Long form: one /v1/scrape request object per item. Besides `url` and `external_id`, any /v1/scrape field (e.g. `js_render`, `wait_for`, `response_format`) overrides the shared setting for that item only. Mutually exclusive with `urls`. | |
| format | No | Output format for every item (`response_format`). spicrawl_batch_submit defaults to 'markdown', the same as spicrawl_scrape; an item's own `response_format` overrides it. 'json' returns the raw HTML document, not the markdown `content` and `sections` of spicrawl_scrape. | |
| render | No | Render every URL with a browser (`js_render`). | |
| max_cost | No | Ceiling in credits for ONE item (not the whole job — see credit_budget). | |
| priority | No | Scheduling priority of the job relative to your other jobs. | |
| wait_for | No | CSS selector to wait for before capturing (rendered scrapes). | |
| concurrency | No | Max items in flight at once for this job (may be capped by the server; see warnings). | |
| max_attempts | No | Per-item retry attempts on failure. | |
| credit_budget | No | Ceiling on the WHOLE job, in credits; the run aborts when it would exceed this. | |
| premium_proxy | No | Coming soon: not available yet, do not send. Use residential managed-pool exits for every URL. | |
| proxy_country | No | Coming soon: not available yet, do not send. ISO-3166 alpha-2 exit country; requires premium_proxy. | |
| custom_headers | No | Extra request headers sent with every URL. | |
| block_resources | No | Resource types to block while rendering, e.g. ["image","font","media"]. | |
| failure_threshold | No | Abort the job once this many items have failed. | |
| main_content_only | No | Strip each page to its main article. | |
| webhook_endpoint_id | No | Id of a registered webhook endpoint notified (with the job object) when the job completes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Job id. Pass it as `job_id` to the other spicrawl_batch_* tools. | |
| name | No | The label given at submission, if any. | |
| open | No | True while the job accepts appended items (it will not complete until closed). | |
| params | No | The job-level scrape settings as stored. | |
| status | No | Lifecycle: queued, running, paused, cancelling, completed, failed or cancelled. Keep polling while queued/running/paused/cancelling; stop at completed, failed or cancelled. | |
| priority | No | Effective scheduling priority. | |
| progress | No | Live item counters and the credits charged so far. | |
| warnings | No | Decisions made on the caller's behalf at submission (a clamped concurrency, items not yet queued). | |
| error_code | No | Machine code of a job-level failure. | |
| project_id | No | Project the API key belongs to. | |
| started_at | No | ISO-8601 time the first item started. | |
| status_url | No | API path to poll for this job: /v1/batch/{id}. | |
| concurrency | No | Effective per-job concurrency after the server's clamping. | |
| finished_at | No | ISO-8601 time the job reached a terminal status. | |
| results_url | No | API path of the job's results: /v1/batch/{id}/results. | |
| total_items | No | Number of items in the job. | |
| max_attempts | No | Effective attempts per item. | |
| submitted_at | No | ISO-8601 time the job was accepted. | |
| error_message | No | Human-readable job-level failure reason. | |
| estimated_credits | No | Credits reserved at submission (a hold, not a charge; compare with progress.credits_charged). | |
| failure_threshold | No | Failed-item count that aborts the job, when set. | |
| results_expire_at | No | ISO-8601 deadline after which results answer 410 Gone. | |
| cancel_requested_at | No | ISO-8601 time a cancel was accepted. | |
| estimated_credits_micro | No | Same as estimated_credits in micro-credits. |