Start free

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.

Product schema: FAQ

What if a product has no price on the page?
Extracto returns null for that field rather than guessing. Because the output is validated against your schema before it is returned, you can trust that a present price is a real one taken from the page, and you can handle nulls explicitly in your pipeline instead of filtering out fabricated values later.
Can I extract from large retail sites like Amazon or eBay?
Yes. Aggressive storefronts like Amazon and eBay are handled by Extracto's managed anti-bot bypass layer: every request runs through a real headless browser with proxies handled for you, so anti-bot-protected and JavaScript-rendered product pages still render. A field is null only when it is genuinely absent from the page. The exception is login-gated content that needs session cookies, available on Enterprise, and you should respect each site's terms of service.
Why extract price as a number instead of a string?
A numeric price is immediately usable. You can sort listings, compute differences, and trigger alerts without writing cleanup code to strip currency symbols, spaces, or thousands separators. Keeping the currency in its own field removes ambiguity when you combine products priced in different currencies across regions.
Will the schema keep working after the site redesigns?
That is the main reason to use a schema instead of selectors. You describe what a field means, not where it sits in the markup, so a layout change, renamed class, or restructured page usually does not break extraction. If a field disappears from the page entirely, you get null for it rather than a silent wrong value.
How do I start without a credit card?
The free plan covers 100 pages and needs no credit card, which is enough to test this product schema against real pages and confirm the fields come back the way you expect. When you are ready for higher volume, paid plans start at 35 dollars per month. You can validate the whole flow, output shape and all, before you pay anything.