Ask for the fields your application needs
Structured extraction appends a typed data object to a single Data API request. You can specify fields like title, numeric price, and URL, or utilize an existing active recipe. Design the schema with the downstream use case in mind: attempting to store every possible field complicates validation and upkeep.
Supported scalar types include string, number, integer, boolean, date, and URL. Lists use multiple; object collections describe repeated records with scalar fields. Nested object collections are not supported.
A small product schema
This illustrative request asks for a product title and price. It is a starting schema, not a promise that the example target contains a product. Validate it against a target you are authorized to collect.
{
"url": "https://example.com/product",
"mode": "auto",
"extraction": {
"fields": [
{ "name": "title", "type": "string", "required": true },
{ "name": "price", "type": "number", "required": true }
]
}
}Page completion and extraction validity are different checks
Read the returned data and extraction run state. Confirm required fields, types, currency context, and record identity before writing to a database. A completed page acquisition is not evidence that the extracted values are correct.
Use individual submissions for structured extraction: Data API batches accept raw scrape jobs only. Reuse recipes for repeatable targets and re-check representative pages after layout changes.