How to Add JSON-LD Schema to E-commerce Product Pages: A 2026 Step-by-Step Guide
Add Product JSON-LD schema to e-commerce pages the right way in 2026: pricing, availability, ratings, validation, and Google's free listings.
Published August 30, 2026 · AEO Spotlight Editorial
How to Add JSON-LD Schema to E-commerce Product Pages (2026)
Product schema markup is structured data using the schema.org Product type, added to a product page as JSON-LD inside a script tag. Done correctly, it makes your pages eligible for rich results — the enhanced listings with star ratings, pricing, and availability that appear directly on Google.
TL;DR:
- Use the Product + Offer structure (price, availability) and AggregateRating for reviews.
- Put the script in the or of each product detail page.
- Always keep price, availability, and priceValidUntil in sync with the page.
- Validate with Google's Rich Results Test before shipping.
- Google Merchant Center free listings are a separate but complementary path.
Step 1: Confirm the Required Fields
Google's Product documentation requires a minimum set: name, image, and an offer with price and priceCurrency. Without these, the markup may not be eligible for rich results, even if it validates as JSON.
Step 2: Build the JSON-LD Block
Combine Product with an Offer and an AggregateRating:
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Example Product",
"image": "https://example.com/product.jpg",
"description": "A short product description.",
"brand": { "@type": "Brand", "name": "ExampleBrand" },
"offers": {
"@type": "Offer",
"price": "49.99",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"priceValidUntil": "2026-12-31"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.6",
"reviewCount": 212
}
}
Step 3: Place It on the Page
Add the script with type="application/ld+json" in the
or of the product detail page (PDP). Generate it per product from your CMS or a server-side template — never hand-write it for every SKU.Step 4: Keep Dynamic Fields in Sync
Google's 2026 algorithm penalizes mismatched prices more severely, so when price, availability, or other parameters change, update the markup immediately and refresh priceValidUntil. A price that differs between the page and the structured data erodes trust and eligibility.
Step 5: Validate Before Shipping
Run every template through Google's Rich Results Test and a schema validator. Validation is two-layered: the JSON must be well-formed, and the markup must actually be eligible for the rich feature you want.
A Note on Google Merchant Center
Product rich results and Merchant Center free listings are complementary. Google supports adding Product structured data, uploading data feeds via Merchant Center, or both. Schema markup is your best option when you cannot maintain feeds.
Frequently Asked Questions
What is JSON-LD? JSON-LD (JavaScript Object Notation for Linked Data) is a script-based format for structured data and Google's recommended way to add schema markup to pages.
Where do I put Product schema? In the
or of the product detail page as a