Product schema markup is the JSON-LD code that tells Google and AI assistants exactly what your product is called, what it costs, whether it's in stock, and how buyers rate it. Add it correctly and you become eligible for price and star-rating rich snippets in search, plus inclusion in AI shopping answers. Skip it and engines are left guessing at your data from raw HTML — a far weaker signal that rarely earns an enhanced listing.
This guide is the practical version: what to mark up, what to leave alone, how to ship it from a template, and how to validate before it goes live.
What Product schema is and why it matters for stores
Schema markup is a shared vocabulary — defined at schema.org — that turns your visible product page into structured, machine-readable data. Product structured data wraps your item in a Product type and attaches typed properties: name, image, brand, sku, an offers block, and optionally reviews.
Why bother? Three concrete payoffs:
- Rich snippets. Price, availability, and star ratings can appear directly in the search result. Listings with visible ratings and prices consistently pull higher click-through than plain blue links.
- Eligibility for shopping surfaces. Google's free merchant listings and shopping experiences read this data. No valid
offersblock, no entry. - AI shopping visibility. ChatGPT Shopping, Gemini, and Perplexity extract price, specs, and ratings from structured data when they build product recommendations.
Schema doesn't directly move rankings. What it does is make you eligible for result types that win clicks — and that's where the traffic lives. Pair it with strong on-page work from your product page SEO and the two compound.
Required and recommended properties
Here's where most stores over-complicate things. Google's documentation lists many properties, but only a handful are genuinely required to be eligible for a product rich result. Everything else is upside.
| Property | Status | Notes |
|---|---|---|
name |
Required | The product title, matching what shoppers see. |
image |
Required | High-res URL(s); multiple aspect ratios help. |
offers |
Required (for price snippet) | Must contain a valid Offer or AggregateOffer. |
offers.price |
Required within offers | Numeric, no currency symbol inside the value. |
offers.priceCurrency |
Required within offers | ISO 4217 code, e.g. INR, USD. |
offers.availability |
Recommended | Schema.org URL, e.g. https://schema.org/InStock. |
review / aggregateRating |
Recommended | Only with real, on-page reviews. |
brand, sku, gtin, mpn |
Recommended | Strong identifiers help matching and AI extraction. |
Getting the offers block right
The offers object is where most errors hide. A few rules that save you grief:
priceis a number, not a string with a symbol. Write"price": "2499.00", never"₹2,499". The currency belongs inpriceCurrency.availabilityuses the full schema.org URL. Common values:InStock,OutOfStock,PreOrder,BackOrder. Keep it accurate — a page markedInStockthat isn't will get your snippet suppressed.- Add
priceValidUntilfor offers with an expiry so Google knows when to re-check.
Getting availability right also matters for out-of-stock products SEO — the schema value should match what the page actually tells shoppers, and both should update the moment inventory changes.
Adding aggregateRating and review markup safely
Review stars are the single most eye-catching enhancement you can earn, and also the fastest way to get penalised. Google is strict here, so treat this section as a warning label.
The non-negotiable rules:
- Only mark up reviews genuinely collected on your site, from real customers, visible on the same page.
- Never invent, aggregate from third parties, or inflate ratings. Fabricated review markup is a spam violation and can trigger a manual action that removes rich results across your entire catalogue — not just the offending page.
aggregateRatingmust includeratingValueand a count (ratingCountorreviewCount). A rating with no count is invalid.- The rating shown in markup must match what a shopper sees. A hidden 4.9 while the page displays 3.8 is a mismatch Google will catch.
A safe aggregateRating looks like this: ratingValue of 4.6, bestRating of 5, and reviewCount of 128 — all reflecting numbers actually rendered on the page. Read Google's review snippet guidelines before you ship anything here; the specifics change and the penalties are real.
If you don't yet have real reviews, leave the rating fields out entirely. Partial-but-honest schema beats complete-but-fake every time.
JSON-LD implementation on product templates
Google recommends JSON-LD over microdata and RDFa for one simple reason: it lives in a single, self-contained <script> block instead of being smeared across your HTML attributes. That makes it far easier to generate, template, and debug.
The golden rule: build it into your product template once, populated from your product data, so every SKU inherits it automatically. Hand-coding schema per product doesn't scale past a dozen items and always drifts out of sync.
A minimal-but-complete block dropped into your product template:
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Trailhead Merino Wool Socks",
"image": ["https://store.example.com/img/socks-1.jpg"],
"description": "Cushioned merino hiking socks.",
"sku": "TRL-SCK-042",
"brand": { "@type": "Brand", "name": "Trailhead" },
"offers": {
"@type": "Offer",
"price": "899.00",
"priceCurrency": "INR",
"availability": "https://schema.org/InStock",
"url": "https://store.example.com/socks"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.6",
"reviewCount": "128"
}
}
Platform notes:
- Shopify themes ship basic Product schema, but the default is often thin — audit it and extend the offers and identifier fields rather than assuming it's complete.
- WooCommerce emits schema natively; a dedicated plugin gives you finer control over ratings and identifiers.
- Magento exposes structured data through its theme layer and extensions.
Whatever the platform, keep the JSON-LD values driven by the same source of truth as your visible page. Mismatches between markup and rendered content are the most common reason schema silently fails. This is a technical-SEO discipline as much as a content one — your ecommerce technical SEO checklist should include a schema audit on every template. Tracking whether these enhanced listings actually lift clicks is easy with DeployFlare's rank tracker, which segments movement by the pages you've marked up.
Validating with the Rich Results Test and fixing errors
Never push schema you haven't validated. Two tools do the job:
- Rich Results Test — paste a URL or code snippet and it tells you which rich result types you're eligible for, plus errors and warnings.
- Schema Markup Validator (validator.schema.org) — checks syntax against the full schema.org spec, useful for properties Google doesn't surface.
After launch, watch Search Console's Shopping and Product snippet enhancement reports. They flag issues at scale across your live pages — the errors that quietly suppress listings you'd never catch testing one URL at a time.
Common errors and their fixes:
| Error / warning | Cause | Fix |
|---|---|---|
Missing field price |
Empty or malformed offers | Ensure numeric price renders from product data |
Invalid availability value |
Wrong string, not a schema URL | Use https://schema.org/InStock etc. |
Missing aggregateRating count |
Rating without count | Add reviewCount or ratingCount |
| Markup / content mismatch | Schema shows data not on page | Sync markup to visible content |
Currency in price |
Symbol inside the value | Move symbol out; use priceCurrency |
One caveat worth internalising: passing the test only confirms eligibility, not display. Google decides per query whether to render enhanced results. Give newly marked-up pages days to weeks after they're indexed, and keep price and availability fresh.
Schema for AI search and shopping assistants
Structured product data is no longer just a Google-snippet play. AI shopping assistants — ChatGPT Shopping, Gemini, Perplexity — lean heavily on clean structured data to extract price, availability, specifications, and ratings when they build recommendations.
The reason is practical: parsing structured JSON-LD is dramatically more reliable than scraping product facts out of messy HTML. When an assistant needs to compare three pairs of hiking socks by price and rating, the store with accurate offers and honest aggregateRating is the one it can quote confidently.
To be AI-shopping-ready:
- Populate strong identifiers —
gtin,mpn,sku, andbrand. These let assistants match your product to the same item across the web. - Keep price and availability real-time accurate. Assistants that quote stale prices lose trust and stop citing sources that mislead them.
- Add rich
descriptionand spec detail so the model has substance to summarise.
Think of Product schema as the machine-readable spine of your catalogue. It feeds Google rich results, free shopping listings, and AI answers from a single source. Combine it with a clean ecommerce site structure so crawlers and assistants reach every product, and with disciplined category page SEO so your collection pages rank alongside the individual items. The stores winning AI shopping visibility right now aren't doing anything exotic — they've just made every SKU honest, complete, and machine-readable.