SpideyDataAPI Reference
API navigation Extract

Extract API

Extract structured data from supplied HTML using CSS selectors or configured LLM extraction. The Extract API does not fetch or render web pages.

On this page

Extract API endpoints

1

Find the task you need. Each endpoint includes its parameters, request example, and response reference.

Extract structured data from HTML

Supply HTML and an extraction configuration to obtain structured fields without fetching another page.

Quick start

Use Extract when your workflow already has HTML and needs item-level JSON.

API base https://kieapi.com
curl -X POST "https://kieapi.com/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}" }
      ]
    }
  }'

From HTML to structured data for agents — Separate acquisition from extraction and validate the returned record.

Designing bounded crawls for production — Keep page provenance when collecting a larger dataset.

Authentication

Use a bearer token.

Team administrators manage API keys in Team Settings. Each key keeps its Team and billing scope when its creator leaves or switches Teams. Keys cannot manage members, billing or other keys. Public /v1 requests use Authorization: Bearer $SPIDER_API_KEY only; the Key's fixed Team is the payer. An optional X-Spider-Team-Id must match that Team or the request is denied. Creating, listing, rotating or revoking Keys through the product console (and other non-identity console business routes) requires X-Spider-Team-Id when the Team model is enabled; omitting it returns HTTP 409 team_context_required.

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.