Extract API
Run CSS or server-configured LLM extraction over caller-supplied HTML without fetching or rendering.
Quick start
Use Extract when your workflow already has HTML and needs item-level JSON.
curl -X POST "$SPIDER_API_BASE/v1/extract" \
-H "Authorization: Bearer $SPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/blog",
"html": "<main><article class=\"post-card\"><h2>Example A</h2><a href=\"/blog/a\">Read</a></article><article class=\"post-card\"><h2>Example B</h2><a href=\"/blog/b\">Read</a></article></main>",
"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
Use a bearer token.
Create and manage product API keys in Product Console settings. The docs page itself is public.
Response shape
Structured items
JSON items extracted with the same allowlisted Crawl4AI schema used by Browser and Crawl.
No run
No run ID, artifacts, or audit trail are created for this synchronous supplied-HTML endpoint.
Zero render cost
The endpoint does not fetch or render, so usage reports zero runtime cost units in Phase 1.
Reference
Endpoint reference
OpenAPI-backed details for extraction schema, response shape, and validation errors.
OpenAPI endpoint details
Interactive schemas, request bodies, response objects, and public error contracts load here.
