Extract structured data with your own schema
extract_dataExposes POST /extract. Reads the page and fills an object YOU define:
pass fields, each with a name, a type and a description of what to take
from the page, and get back exactly those keys in that order. Anything the
page does not give comes back null — values are never guessed.
Types: string, number, integer, boolean, date, datetime, url, email, object (with its own
fields) and array (with items). Use it for product details, prices,
contact data, job listings, event dates, lists of items with several
attributes each. 24 credits: it reads the
whole page with an AI model, so prefer extract_metadata when the standard
metadata is all you need.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The page to fetch. Must be a public http(s) URL. | |
| sync | No | Wait for the result and return it (default false). When false the call returns a token immediately and you collect the result with get_result. | |
| fields | Yes | The fields to extract, at most 50 in all. | |
| labels | No | Your own keys to find this request by later, e.g. {"client": "acme"}: they come back with the result, in the webhook and in list_requests, which can filter by them. Up to 16 keys of up to 40 letters, digits, _ - or .; string values up to 256 characters. | |
| max_age | No | How fresh a stored result must be to be reused, e.g. "2 hours" or "3 days". Default 7 days, maximum 30. A reused result is free. Pass "0" to force a fresh fetch. | |
| report_to | No | Async only: a webhook URL to deliver the result to. Defaults to the project's configured endpoint, if it has one. | |
| project_id | Yes | Which project this request belongs to. From list_projects. | |
| residential | No | Fetch the page from a residential (home ISP) exit instead of a datacentre one. Costs a surcharge per page visit — see get_usage. Use it for sites that block datacentre traffic. | |
| instructions | No | Optional guidance that applies to every field, e.g. "prices in EUR". | |
| page_options | No | What to do to the page before anything is read off it. Applies to the result itself: removed ads and banners are gone from html, markdown and summaries too, and what scrolling loaded is in all of them. | |
| idempotency_key | No | Makes the call safe to retry: sending it again with the same key within 24 hours returns the first call's token and result instead of starting (and charging for) new work, even with max_age "0". Up to 255 printable ASCII characters; a UUID is ideal. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||