Core
Extract

POST /v1/extract

Extract structured data from a URL or HTML string.

Without a schema, runs the free JSON-LD cascade (JSON-LD → Open Graph → regex). No LLM cost. The result carries _completeness, _extraction_method and _provenance.

With a schema, uses an LLM to extract data matching your exact JSON structure. The model is chosen automatically from your plan and the complexity flag.

You can pass a url (the API fetches it for you), a urls array for many pages at once, raw html, or pre-converted markdown.

Multi-URL mode

Pass urls: string[] to extract from many pages in one call. The response is { results: [{ url, ok, data?, error? }], summary: { total, ok, failed } } instead of a single object. Invalid URLs are rejected up front with a 400 listing them in invalidUrls.

The number of URLs per call is capped by your plan (request_caps.extract_urls in GET /v1/pricing): Free 10, Hobby 50, Pro 200, Scale 500. More than that returns 400 with code: "too_many_urls" and the limit that applies. URLs run 5 at a time.

Request

POST /v1/extract
Content-Type: application/json
x-api-key: YOUR_KEY

Body

FieldTypeRequiredDefaultDescription
urlstringConditionalURL to fetch and extract. Required if html/urls is not provided.
urlsstring[]ConditionalExtract from many URLs in one call (up to your plan's extract_urls cap). Returns { results[], summary } instead of a single object.
htmlstringConditionalRaw HTML to extract from. Skips the fetch step. Required if url is not provided.
markdownstringNoPre-converted markdown. If omitted alongside html, the engine converts HTML automatically.
schemaobjectNoJSON schema describing the structure to extract. When omitted, free JSON-LD cascade runs. Limits below.
complexity"low" | "high"No"low"Extraction complexity. "high" routes to a stronger model.

Example: schema-free (JSON-LD cascade)

curl -X POST https://api.superscraper.dev/v1/extract \
  -H "x-api-key: ss_live_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.iana.org/about"}'

Example: schema extraction

curl -X POST https://api.superscraper.dev/v1/extract \
  -H "x-api-key: ss_live_xxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.iana.org/about",
    "schema": {
      "type": "object",
      "properties": {
        "organization_name": { "type": "string" },
        "mission": { "type": "string" },
        "functions": {
          "type": "array",
          "items": { "type": "string" }
        },
        "parent_organization": { "type": "string" }
      }
    },
    "complexity": "low"
  }'

Response

Schema-free response

Returns the listing extraction result directly. The page in the example above has no schema.org markup, so the text cascade finds only a name and description:

{
  "url": "https://www.iana.org/about",
  "data": {
    "name": "About IANA",
    "description": "...The Internet Assigned Numbers Authority (IANA) maintains the authoritative public registries that record these allocations and definitions...",
    "_completeness": 0.215,
    "_extraction_method": "regex-cascade",
    "_provenance": "regex-cascade"
  }
}

A business page that publishes schema.org JSON-LD fills many more fields:

{
  "url": "https://www.example-directory.example/coffee-roasters/portland",
  "data": {
    "name": "Northside Coffee Roasters",
    "phone": "(503) 555-0142",
    "address": "2210 N Williams Ave",
    "city": "Portland",
    "state": "OR",
    "zip": "97227",
    "rating": 4.6,
    "review_count": 189,
    "_completeness": 0.87,
    "_extraction_method": "json-ld",
    "_provenance": "json-ld"
  }
}

Schema extraction response

{
  "url": "https://www.iana.org/about",
  "data": {
    "organization_name": "Internet Assigned Numbers Authority (IANA)",
    "mission": "To maintain the authoritative public registries of globally coordinated Internet technical identifiers...",
    "functions": [
      "Maintaining authoritative public registries of technical identifiers and their definitions",
      "Processing requests for identifier allocations",
      "Operating systems used to publish registries and associated data"
    ],
    "parent_organization": "Public Technical Identifiers (PTI), an affiliate of ICANN"
  },
  "schema": {
    "type": "object",
    "properties": {
      "organization_name": { "type": "string" },
      "mission": { "type": "string" },
      "functions": { "type": "array", "items": { "type": "string" } },
      "parent_organization": { "type": "string" }
    }
  },
  "metadata": {
    "model": "standard",
    "provider": "primary",
    "latencyMs": 1858
  },
  "_provenance": {
    "model": "standard"
  }
}

"model": "advanced" means a larger model ran, usually because you sent complexity: "high". "provider": "fallback" means a backup endpoint served the call. Neither field is a vendor name.

Errors

StatuscodeMeaningCharged
400schema_too_largeThe schema is over a limit (below). Nothing ran.No
422extract_failedThe page could not be fetched.No
422extraction_failedThe model answered, but not with valid JSON for your schema. Retry, or simplify the schema.No
503extraction_unavailableThe extraction model is temporarily unavailable. Retry later; extraction without a schema still works.No

With urls, a URL that fails is a row with ok: false, an error and (for the last two cases) the same code. The call still answers 200, and only the URLs that returned data are charged.

Schema limits

A schema is sent to the model with every page, so its size is capped before anything runs:

LimitValue
Size32 KB of JSON
Nesting16 levels (in full JSON Schema form a nested object uses two levels, properties and the field)
Fields200 named fields across the whole schema (JSON Schema keywords such as type and description do not count)

A larger extraction can be split into several requests with smaller schemas.

Credits

CallCredits
No schema (JSON-LD / Open Graph cascade)0. Never refused for a zero balance.
With schema1 per URL that returned data, plus model usage. A failed extraction is not charged.

The model is picked for you. You do not choose a provider or model name. The response names the tier (standard or advanced) and whether a backup served (primary or fallback), not the vendor, and it does not report per-call cost.