影片轮播界面 (Movie
) 结构化数据
![该图示展示了影片富媒体搜索结果在 Google 搜索中的显示效果。它以轮播界面形式显示同一网站中的 3 部不同影片,用户可以浏览并选择特定影片](https://developers.google.cn/static/search/docs/images/movie-rich-result.png?authuser=5&hl=cs)
使用结构化数据标记影片列表后,用户便可以通过新的方式在 Google 搜索中搜索影片。您可以提供影片的详细信息,例如片名、导演和海报/剧照。影片轮播界面仅可在移动设备上显示。
How to add structured data
Structured data is a standardized format for providing information about a page and classifying the page content. If you're new to structured data, you can learn more about how structured data works.
Here's an overview of how to build, test, and release structured data.
- Add the required properties. Based on the format you're using, learn where to insert structured data on the page.
- Follow the guidelines.
- Validate your code using the Rich Results Test and fix any critical errors. Consider also fixing any non-critical issues that may be flagged in the tool, as they can help improve the quality of your structured data (however, this isn't necessary to be eligible for rich results).
- Deploy a few pages that include your structured data and use the URL Inspection tool to test how Google sees the page. Be sure that your page is
accessible to Google and not blocked by a robots.txt file, the
noindex
tag, or login requirements. If the page looks okay, you can ask Google to recrawl your URLs. - To keep Google informed of future changes, we recommend that you submit a sitemap. You can automate this with the Search Console Sitemap API.
示例
摘要页面 + 多个完整详情页面
摘要页面中包含列表中每一项的简短说明,每项说明都指向一个单独的详情页面(该页面完全针对一项)。下面是一个 JSON-LD 格式的摘要页面示例:
<html> <head> <title>The Best Movies from the Oscars - 2024</title> <script type="application/ld+json"> { "@context":"https://schema.org", "@type":"ItemList", "itemListElement":[ { "@type":"ListItem", "position":1, "url":"https://example.com/a-star-is-born.html" }, { "@type":"ListItem", "position":2, "url":"https://example.com/bohemian-rhapsody.html" }, { "@type":"ListItem", "position":3, "url":"https://example.com/black-panther.html" } ] } </script> </head> <body> </body> </html>
一页全包式单一列表
该列表中包含所有列表信息,其中包括每项的完整内容。 下面是一个 JSON-LD 格式的全包式单一列表示例:
<html> <head> <title>The Best Movies from the Oscars - 2024</title> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "ItemList", "itemListElement": [ { "@type": "ListItem", "position": "1", "item": { "@type": "Movie", "url": "https://example.com/2024-best-picture-noms#a-star-is-born", "name": "A Star Is Born", "image": "https://example.com/photos/6x9/photo.jpg", "dateCreated": "2024-10-05", "director": { "@type": "Person", "name": "Bradley Cooper" }, "review": { "@type": "Review", "reviewRating": { "@type": "Rating", "ratingValue": "5" }, "author": { "@type": "Person", "name": "John D." } }, "aggregateRating": { "@type": "AggregateRating", "ratingValue": "90", "bestRating": "100", "ratingCount": "19141" } } }, { "@type": "ListItem", "position": "2", "item": { "@type": "Movie", "name": "Bohemian Rhapsody", "url": "https://example.com/2024-best-picture-noms#bohemian-rhapsody", "image": "https://example.com/photos/6x9/photo.jpg", "dateCreated": "2024-11-02", "director": { "@type": "Person", "name": "Bryan Singer" }, "review": { "@type": "Review", "reviewRating": { "@type": "Rating", "ratingValue": "3" }, "author": { "@type": "Person", "name": "Vin S." } }, "aggregateRating": { "@type": "AggregateRating", "ratingValue": "61", "bestRating": "100", "ratingCount": "21985" } } }, { "@type": "ListItem", "position": "3", "item": { "@type": "Movie", "name": "Black Panther", "url": "https://example.com/2024-best-picture-noms#black-panther", "image": "https://example.com/photos/6x9/photo.jpg", "dateCreated": "2024-02-16", "director": { "@type": "Person", "name": "Ryan Coogler" }, "review": { "@type": "Review", "reviewRating": { "@type": "Rating", "ratingValue": "2" }, "author": { "@type": "Person", "name": "Trevor R." } }, "aggregateRating": { "@type": "AggregateRating", "ratingValue": "96", "bestRating": "100", "ratingCount": "88211" } } } ] } </script> </head> <body> </body> </html>
指南
您的内容必须遵循以下指南,才能出现在影片轮播界面中。
结构化数据类型定义
要让内容能够显示为富媒体搜索结果,您必须为其添加必要属性。您还可以添加建议属性,以便添加更多与内容相关的信息,进而提供更好的用户体验。
Movie
除了轮播界面属性之外,您还可以在“轮播界面”对象中定义以下属性。
如需了解 Movie
的完整定义,请访问 schema.org/Movie。
Google 支持的属性如下:
必需属性 | |
---|---|
image |
URL 或 ImageObject
代表影片的图片。有关图片的其他注意事项:
|
name |
Text
影片的名称。 |
建议属性 | |
---|---|
|
注明影片所获得的平均评价分数。请遵循评价摘要指南,并查看 AggregateRating 属性的必要属性和建议属性列表。 |
dateCreated |
Date 或 DateTime
影片的上映日期。 |
director |
Person
影片的导演。例如: "director": { "@type": "Person", "name": "Bradley Cooper" } |
|
Troubleshooting
If you're having trouble implementing or debugging structured data, here are some resources that may help you.
- If you're using a content management system (CMS) or someone else is taking care of your site, ask them to help you. Make sure to forward any Search Console message that details the issue to them.
- Google does not guarantee that features that consume structured data will show up in search results. For a list of common reasons why Google may not show your content in a rich result, see the General Structured Data Guidelines.
- You might have an error in your structured data. Check the list of structured data errors and the Unparsable structured data report.
- If you received a structured data manual action against your page, the structured data on the page will be ignored (although the page can still appear in Google Search results). To fix structured data issues, use the Manual Actions report.
- Review the guidelines again to identify if your content isn't compliant with the guidelines. The problem can be caused by either spammy content or spammy markup usage. However, the issue may not be a syntax issue, and so the Rich Results Test won't be able to identify these issues.
- Troubleshoot missing rich results / drop in total rich results.
- Allow time for re-crawling and re-indexing. Remember that it may take several days after publishing a page for Google to find and crawl it. For general questions about crawling and indexing, check the Google Search crawling and indexing FAQ.
- Post a question in the Google Search Central forum.