软件应用 (SoftwareApplication) 结构化数据

在网页的正文中标记软件应用信息,可以更好地在 Google 搜索结果中显示您的应用详情。

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.

  1. Add the required properties. Based on the format you're using, learn where to insert structured data on the page.
  2. Follow the guidelines.
  3. 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).
  4. 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.
  5. 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

下面是一个 JSON-LD 格式的软件应用示例:


<html>
  <head>
    <title>Angry Birds</title>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "SoftwareApplication",
      "name": "Angry Birds",
      "operatingSystem": "ANDROID",
      "applicationCategory": "GameApplication",
      "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "4.6",
        "ratingCount": "8864"
      },
      "offers": {
        "@type": "Offer",
        "price": "1.00",
        "priceCurrency": "USD"
      }
    }
    </script>
  </head>
  <body>
  </body>
</html>
RDFa

下面是一个 RDFa 格式的软件应用示例:


<div vocab="https://schema.org/" typeof="SoftwareApplication">
  <span property="name">Angry Birds</span> -

  REQUIRES <span property="operatingSystem">ANDROID</span>
  TYPE: <span property="applicationCategory" content="GameApplication">Game</span>

  RATING:
  <div property="aggregateRating" typeof="AggregateRating">
    <span property="ratingValue">4.6</span> (
    <span property="ratingCount">8864</span> ratings )
  </div>

  <div property="offers" typeof="Offer">
    Price: $<span property="price">1.00</span>
    <meta property="priceCurrency" content="USD" />
  </div>
</div>
  
微数据

下面是一个微数据格式的软件应用示例:


<div itemscope itemtype="https://schema.org/SoftwareApplication">
  <span itemprop="name">Angry Birds</span> -

  REQUIRES <span itemprop="operatingSystem">ANDROID</span>
  TYPE: <span itemprop="applicationCategory" content="GameApplication">Game</span>

  RATING:
  <div itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating">
    <span itemprop="ratingValue">4.6</span> (
    <span itemprop="ratingCount">8864</span> ratings )
  </div>

  <div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
    Price: $<span itemprop="price">1.00</span>
    <meta itemprop="priceCurrency" content="USD" />
  </div>
</div>
  

指南

要使您的应用能够显示为富媒体搜索结果,您必须遵循以下指南。

结构化数据类型定义

若要使您的内容能够显示为富媒体搜索结果,您必须为其添加必要属性。还有一些建议添加的属性,能帮助您添加更多与您的内容相关的信息,进而提供更好的用户体验。

SoftwareApplication

如需了解 SoftwareApplication 的完整定义,请访问 schema.org/SoftwareApplication

Google 支持的属性如下:

必需的属性
name

Text

应用的名称。

offers.price

Offer

应用的销售优惠。对于开发者,offers 可表明出售应用的市场。对于市场,offers 可用于表明某个应用实例的具体应用价格。

如果应用是免费提供的,请将 offers.price 设置为 0。例如:

"offers": {
  "@type": "Offer",
  "price": "0"
}

如果应用的价格大于 0,您必须添加 offers.currency。 例如:

"offers": {
  "@type": "Offer",
  "price": "1.00",
  "priceCurrency": "USD"
}
评分或评价

应用评分或评价。您必须添加以下属性之一:

aggregateRating

AggregateRating

应用的平均评价分数。请遵循评价摘要指南,并查看必需和建议的 AggregateRating 属性列表。

review

Review

应用的单个评价。请遵循评价摘要指南,并查看必需和建议的评价属性列表。

建议添加的属性
applicationCategory

Text

应用类型(例如,BusinessApplicationGameApplication)。该值必须是支持的应用类型。

支持的应用类型列表

  • GameApplication
  • SocialNetworkingApplication
  • TravelApplication
  • ShoppingApplication
  • SportsApplication
  • LifestyleApplication
  • BusinessApplication
  • DesignApplication
  • DeveloperApplication
  • DriverApplication
  • EducationalApplication
  • HealthApplication
  • FinanceApplication
  • SecurityApplication
  • BrowserApplication
  • CommunicationApplication
  • DesktopEnhancementApplication
  • EntertainmentApplication
  • MultimediaApplication
  • HomeApplication
  • UtilitiesApplication
  • ReferenceApplication
operatingSystem

Text

使用应用所需的操作系统(例如,Windows 7OSX 10.6Android 1.6

应用子类型的扩展属性

对于移动应用和 Web 应用,Google 还支持 MobileApplicationWebApplication

对于只有 VideoGame 类型的软件应用,Google 不会显示富媒体搜索结果。 为了确保您的软件应用能够显示为富媒体搜索结果,请同时列出 VideoGame 类型与其他类型。例如:

{
  "@context": "https://schema.org",
  "@type": ["VideoGame", "MobileApplication"],
  ....
}

问题排查

如果您在实施或调试结构化数据时遇到问题,请查看下面列出的一些实用资源。

  • 如果您使用了内容管理系统 (CMS) 或其他人负责管理您的网站,请向其寻求帮助。请务必向其转发列明问题细节的任何 Search Console 消息。
  • Google 不能保证使用结构化数据的功能一定会显示在搜索结果中。如需查看导致 Google 无法将您的内容显示为富媒体搜索结果的各种常见原因,请参阅结构化数据常规指南
  • 您的结构化数据可能存在错误。请参阅结构化数据错误列表
  • 如果您的网页受到结构化数据手动操作的影响,其中的结构化数据将会被忽略(但该网页仍可能会出现在 Google 搜索结果中)。如需修正结构化数据问题,请使用“人工处置措施”报告
  • 再次查看相关指南,确认您的内容是否未遵循指南。问题可能是因为出现垃圾内容或使用垃圾标记导致的。不过,问题可能不是语法问题,因此富媒体搜索结果测试无法识别这些问题。
  • 针对富媒体搜索结果缺失/富媒体搜索结果总数下降进行问题排查
  • 请等待一段时间,以便 Google 重新抓取您的网页并重新将其编入索引。请注意,网页发布后,Google 可能需要几天时间才会找到和抓取该网页。有关抓取和索引编制的常见问题,请参阅 Google 搜索抓取和索引编制常见问题解答
  • Google 搜索中心论坛中发帖提问。