评价摘要(Review
、AggregateRating
)结构化数据
评价摘要是来自评价网站的简短评价摘录或评分,通常是众多评价者给出的综合评分的平均值。当 Google 发现有效的评价或评分标记时,可能会显示丰富网页摘要,其中包含根据评价或评分得出的星级和其他摘要信息。除了文字评价之外,还有数字分制(如 1 到 5)的评分。评价摘要可能会出现在富媒体搜索结果或 Google 知识面板中。您可以为以下功能提供评分:
Google 还支持针对以下 schema.org 类型(及其子类型)的评价:
CreativeWorkSeason
CreativeWorkSeries
Episode
Game
MediaObject
MusicPlaylist
MusicRecording
Organization
(仅适用于捕获关于其他组织的评价的网站;请参阅关于自利评价的指南)
如何添加结构化数据
结构化数据是一种提供网页相关信息并对网页内容进行分类的标准化格式。如果您不熟悉结构化数据,可以详细了解结构化数据的运作方式。
下面概述了如何构建、测试和发布结构化数据。如需获得向网页添加结构化数据的分步指南,请查看结构化数据 Codelab。
- 添加必要属性。根据您使用的格式,了解在网页上的什么位置插入结构化数据。
- 遵循指南。
- 使用富媒体搜索结果测试验证您的代码,并修复所有严重错误。此外,您还可以考虑修正该工具中可能会标记的任何非严重问题,因为这些这样有助于提升结构化数据的质量(不过,要使内容能够显示为富媒体搜索结果,并非必须这么做)。
- 部署一些包含您的结构化数据的网页,然后使用网址检查工具测试 Google 看到的网页样貌。请确保您的网页可供 Google 访问,不会因 robots.txt 文件、
noindex
标记或登录要求而被屏蔽。如果网页看起来没有问题,您可以请求 Google 重新抓取您的网址。 - 为了让 Google 随时了解日后发生的更改,我们建议您提交站点地图。Search Console Sitemap API 可以帮助您自动执行此操作。
示例
您可以通过下面几种方法向网页添加 Review
结构化数据:
- 添加简单评价。
- 使用
review
属性将评价嵌入另一个 schema.org 类型。 - 添加总体评分。如果您标记的内容同时包含作者和评价日期,则可以省略个别评价的评分。对于总体评价,您必须提供平均评分,才能显示丰富网页摘要。
- 使用
aggregateRating
属性将总体评分嵌入另一个 schema.org 类型。
简单评价
下面是一个简单评价示例。
JSON-LD
<html> <head> <title>Legal Seafood</title> <script type="application/ld+json"> { "@context": "https://schema.org/", "@type": "Review", "itemReviewed": { "@type": "Restaurant", "image": "https://www.example.com/seafood-restaurant.jpg", "name": "Legal Seafood", "servesCuisine": "Seafood", "priceRange": "$$$", "telephone": "1234567", "address" :{ "@type": "PostalAddress", "streetAddress": "123 William St", "addressLocality": "New York", "addressRegion": "NY", "postalCode": "10038", "addressCountry": "US" } }, "reviewRating": { "@type": "Rating", "ratingValue": 4 }, "author": { "@type": "Person", "name": "Bob Smith" }, "publisher": { "@type": "Organization", "name": "Washington Times" } } </script> </head> <body> </body> </html>
RDFa
<html> <head> <title>Legal Seafood</title> </head> <body> <div vocab="https://schema.org/" typeof="Review"> <div property="itemReviewed" typeof="Restaurant"> <img property="image" src="https://example.com/photos/1x1/seafood-restaurant.jpg" alt="Legal Seafood"/> <span property="name">Legal Seafood</span> <span property="servesCuisine">Seafood</span> <span property="priceRange">$$$</span> <span property="telephone">1234567</span> <span property="address">123 William St, New York</span> </div> <span property="reviewRating" typeof="Rating"> <span property="ratingValue">4</span> </span> stars - <b>"A good seafood place." </b> <span property="author" typeof="Person"> <span property="name">Bob Smith</span> </span> <div property="publisher" typeof="Organization"> <meta property="name" content="Washington Times"> </div> </div> </body> </html>
微数据
<html> <head> <title>Legal Seafood</title> </head> <body> <div itemscope itemtype="https://schema.org/Review"> <div itemprop="itemReviewed" itemscope itemtype="https://schema.org/Restaurant"> <img itemprop="image" src="https://example.com/photos/1x1/seafood-restaurant.jpg" alt="Legal Seafood"/> <span itemprop="name">Legal Seafood</span> <span itemprop="servesCuisine">Seafood</span> <span itemprop="priceRange">$$$</span> <span itemprop="telephone">1234567</span> <span itemprop="address">123 William St, New York</span> </div> <span itemprop="reviewRating" itemscope itemtype="https://schema.org/Rating"> <span itemprop="ratingValue">4</span> </span> stars - <b>"A good seafood place." </b> <span itemprop="author" itemscope itemtype="https://schema.org/Person"> <span itemprop="name">Bob Smith</span> </span> <div itemprop="publisher" itemscope itemtype="https://schema.org/Organization"> <meta itemprop="name" content="Washington Times"> </div> </div> </body> </html>
嵌套评价
下面是一个嵌入 Product
中的评价示例。您可以将该示例复制并粘贴到自己的 HTML 网页中。
JSON-LD
<html> <head> <title>The Catcher in the Rye</title> <script type="application/ld+json"> { "@context": "https://schema.org/", "@type": "Product", "brand": { "@type": "Brand", "name": "Penguin Books" }, "description": "The Catcher in the Rye is a classic coming-of-age story: an story of teenage alienation, capturing the human need for connection and the bewildering sense of loss as we leave childhood behind.", "sku": "9780241984758", "mpn": "925872", "image": "https://www.example.com/catcher-in-the-rye-book-cover.jpg", "name": "The Catcher in the Rye", "review": [{ "@type": "Review", "reviewRating": { "@type": "Rating", "ratingValue": 5 }, "author": { "@type": "Person", "name": "John Doe" } }, { "@type": "Review", "reviewRating": { "@type": "Rating", "ratingValue": 1 }, "author": { "@type": "Person", "name": "Jane Doe" } }], "aggregateRating": { "@type": "AggregateRating", "ratingValue": 88, "bestRating": 100, "ratingCount": 20 }, "offers": { "@type": "Offer", "url": "https://example.com/offers/catcher-in-the-rye", "priceCurrency": "USD", "price": 5.99, "priceValidUntil": "2024-11-05", "itemCondition": "https://schema.org/UsedCondition", "availability": "https://schema.org/InStock", "seller": { "@type": "Organization", "name": "eBay" } } } </script> </head> <body> </body> </html>
RDFa
<html> <head> <title>The Catcher in the Rye</title> </head> <body> <div vocab="https://schema.org/" typeof="Product"> <div rel="schema:brand"> <div typeof="schema:Brand"> <div property="schema:name" content="Penguin"></div> </div> </div> <div property="schema:description" content="The Catcher in the Rye is a classic coming-of-age story: an story of teenage alienation, capturing the human need for connection and the bewildering sense of loss as we leave childhood behind."></div> <div property="schema:sku" content="9780241984758"></div> <div property="schema:mpn" content="925872"></div> <img property="image" src="https://example.com/photos/1x1/catcher-in-the-rye-book-cover.jpg" alt="Catcher in the Rye"/> <span property="name">The Catcher in the Rye</span> <div property="review" typeof="Review"> Reviews: <span property="reviewRating" typeof="Rating"> <span property="ratingValue">5</span> - </span> <b>"A masterpiece of literature" </b> by <span property="author" typeof="Person"> <span property="name">John Doe</span></span>, written on <meta property="datePublished" content="2006-05-04">4 May 2006 <div>I really enjoyed this book. It captures the essential challenge people face as they try make sense of their lives and grow to adulthood.</div> <span property="publisher" typeof="Organization"> <meta property="name" content="Washington Times"> </span> </div><div property="review" typeof="Review"> <span property="reviewRating" typeof="Rating"> <span property="ratingValue">1</span> - </span> <b>"The worst thing I've ever read" </b> by <span property="author" typeof="Person"> <span property="name">Jane Doe</span></span>, written on <meta property="datePublished" content="2006-05-10">10 May 2006 <span property="publisher" typeof="Organization"> <meta property="name" content="Washington Times"> </span> </div> <div rel="schema:aggregateRating"> <div typeof="schema:AggregateRating"> <div property="schema:reviewCount" content="89"></div> <div property="schema:ratingValue" content="4.4">4,4</div> stars </div> </div> <div rel="schema:offers"> <div typeof="schema:Offer"> <div property="schema:price" content="4.99"></div> <div property="schema:availability" content="https://schema.org/InStock"></div> <div property="schema:priceCurrency" content="GBP"></div> <div property="schema:priceValidUntil" datatype="xsd:date" content="2024-11-21"></div> <div rel="schema:url" resource="https://example.com/catcher"></div> <div property="schema:itemCondition" content="https://schema.org/UsedCondition"></div> </div> </div> </div> </body> </html>
微数据
<html> <head> <title>The Catcher in the Rye</title> </head> <body> <div itemscope itemtype="https://schema.org/Product"> <div itemprop="brand" itemtype="https://schema.org/Brand" itemscope> <meta itemprop="name" content="Penguin" /> </div> <meta itemprop="description" content="The Catcher in the Rye is a classic coming-of-age story: an story of teenage alienation, capturing the human need for connection and the bewildering sense of loss as we leave childhood behind." /> <meta itemprop="sku" content="0446310786" /> <meta itemprop="mpn" content="925872" /> <img itemprop="image" src="https://example.com/photos/1x1/catcher-in-the-rye-book-cover.jpg" alt="Catcher in the Rye"/> <span itemprop="name">The Catcher in the Rye</span> <div itemprop="review" itemscope itemtype="https://schema.org/Review"> Reviews: <span itemprop="reviewRating" itemscope itemtype="https://schema.org/Rating"> <span itemprop="ratingValue">5</span> - </span> <b>"A masterpiece of literature" </b> by <span itemprop="author" itemscope itemtype="https://schema.org/Person"> <span itemprop="name">John Doe</span></span>, written on <meta itemprop="datePublished" content="2006-05-04">4 May 2006 <div>I really enjoyed this book. It captures the essential challenge people face as they try make sense of their lives and grow to adulthood.</div> <span itemprop="publisher" itemscope itemtype="https://schema.org/Organization"> <meta itemprop="name" content="Washington Times"> </span> </div><div itemprop="review" itemscope itemtype="https://schema.org/Review"> <span itemprop="reviewRating" itemscope itemtype="https://schema.org/Rating"> <span itemprop="ratingValue">1</span> - </span> <b>"The worst thing I've ever read" </b> by <span itemprop="author" itemscope itemtype="https://schema.org/Person"> <span itemprop="name">Jane Doe</span></span>, written on <meta itemprop="datePublished" content="2006-05-10">10 May 2006 <span itemprop="publisher" itemscope itemtype="https://schema.org/Organization"> <meta itemprop="name" content="Washington Times"> </span> </div> <div itemprop="aggregateRating" itemtype="https://schema.org/AggregateRating" itemscope> <meta itemprop="reviewCount" content="89" /> <span itemprop="ratingValue" content="4.4">4,4</span> stars </div> <div itemprop="offers" itemtype="https://schema.org/Offer" itemscope> <link itemprop="url" href="https://example.com/catcher" /> <meta itemprop="availability" content="https://schema.org/InStock" /> <meta itemprop="priceCurrency" content="GBP" /> <meta itemprop="itemCondition" content="https://schema.org/UsedCondition" /> <meta itemprop="price" content="4.99" /> <meta itemprop="priceValidUntil" content="2024-11-21" /> </div> </div> </body> </html>
总体评分
下面是一个总体评分示例。
JSON-LD
<html> <head> <title>Legal Seafood</title> <script type="application/ld+json"> { "@context": "https://schema.org/", "@type": "AggregateRating", "itemReviewed": { "@type": "Restaurant", "image": "https://www.example.com/seafood-restaurant.jpg", "name": "Legal Seafood", "servesCuisine": "Seafood", "telephone": "1234567", "address" : { "@type": "PostalAddress", "streetAddress": "123 William St", "addressLocality": "New York", "addressRegion": "NY", "postalCode": "10038", "addressCountry": "US" } }, "ratingValue": 88, "bestRating": 100, "ratingCount": 20 } </script> </head> <body> </body> </html>
RDFa
<html> <head> <title>Legal Seafood</title> </head> <body> <div vocab="https://schema.org/" typeof="AggregateRating"> <div property="itemReviewed" typeof="Restaurant"> <img property="image" src="https://example.com/photos/1x1/seafood-restaurant.jpg" alt="Legal Seafood"/> <span property="name">Legal Seafood</span> <span property="servesCuisine">Seafood</span> <span property="telephone">1234567</span> <span property="address">123 William St, New York</span> </div> <span property="ratingValue">4.2</span> out of <span property="bestRating">5</span> stars - <span property="ratingCount">123</span> votes </div> </body> </html>
微数据
<html> <head> <title>Legal Seafood</title> </head> <body> <div itemscope itemtype="https://schema.org/AggregateRating"> <div itemprop="itemReviewed" itemscope itemtype="https://schema.org/Restaurant"> <img itemprop="image" src="https://example.com/photos/1x1/seafood-restaurant.jpg" alt="Legal Seafood"/> <span itemprop="name">Legal Seafood</span> <span itemprop="servesCuisine">Seafood</span> <span itemprop="telephone">1234567</span> <span itemprop="address">123 William St, New York</span> </div> <span itemprop="ratingValue">4.2</span> out of <span itemprop="bestRating">5</span> stars - <span itemprop="ratingCount">123</span> votes </div> </body> </html>
嵌套总体评分
下面是一个嵌入 Product
中的总体评分示例。您可以将该示例复制并粘贴到自己的 HTML 网页中。
JSON-LD
<html> <head> <title>Executive Anvil</title> <script type="application/ld+json"> { "@context": "https://schema.org/", "@type": "Product", "name": "Executive Anvil", "image": [ "https://example.com/photos/1x1/photo.jpg", "https://example.com/photos/4x3/photo.jpg", "https://example.com/photos/16x9/photo.jpg" ], "brand": { "@type": "Brand", "name": "ACME" }, "aggregateRating": { "@type": "AggregateRating", "ratingValue": 4.4, "ratingCount": 89 }, "offers": { "@type": "AggregateOffer", "lowPrice": 119.99, "highPrice": 199.99, "priceCurrency": "USD" } } </script> </head> <body> </body> </html>
RDFa
<html> <head> <title>Executive Anvil</title> </head> <body> <div vocab="https://schema.org/" typeof="Product"> <span property="brand" typeof="Brand">ACME</span> <span property="name">Executive Anvil</span> <img property="image" src="https://example.com/photos/1x1/anvil_executive.jpg" alt="Executive Anvil logo" /> <span property="aggregateRating" typeof="AggregateRating"> Average rating: <span property="ratingValue">4.4</span>, based on <span property="ratingCount">89</span> reviews </span> <span property="offers" typeof="AggregateOffer"> from $<span property="lowPrice">119.99</span> to $<span property="highPrice">199.99</span> <meta property="priceCurrency" content="USD" /> </span> </div> </body> </html>
微数据
<html> <head> <title>Executive Anvil</title> </head> <body> <div itemscope itemtype="https://schema.org/Product"> <span itemprop="brand" itemtype="https://schema.org/Brand" itemscope>ACME</span> <span itemprop="name">Executive Anvil</span> <img itemprop="image" src="https://example.com/photos/1x1/anvil_executive.jpg" /> <span itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating"> Average rating: <span itemprop="ratingValue">4.4</span>, based on <span itemprop="ratingCount">89</span> reviews </span> <span itemprop="offers" itemscope itemtype="https://schema.org/AggregateOffer"> from $<span itemprop="lowPrice">119.99</span> to $<span itemprop="highPrice">199.99</span> <meta itemprop="priceCurrency" content="USD" /> </span> </div> </body> </html>
指南
您的内容必须遵循以下指南,才能以富媒体搜索结果的形式呈现。
技术指南
- 确保使用 schema.org/AggregateRating 标记许多人对某项内容的总体评估。Google 可能会将总体评分显示为丰富网页摘要,对于某些类型的内容,也可能会在搜索结果中显示为答案。
- 若想明确提及特定的产品或服务,可以将评价嵌套在另一种 schema.org 类型(如 schema.org/Book 或 schema.org/Recipe)的标记中,或者将一个 schema.org 类型用作
itemReviewed
属性的值。 - 确保用户可以随时在标记的网页中查看您标记的评价内容。并且能够一目了然地发现网页中包含评价内容。 例如,如果您对评价进行了标记,用户应该能够看到评价的文本和关联的评分。如果您使用
AggregateRating
,用户应该能够在网页上看到该总体评分。 - 我们建议您仅接受附有评价意见和作者姓名的评分。 虽然这不是强制要求,但此方法可以帮助用户查看解释评分的详细信息。
- 提供与具体项(而非某个类别或列表中的所有项)有关的评价信息。
- 如果您添加多条单独的评价,则还需要添加各条评价的汇总评分。
- 请勿汇总来自其他网站的评价或评分。
- 如果评价摘要针对本地商家或组织,您必须遵循以下这些额外的指南:
- 如果接受评价的实体能够控制其收到的评价,则使用
LocalBusiness
或任何其他类型的Organization
结构化数据的网页无法使用星级评价功能。例如,将有关实体 A 的评价直接添加到结构化数据中或者通过嵌入式第三方微件(如 Google 商家评价或 Facebook 评价微件)将其呈现在实体 A 的网站上。 - 评分必须直接来自用户。
- 请勿依赖人工编辑来为本地商家创建、精选或编制评分信息。
- 如果接受评价的实体能够控制其收到的评价,则使用
不同结构化数据类型的定义
要使结构化数据能够显示在搜索结果中,您必须为其添加必需的属性。您还可以添加建议的属性,以便向结构化数据添加更多信息,进而提供更好的用户体验。
Review
如需了解 Review
的完整定义,请访问 schema.org/Review。
Google 支持的属性如下:
必要属性 | |
---|---|
author |
评价的作者。评价者的名称必须是一个有效的名称。例如,“周六之前享受五折优惠”就不是有效的评价者名称。 此字段的字符数必须小于 100 个。如果字符数超过 100 个,您的网页就无法显示基于作者的评价摘要。 为了帮助 Google 更好地了解各种功能中的作者,应该遵循作者标记最佳实践。 |
itemReviewed
|
有效的类型之一 被评价的项。但是,如果使用 被评项的有效类型是: |