Skip to main content
POST
Extract structured data from URLs

Authorizations

X-API-Key
string
header
required

Headers

Idempotency-Key
string

Any unique string up to 255 visible characters. Send the same key when you retry a request: for 12 hours a repeat returns the first answer again, with an Idempotent-Replayed: true header, without doing the work or charging a second time. A repeat that arrives while the first is still running gets 409 IDEMPOTENCY_IN_PROGRESS; the same key with a different body gets 409 IDEMPOTENCY_KEY_REUSED.

Maximum string length: 255
Example:

"3f2b8c1e-retry-safe-key"

Body

application/json
urls
string[]
required

The pages to extract from. Each must be an http(s) URL. A trailing /* marks a crawl scope: every page discovered under that path is extracted and merged into the result.

Maximum array length: 10
Example:
schema
object

JSON Schema describing the shape you want back. Optional if prompt is given; when both are present the schema fixes the field names and types while the prompt guides what to pull.

prompt
string

Natural-language instruction for what to extract. Use with or instead of a schema.

Maximum string length: 2000
Example:

"Pull the product name, price in USD, and whether it is in stock."

preferStructure
boolean

Preserve document structure (headings, lists, tables) over prose density when reading the page — good for listing and catalog pages. Default off.

Pull in extra source pages by web-searching your prompt, to fill fields your URLs do not cover. Requires a prompt.

showSources
boolean

Return the concrete list of URLs that were actually extracted, after any wildcard and web-search expansion. Default off.

showConfidence
boolean

For each field, return a confidence score and the exact source passage the value was drawn from. Default off.

mergeEntities
boolean

Merge the per-page results into one deduplicated collection — one row per entity, with its contributing source URLs — instead of a separate result per page. Default off.

maxAge
integer

Reuse a recent capture of each page if it is younger than this many milliseconds. Omit or 0 to always fetch fresh. Capped at 7 days.

Required range: 0 <= x <= 604800000
location
object

Fetch each page as if from this country and with these preferred languages, for sites that change prices or content by region.

headers
object

Extra request headers to send when fetching each page, such as a cookie that picks the store or delivery area a site prices by.

Example:

Response

The extracted data.

data
object
required