Crawl API
Create asynchronous crawls, check job status, and page through crawl results.
Quick start
Create a crawl with 1 to 100 HTTP(S) seed URLs without URL userinfo. Public Crawl requires a materialized plan before quota reservation; then poll status and list results by crawl ID. scope defaults to same_hostname. same_hostname follows only the exact hostname. same_domain follows hosts sharing the same registrable domain, including subdomains. same_origin additionally requires the same scheme and effective port. all accepts any valid HTTP(S) URL.
curl -X POST "$SPIDER_API_BASE/v1/crawl" \
-H "Authorization: Bearer $SPIDER_API_KEY" \
-H "Idempotency-Key: crawl-example-01" \
-H "Content-Type: application/json" \
-d '{
"urls": ["https://example.com/blog"],
"max_depth": 1,
"scope": "same_hostname",
"browser": {
"wait_for_selector": ".post-card",
"process_iframes": true,
"flatten_shadow_dom": true,
"virtual_scroll": {
"container_selector": ".feed",
"scroll_count": 5
}
},
"extraction": {
"type": "json_css",
"schema": {
"name": "blog_posts",
"base_selector": ".post-card",
"fields": [
{ "name": "title", "selector": "h2", "type": "text", "transform": "strip" },
{ "name": "path", "selector": "a", "type": "attribute", "attribute": "href" }
]
},
"computed_fields": [
{ "name": "url", "operation": "template", "template": "https://example.com{path}" }
]
}
}'Authentication
Create and manage product API keys in Product Console settings. The docs page itself is public.
Response shape
Accepted job metadata with IDs used by status and results endpoints.
Public crawl may use the same browser wait, iframe, shadow DOM, and virtual_scroll behavior controls while remaining an asynchronous job API.
Progress, terminal state, counters, and failure information.
Paginated public page results created by the crawl.
GET /v1/crawl/{crawl_id}/items returns extracted records with source page provenance.
Use crawl.diagnostics.block_reasons for crawl blocked diagnostics, crawl.diagnostics.retry.categories for retry taxonomy, items[].diagnostics.adaptive_extraction for selector memory / adaptive extraction diagnostics, items[].diagnostics.browser_debug for sanitized browser debug capture counts, and items[].diagnostics.browser_failure for sanitized browser failure category/stage diagnostics.
Endpoint reference
OpenAPI-backed details for crawl creation, status polling, result pagination, and errors.
Interactive schemas, request bodies, response objects, and public error contracts load here.
