影片轮播界面 (Movie) 结构化数据

该图示展示了影片富媒体搜索结果在 Google 搜索中的显示效果。它以轮播界面形式显示同一网站中的 3 部不同影片,用户可以浏览并选择特定影片

使用结构化数据标记影片列表后,用户便可以通过新的方式在 Google 搜索中搜索影片。您可以提供影片的详细信息,例如片名、导演和海报/剧照。影片轮播界面仅可在移动设备上显示。

如何添加结构化数据

结构化数据是一种提供网页相关信息并对网页内容进行分类的标准化格式。如果您不熟悉结构化数据,可以详细了解结构化数据的运作方式

下面概述了如何构建、测试和发布结构化数据。如需获得向网页添加结构化数据的分步指南,请查看结构化数据 Codelab

  1. 添加必要属性。根据您使用的格式,了解在网页上的什么位置插入结构化数据
  2. 遵循指南
  3. 使用富媒体搜索结果测试验证您的代码,并修复所有严重错误。此外,您还可以考虑修正该工具中可能会标记的任何非严重问题,因为这些这样有助于提升结构化数据的质量(不过,要使内容能够显示为富媒体搜索结果,并非必须这么做)。
  4. 部署一些包含您的结构化数据的网页,然后使用网址检查工具测试 Google 看到的网页样貌。请确保您的网页可供 Google 访问,不会因 robots.txt 文件、noindex 标记或登录要求而被屏蔽。如果网页看起来没有问题,您可以请求 Google 重新抓取您的网址
  5. 为了让 Google 随时了解日后发生的更改,我们建议您提交站点地图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 URLImageObject

代表影片的图片。有关图片的其他注意事项:

  • 图片网址必须可抓取且可编入索引
  • 图片必须代表标记的内容。
  • 图片必须为 .jpg、.png 或 .gif 格式。
  • 图片必须具有较高的分辨率,并且宽高比为 6:9。虽然 Google 可以剪裁宽高比接近 6:9 的图片,但与该比例偏差较大的图片不能使用此功能。
name Text

影片的名称。

建议属性

aggregateRating

AggregateRating

注明影片所获得的平均评价分数。请遵循评价摘要指南,并查看 AggregateRating 属性的必要属性和建议属性列表。

dateCreated DateDateTime

影片的上映日期。

director Person

影片的导演。例如:

"director": {
  "@type": "Person",
  "name": "Bradley Cooper"
}

review

Review

影片的嵌套 Review。请遵循评价摘要指南,并查看评价属性的必要属性和建议属性列表。

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.