Glossary
What is structured data extraction?
Structured data extraction pulls specific fields such as prices, names and dates out of webpages and returns them as machine-readable JSON.
Copy as MarkdownOpen in ChatGPT (opens in a new tab)Open in Claude (opens in a new tab)
Structured data extraction is the process of pulling specific fields, such as prices, names, dates and specifications, out of unstructured webpages and returning them as machine-readable JSON. Traditionally done with brittle CSS selectors written for each site, it is now commonly done by describing the fields you want in a JSON schema or a plain-language prompt and letting a model locate them on the page.
From pages to fields
Most web content is written for people: an article, a product page, a filing. Structured data extraction turns that prose and layout into rows and fields a program can use. The product page becomes an object with a name, a price and availability. The job posting becomes title, company, location and salary. The output is typically JSON, ready for a database, a spreadsheet or another API call.
It complements full-content extraction and does not replace it. When a model needs to read a page, you want clean markdown. When a pipeline needs specific values from many pages, you want fields. For the prose side, see HTML to markdown conversion.
The old way: selectors
The traditional approach maps each field to a CSS selector or an XPath expression: "the price lives at .product-price span". It is fast and deterministic, but every site needs its own set of selectors, and a redesign breaks them without warning. For teams that maintain parsers for many sites, that upkeep is a large share of the cost of scraping.
The new way: schema-guided extraction
Extraction with a language model turns the problem around. Instead of telling the system where the data lives, you describe what you want, and a model finds it in the page content, whatever the markup. Two forms are common:
- A JSON schema that defines the fields, types and structure you expect. The extractor returns JSON that conforms to it, which you can validate.
- A plain-language prompt, such as "extract the author, the publication date and the key claims", for quicker and looser extraction.
Schema-guided extraction trades determinism for generality: one schema can cover many sites. The trade is real. A model can return a value that fits the schema and is still wrong, or fill a field the page never stated, so check extracted values against the source when they matter.
Where it shows up
Price and competitor monitoring, lead enrichment, research agents that tabulate findings across sources, and filling knowledge bases with LLM-ready data are the common cases. It fits anywhere the question is "what are the values?" and not "what does it say?"
Where MillionShort fits
Extract returns a page you name as JSON of your shape: send json with a schema and an optional prompt, for up to three URLs a call, on Starter and up. A crawl takes the same json for every page of a site. It costs 3 credits a page on top of the fetch.
What a search does return is structured in a fixed way: every result is a JSON object with the same fields, including title, url, site, source, snippet, page_type, topic, popularity and risk, plus an extra object for details that a source supplies. Those are attributes of the result, not values extracted to your schema. To get fields of your own from a result's page, pass its URL to Extract with json.