Skip to main content
Replaces the v1 smartscraper endpoint. Provide a prompt (and optionally a JSON schema) and get typed JSON back — no selectors or post-processing needed.

Request body

Exactly one of url, html, or markdown must be supplied as the source.
string
URL of the page to extract from.
string
Raw HTML content to extract from (max 2 MB).
string
Markdown content to extract from (max 2 MB).
string
required
Natural-language description of what to extract.
object
JSON schema describing the desired output shape. When provided, the LLM is constrained to match it.
string
HTML pre-processing mode: "normal", "reader", or "prune".
array
Optional non-empty MIME allowlist for URL input. Omit it to allow every supported type; "all" and "*" are not accepted.
array
Optional processing configuration for URL input. Omit this field to use the 25-page PDF cap. You may also send {"type":"pdf"} and omit maxPages; it defaults to 25. Set maxPages only to override the default, using 1500, or -1 for no page limit. PDF processing costs 1 credit per page actually processed. See Configure PDF page limits for examples.
object
Fetch-time options. See the Scrape endpoint for the full field list (mode, stealth, headers, cookies, scrolls, wait, timeout, country). Ignored when html or markdown is supplied.

Example request

Example response

With a schema

Extract from HTML or markdown