Product AggregateRating Schema: Earn Review Stars (2026)
Earn review stars with Product AggregateRating schema: eligibility rules, self-serving review limits, required properties and how to test the markup safely.
Kazi Khalid Hasan Tamim · BugViso Team
16 min read
To earn review stars in Google search results, add AggregateRating schema (or Review) inside valid Product JSON-LD with an Offer. Base the rating on genuine reviews shown on the same page.
Google's review guidelines also make "self-serving" reviews on LocalBusiness and Organization pages ineligible for star display. If the markup basics are new, read what schema markup is first.
Google enforces strict algorithmic and manual guidelines for review markup. Ratings must represent authentic user reviews collected directly on the page.
Third-party syndicated reviews must be explicitly identified. "Self-serving" reviews on LocalBusiness or Organization types are permanently ineligible for rich snippet display.
Product (root entity)
name, image, description, sku, gtin13, brand
offers (Offer)
price, priceCurrency, availability, priceValidUntil
aggregateRating (AggregateRating)
ratingValue, reviewCount, bestRating, worstRating
review (array of Review)
author (Person), reviewRating (Rating), reviewBodyWhen Googlebot crawls an e-commerce product URL, it validates the relationship between the parent Product entity and its active Offer.
It also checks the mathematical consistency of the AggregateRating values. Any discrepancy between the JSON-LD payload and visible rendered text will disqualify the page from earning rich snippet stars.
1. The Underlying Execution Mechanics of Review Snippets
Search engines do not render review stars simply because an AggregateRating object exists in the HTML.
Ratings also matter for AI shopping answers: in our AI visibility for ecommerce sample, only 16 of 46 product pages exposed an aggregate rating in markup.
A review snippet passes four checks in order:
- Syntax validation: the JSON-LD must be valid JSON with correct Schema.org types.
- Mathematical integrity:
ratingValuemust sit betweenworstRatingandbestRating. - Policy and trust filters: the markup must not be self-serving (see below).
- SERP rendering: only then can Google show the star badge in the snippet.
1. Mathematical and Structural Consistency
Google's validation rules on the numerical properties are strict:
| Property | Rule | Default if omitted |
|---|---|---|
ratingValue | Numeric average score, for example 4.8 | None; required |
bestRating | Maximum score. Declare it if your scale is not 1 to 5 | 5 |
worstRating | Minimum score | 1 |
reviewCount | Ratings that come with written reviews | None |
ratingCount | Total number of ratings, including star-only votes | None |
Declare at least one of reviewCount or ratingCount.
If a page declares a ratingValue of 5.2 on a 5-point scale, or if reviewCount is set to 0, the entity is flagged as invalid, and rich snippets are suppressed.
2. The Self-Serving Review Policy (The 2019 Algorithm Shift)
In September 2019, Google updated its review snippet guidelines to combat widespread manipulation where local businesses and corporate entities marked up their own homepages with 5-star ratings.
Under current search engine policies:
- Eligible Entities:
Product,SoftwareApplication,Book,Course,Event,Game,Movie,MusicRecording,Recipe. - Ineligible (Self-Serving):
LocalBusiness,Organization.
If an agency, medical practice, or SaaS enterprise attempts to attach an AggregateRating directly to its Organization or LocalBusiness schema, Google silently ignores the markup. Review stars can only be earned if the review specifically evaluates a discrete, purchasable item or software product.
The same rule applies to branch pages; see LocalBusiness schema for multiple locations. For why JSON-LD is the default format, see JSON-LD vs Microdata vs RDFa.
2. AggregateRating Schema: Production Implementation and Code
The following JSON-LD script represents a complete, production-grade implementation compliant with Google's 2026 Merchant Center and Search requirements, incorporating Product, Offer, AggregateRating, individual Review nodes, and hasMerchantReturnPolicy:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"@id": "https://example.com/products/apex-mechanical-keyboard/#product",
"name": "Apex Pro Wireless Mechanical Keyboard",
"image": [
"https://example.com/images/products/keyboard-front-1x1.jpg",
"https://example.com/images/products/keyboard-angle-4x3.jpg",
"https://example.com/images/products/keyboard-lifestyle-16x9.jpg"
],
"description": "Ultra-low latency wireless mechanical keyboard with hot-swappable optical switches and aircraft-grade aluminum frame.",
"sku": "KB-APX-PRO-01",
"gtin13": "0850012345678",
"mpn": "APX-KB-99",
"brand": {
"@type": "Brand",
"name": "Apex Hardware"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.8",
"reviewCount": "246",
"bestRating": "5",
"worstRating": "1"
},
"offers": {
"@type": "Offer",
"@id": "https://example.com/products/apex-mechanical-keyboard/#offer",
"url": "https://example.com/products/apex-mechanical-keyboard",
"priceCurrency": "USD",
"price": "189.99",
"priceValidUntil": "2027-12-31",
"itemCondition": "https://schema.org/NewCondition",
"availability": "https://schema.org/InStock",
"seller": {
"@type": "Organization",
"name": "Apex Official Store"
},
"hasMerchantReturnPolicy": {
"@type": "MerchantReturnPolicy",
"applicableCountry": "US",
"returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
"merchantReturnDays": 30,
"returnMethod": "https://schema.org/ReturnByMail",
"returnFees": "https://schema.org/FreeReturn"
},
"shippingDetails": {
"@type": "OfferShippingDetails",
"shippingRate": {
"@type": "MonetaryAmount",
"value": "0.00",
"currency": "USD"
},
"shippingDestination": {
"@type": "DefinedRegion",
"addressCountry": "US"
},
"deliveryTime": {
"@type": "ShippingDeliveryTime",
"handlingTime": {
"@type": "QuantitativeValue",
"minValue": 0,
"maxValue": 1,
"unitCode": "DAY"
},
"transitTime": {
"@type": "QuantitativeValue",
"minValue": 2,
"maxValue": 4,
"unitCode": "DAY"
}
}
}
},
"review": [
{
"@type": "Review",
"reviewRating": {
"@type": "Rating",
"ratingValue": "5",
"bestRating": "5"
},
"author": {
"@type": "Person",
"name": "Marcus Vance"
},
"datePublished": "2026-08-14",
"reviewBody": "Exceptional switch responsiveness and the battery life easily surpasses 80 hours with RGB disabled. Build quality is flawless."
},
{
"@type": "Review",
"reviewRating": {
"@type": "Rating",
"ratingValue": "4",
"bestRating": "5"
},
"author": {
"@type": "Person",
"name": "Elena Rostova"
},
"datePublished": "2026-07-29",
"reviewBody": "Great typing acoustics and tactile feedback. The companion configuration software on Linux requires slight manual setup."
}
]
}
</script>3. Dynamic Next.js 15 Implementation Blueprint
In high-scale headless e-commerce architectures, products are rendered dynamically from headless CMS platforms (Shopify Storefront API, BigCommerce, or PostgreSQL backends).
The TypeScript component below demonstrates a server-rendered Next.js 15 implementation that computes AggregateRating dynamically from active customer reviews and injects an isolated JSON-LD script block:
// components/seo/ProductSchema.tsx
import React from 'react';
interface ReviewItem {
id: string;
authorName: string;
rating: number;
body: string;
publishedAt: string;
}
interface ProductSchemaProps {
product: {
id: string;
title: string;
slug: string;
sku: string;
gtin?: string;
description: string;
images: string[];
price: number;
currency: string;
inStock: boolean;
brand: string;
reviews: ReviewItem[];
};
}
export function ProductSchema({ product }: ProductSchemaProps) {
const reviewCount = product.reviews.length;
// Calculate average rating with single decimal precision
const averageRating = reviewCount > 0
? (product.reviews.reduce((acc, r) => acc + r.rating, 0) / reviewCount).toFixed(1)
: null;
const schema: Record<string, any> = {
'@context': 'https://schema.org',
'@type': 'Product',
'@id': `https://example.com/products/${product.slug}/#product`,
name: product.title,
image: product.images,
description: product.description,
sku: product.sku,
brand: {
'@type': 'Brand',
name: product.brand
},
offers: {
'@type': 'Offer',
price: product.price.toFixed(2),
priceCurrency: product.currency,
availability: product.inStock
? 'https://schema.org/InStock'
: 'https://schema.org/OutOfStock',
url: `https://example.com/products/${product.slug}`
}
};
if (product.gtin) {
schema.gtin13 = product.gtin;
}
// Only inject aggregateRating if authentic reviews exist
if (averageRating && reviewCount > 0) {
schema.aggregateRating = {
'@type': 'AggregateRating',
ratingValue: averageRating,
reviewCount: reviewCount.toString(),
bestRating: '5',
worstRating: '1'
};
// Serialize up to 5 most recent individual reviews
schema.review = product.reviews.slice(0, 5).map(rev => ({
'@type': 'Review',
author: {
'@type': 'Person',
name: rev.authorName
},
datePublished: rev.publishedAt,
reviewBody: rev.body,
reviewRating: {
'@type': 'Rating',
ratingValue: rev.rating.toString(),
bestRating: '5'
}
}));
}
return (
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
/>
);
}This pattern ensures that pages with zero reviews do not output empty or zeroed AggregateRating blocks, which would violate Google's quality standards.
4. Handling Complex Edge Cases: Variants, Currency & Syndication
Enterprise e-commerce catalogs introduce complex architectural requirements that break simplistic schema setups.
A variant product uses this shape. The parent Product holds one AggregateOffer (for example lowPrice 79.00, highPrice 129.00, priceCurrency USD, offerCount 3).
That in turn lists one discrete Offer per variant (Black, White, Pro).
1. Multi-Variant Products (AggregateOffer)
When a single product detail page (PDP) hosts multiple SKUs (sizes, colors, or hardware tiers) with varying prices, declaring a single Offer causes price mismatch errors in Google Search Console.
Instead, use AggregateOffer to declare the price span alongside discrete variant offers:
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Apex Custom Ergonomic Chair",
"sku": "CHAIR-APX-BASE",
"offers": {
"@type": "AggregateOffer",
"lowPrice": "349.00",
"highPrice": "599.00",
"priceCurrency": "USD",
"offerCount": "4",
"offers": [
{
"@type": "Offer",
"sku": "CHAIR-APX-FABRIC-GREY",
"name": "Fabric Grey Edition",
"price": "349.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
},
{
"@type": "Offer",
"sku": "CHAIR-APX-LEATHER-BLACK",
"name": "Premium Leather Black Edition",
"price": "599.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
}
]
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.7",
"reviewCount": "89"
}
}2. Syndicated Reviews from Third-Party Platforms
If your customer reviews come from external platforms (such as Trustpilot, Bazaarvoice or Yotpo), Google allows them in your product schema only if the reviews directly evaluate that specific product.
You must never syndicate store-level service reviews (e.g., shipping speed or customer support responsiveness) into a product's AggregateRating. Store-level reviews belong under third-party profiles, not product rich snippets.
5. Automated Python Schema Audit & Parity Verifier
To prevent manual penalties caused by discrepancies between structured data and rendered page text, developers can run this standalone automated auditor. It uses BeautifulSoup to extract the AggregateRating and compares it directly against the visible text on the page:
# scripts/verify_product_schema.py
import sys
import json
import httpx
from bs4 import BeautifulSoup
def verify_product_page(url: str):
print(f"[*] Fetching live HTML from: {url}")
headers = {"User-Agent": "BugVisoSchemaValidator/1.0 (+https://bugviso.com)"}
res = httpx.get(url, headers=headers, follow_redirects=True, timeout=12.0)
if res.status_code != 200:
print(f"[!] Request failed with status code {res.status_code}")
return False
soup = BeautifulSoup(res.text, "html.parser")
scripts = soup.find_all("script", type="application/ld+json")
product_found = False
for script in scripts:
if not script.string:
continue
try:
data = json.loads(script.string)
except json.JSONDecodeError:
print("[X] Syntax Error: Corrupted JSON-LD found on page.")
continue
items = data.get("@graph", [data]) if isinstance(data, dict) else data
for item in items:
if item.get("@type") == "Product":
product_found = True
name = item.get("name")
agg = item.get("aggregateRating")
offers = item.get("offers")
print(f"[✓] Detected Product: '{name}'")
if not offers:
print("[X] Critical: Missing required 'offers' entity!")
else:
price = offers.get("price") if isinstance(offers, dict) else "Multi-Offer"
currency = offers.get("priceCurrency") if isinstance(offers, dict) else ""
print(f" - Price: {price} {currency}")
if not agg:
print("[!] Warning: No AggregateRating found. Review stars will not render.")
else:
val = agg.get("ratingValue")
count = agg.get("reviewCount") or agg.get("ratingCount")
print(f" - Rating: {val} / {agg.get('bestRating', 5)} (from {count} reviews)")
# Verify rating appears in visible text
if str(val) not in soup.get_text():
print(f"[!] Warning: ratingValue '{val}' was not found in visible body text!")
print(" Google algorithms may flag this as a deceptive content mismatch.")
else:
print(f" [✓] Verified: ratingValue '{val}' matches visible text.")
if not product_found:
print("[X] Error: No schema entity with @type 'Product' was detected.")
return False
return True
if __name__ == "__main__":
target = sys.argv[1] if len(sys.argv) > 1 else "https://example.com/products/sample"
verify_product_page(target)6. How BugViso Audits Product Schema
BugViso's structured data check parses the JSON-LD on every crawled page and validates it against the required and recommended properties for each type. For product pages that covers:
- Product: it requires
name,imageandoffers, and flags a missingdescription,brand,aggregateRatingorreviewas recommended. - Offer and AggregateOffer: it flags a missing
price,lowPriceorpriceCurrency, the properties Google needs for a price rich result. - AggregateRating: it requires
ratingValueand recommendsreviewCount,bestRatingandworstRating. - Fixes: each finding comes with an AI-written JSON-LD fix in the report, and the advice says to add
aggregateRatingorreviewonly when the page shows genuine customer reviews.
BugViso does not compare schema prices against the visible page text or detect self-serving review markup, so keep the script above for those two checks. You sign in to run a scan; see the structured data and duplicate content checks for what it tests.
7. Common Implementation Traps & Edge Cases
Avoid these frequent engineering oversights when deploying Product and AggregateRating markup:
1. The Zero Review Placeholder Bug
Templating systems often render default schema blocks when a product has zero reviews:
// ❌ Anti-Pattern: Google will reject this as invalid structured data
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "0",
"reviewCount": "0"
}If a product has no customer reviews, omit the aggregateRating property entirely. Only render the object once at least one legitimate review has been submitted.
2. Formatting Prices with Currency Symbols
Google's parser requires the price property to be a raw numeric string or float. Including currency symbols ($, €, £) breaks parsing:
// ❌ Broken: Currency symbol causes schema parse failure
"price": "$189.99",
"priceCurrency": "USD"
// ✅ Fixed: Clean numeric float with separate ISO-4217 currency code
"price": "189.99",
"priceCurrency": "USD"For practical steps on troubleshooting broader structured data issues, consult our walkthrough on how to earn rich snippets with schema markup.
8. Frequently Asked Questions
Can I earn review stars on a SaaS pricing or feature page?
Yes, provided you use the SoftwareApplication or Product entity type. You cannot use WebSite or Organization to earn review stars. Ensure the page visibly displays customer reviews or links to an authentic review collection system.
What is the difference between reviewCount and ratingCount?
reviewCount represents the number of reviews that include written text comments. ratingCount is the total count of ratings, including star-only submissions without text. Google accepts either property, but reviewCount is strongly recommended when written reviews are rendered on the page.
Why did my review stars suddenly disappear from Google SERPs?
Review stars can disappear if: (1) Google detected a discrepancy between the JSON-LD score and visible text; (2) the markup was deemed self-serving; (3) Google no longer shows stars for that query, since display is never guaranteed; or (4) a syntax error was introduced in a recent deployment.
Can I markup reviews collected on third-party sites like Google Maps?
Be careful. Review markup should describe reviews your visitors can see on the page, and ratings should come from your own users. Do not copy ratings from Google Maps or other sites into your markup. Check Google's current review snippet guidelines before marking up reviews collected on a third-party platform.
Does Product schema help with Google Shopping free listings?
It can. Accurate offers, gtin13, sku and hasMerchantReturnPolicy markup can make product pages eligible for Google's merchant listing experiences. Google documents the exact requirements, and a Merchant Center feed is a separate route you may still want.
9. Conclusion
Implementing compliant Product and AggregateRating schema for review stars can make plain listings eligible for star ratings, but Google decides when to show them.
Follow the self-serving review policy, keep price and stock aligned with visible content and render clean JSON-LD on the server. An automated BugViso scan checks the markup across your catalog.
Written by
Kazi Khalid Hasan Tamim · BugViso Team
Kazi writes BugViso’s guides on website audits, Core Web Vitals, technical SEO, accessibility and AI search. The data in them comes from audits BugViso runs in a real Chromium browser, including our 219-site study of website health.
Summarise with AI
Open this guide in your assistant.
Follow BugViso
New guides and audit data as we publish them.
AI visibility tracker
Is your brand in AI answers?
See how often AI assistants mention you, cite your site and rank you against your competitors.
- ChatGPT
- Gemini
- Perplexity
- Claude
- AI Overviews
See where your site stands
Run a free BugViso audit for SEO, speed, accessibility and AI search readiness — with fixes you can ship today.