AggregateRating Schema — Star Ratings in Google
AggregateRating is the summary of many people's ratings: the average score and how many ratings it's based on. Google uses it for review snippets, the star ratings under a search result.
Generate AggregateRating JSON-LDWhy star ratings don't show up
- The rating is on a business’s own site about itself, which Google excludes for LocalBusiness and Organization.
- The markup has a rating but no ratingCount or reviewCount.
- The rating in the markup isn’t visible anywhere on the page.
- The item type isn’t one Google supports for review snippets.
How SwiftSchema helps
The generator below nests AggregateRating inside the item it rates, so you only fill in the item type, its name, the average, and the counts.
Its item type list follows Google’s supported types, and it warns you when you pick LocalBusiness or Organization, which are only eligible on sites that review other businesses.
What is AggregateRating?
Schema.org's AggregateRating holds "the average rating based on multiple ratings or reviews". Google's review snippet docs ask you to mark up "an aggregate evaluation of an item by many people" with it, and say Google may show aggregate ratings as rich snippets.
It's different from Review, which is one person's review of one item. A product page with 213 reviews has one AggregateRating (the average and the count) and can also mark up individual Reviews.
Required and recommended properties
From Google's review snippet documentation:
| Property | Required? | Notes |
|---|---|---|
ratingValue | Yes | The average, as a number, fraction, or percentage (4, 6 / 10, 60%). Use a dot for decimals. |
ratingCount or reviewCount | At least one | ratingCount is the number of ratings; reviewCount is the number of people who left a review. |
| Item name | Yes | itemReviewed.name, or the name of the item the rating is nested in. |
itemReviewed | Unless nested | The item being rated. Leave it out when the rating is nested with aggregateRating. |
bestRating | Recommended | The top of the scale. Google assumes 5 if it's missing. |
worstRating | Recommended | The bottom of the scale. Google assumes 1 if it's missing. |
Nested or standalone
There are two ways to connect the rating to the item:
- Nested (most common): add
aggregateRatingto the item's own markup, such as a Product or Recipe. The first two examples above do this. - Standalone: publish an
AggregateRatingwithitemReviewedset to the item. The third example does this for a restaurant on a review site.
Which items can show stars
Google's review snippet docs list these features: Book, Course list, Event, Local business, Movie, Product, Recipe, and Software App. Google also supports reviews for CreativeWorkSeason, CreativeWorkSeries, Episode, Game, MediaObject, MusicPlaylist, MusicRecording, and Organization, and their subtypes.
Local business and Organization come with a condition: Google only supports them for "sites that capture reviews about other local businesses" or other organizations.
The self-serving review rule
This is the rule that most often stops stars from appearing. Google's guidelines say:
If the entity that's being reviewed controls the reviews about itself, their pages that use LocalBusiness or any other type of Organization structured data are ineligible for star review feature.
Google's example is a review about entity A placed on entity A's own website, "either directly in their structured data or through an embedded third-party widget (for example, Google Business reviews or Facebook reviews widget)".
So a plumber can't get stars for its own LocalBusiness markup by adding its average rating. Ratings of the plumber on an independent review site can qualify.
Other guidelines to follow
- Show it on the page. Users must be able to see the aggregate rating on the marked-up page.
- Rate a specific item, not a category or a list of items.
- Don't aggregate ratings from other websites.
- No fake or undisclosed incentivized reviews, such as reviews written in exchange for money, discounts, or free products without a clear disclosure.
- For local businesses and organizations, ratings must come directly from users, not be compiled by editors.
- Several individual reviews on a page? Google asks you to include an aggregate rating of them as well.
How to build one here
- 01
Pick what is being rated from Google’s supported types.
- 02
Enter the item name exactly as the page shows it.
- 03
Enter the average rating and the number of ratings, reviews, or both.
- 04
Set the best and worst possible ratings if your scale is not 1 to 5.
- 05
Copy the JSON-LD into the page that shows the rating and test it in Google’s Rich Results Test.
Ready to build the markup?
Nested in the item, with a visible rating on the page.
Common mistakes
- No count. A
ratingValuewithoutratingCountorreviewCountdoesn't meet Google's requirements. - A comma in the decimal. Write
4.4, not4,4. - The wrong scale. If you rate out of 10, set
bestRatingto 10. Otherwise Google assumes a 1–5 scale, so an 8 doesn't fit. - Stars for the business itself. LocalBusiness or Organization ratings on the business's own site aren't eligible, even through a review widget.
- A rating users can't see. Show the same average and count on the page.
- Employer ratings. Use EmployerAggregateRating for ratings of employers.
Required properties
ratingValueratingCount or reviewCountitemReviewed (unless nested in the item)itemReviewed.name (or the parent item's name when nested)
Recommended properties
bestRatingworstRating
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Trailhead 2 Hiking Boot",
"image": "https://www.example.com/images/trailhead-2.jpg",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": 4.6,
"reviewCount": 213,
"bestRating": 5,
"worstRating": 1
}
}{
"@context": "https://schema.org",
"@type": "Recipe",
"name": "Weeknight Chicken Tikka Masala",
"image": "https://www.example.com/images/tikka-masala.jpg",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": 4.8,
"ratingCount": 1290
}
}{
"@context": "https://schema.org",
"@type": "AggregateRating",
"itemReviewed": {
"@type": "Restaurant",
"name": "Luna Trattoria",
"address": {
"@type": "PostalAddress",
"streetAddress": "88 Pine St",
"addressLocality": "Portland",
"addressRegion": "OR",
"postalCode": "97204",
"addressCountry": "US"
}
},
"ratingValue": 4.3,
"ratingCount": 512,
"reviewCount": 187
}FAQs
What does Google require for AggregateRating?ShowHide
ratingValue, at least one of ratingCount or reviewCount, and the name of the item being rated. If the rating isn't nested inside the item with the aggregateRating property, it also needs itemReviewed.
Can I add star ratings to my own business website?ShowHide
Not for LocalBusiness or Organization markup. Google says that if the business controls the reviews about itself, its pages using LocalBusiness or Organization structured data are ineligible for star ratings. That includes reviews shown through an embedded Google or Facebook reviews widget.
AggregateRating or Review?ShowHide
AggregateRating is the summary of many ratings: an average and a count. Review is one person's review of one item. If a page shows several individual reviews, Google asks you to include an aggregate rating of them too.
What rating scale should I use?ShowHide
Google assumes a 5-point scale from 1 to 5. If you use a different scale, set bestRating and worstRating. Use a dot for decimals, such as 4.4, not 4,4.
Can I show ratings collected on other websites?ShowHide
No. Google's guidelines say not to aggregate reviews or ratings from other websites. Mark up ratings collected on your own site.
Where do employer ratings go?ShowHide
Ratings of employers use EmployerAggregateRating, a separate Google feature. See the Employer Aggregate Rating guide.