Product schema for web extraction
A product schema describes the fields you want back from a product page: its name, price, currency, availability, rating, and image. This is the single most common shape teams extract, because clean product data feeds price tracking, catalog building, competitive research, and inventory dashboards. Instead of writing brittle CSS selectors or XPath, you hand Extracto a schema that says what each field means, and the model fills it in from the rendered page. Describing a price as a number, rather than pointing at a specific element, is what keeps the extraction working after a redesign. The page can move things around, rename a class, or restructure its markup, and the same schema keeps returning the same fields. When a value genuinely is not on the page, the field comes back as null instead of a guess, so your pipeline can tell "out of stock" apart from "we could not find it" without manual review.
Fields in a Product schema
The fields teams most often extract for a product, what type each one is, and whether it is usually present.
| Field | Type | Required | Notes |
|---|---|---|---|
| name | string | yes | The product name as shown on the page, usually the main heading. Most extractions key everything else off this field, so it is marked required. |
| price | number | yes | The current numeric price, parsed as a number rather than a string, so you can sort, compare, and run math on it without first stripping currency symbols or thousands separators. |
| currency | string | optional | The currency the price is quoted in, ideally as an ISO 4217 code like USD or EUR. Keeping it separate from price avoids ambiguity when you aggregate listings from different regions. |
| availability | string | optional | A short stock status such as In stock, Out of stock, or Preorder. This is read from the page wording, so it reflects what shoppers actually see rather than a hidden inventory count. |
| rating | number | optional | The average customer rating as a number, typically on a five point scale. Useful for ranking products by quality signal when you build comparison tables or shortlists. |
| reviewCount | number | optional | How many reviews the product has, parsed as a number. Pairs with rating to weigh how trustworthy that score is, since a 5.0 from three people is not a 5.0 from three thousand. |
| sku | string | optional | The stock keeping unit or product identifier printed on the page. Handy as a stable key for deduplicating listings and joining against your own catalog records. |
| imageUrl | string | optional | The absolute URL of the main product image. Lets you build visual catalogs or thumbnails without downloading and rehosting every asset up front. |
The schema
Copy this and send it with any URL.
{
"name": "string",
"price": "number",
"currency": "string",
"availability": "string",
"rating": "number",
"reviewCount": "number",
"sku": "string",
"imageUrl": "string"
} Example output
Validated JSON back, matching the schema.
{
"name": "Aurora Wireless Mechanical Keyboard",
"price": 89.99,
"currency": "USD",
"availability": "In stock",
"rating": 4.6,
"reviewCount": 1284,
"sku": "AUR-KB-87",
"imageUrl": "https://example.com/img/aurora-keyboard.jpg"
} Try this product schema against a real page in the live demo, or read the docs to use it via the API.