Structured data for subscription and paywalled content (CreativeWork)

This page describes how to use schema.org JSON-LD to indicate paywalled content on your site with CreativeWork properties. This structured data helps Google differentiate paywalled content from the practice of cloaking, which violates spam policies. Learn more about subscription and paywalled content.

Example

Here's an example of NewsArticle structured data with paywalled content.

<html>
  <head>
    <title>Article headline</title>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "NewsArticle",
      "headline": "Article headline",
      "image": "https://example.org/thumbnail1.jpg",
      "datePublished": "2025-02-05T08:00:00+08:00",
      "dateModified": "2025-02-05T09:20:00+08:00",
      "author": {
        "@type": "Person",
        "name": "John Doe",
        "url": "https://example.com/profile/johndoe123"
      },
      "description": "A most wonderful article",
      "isAccessibleForFree": false,
      "hasPart":
        {
        "@type": "WebPageElement",
        "isAccessibleForFree": false,
        "cssSelector" : ".paywall"
        }
    }
    </script>
  </head>
  <body>
    <div class="non-paywall">
      Non-Paywalled Content
    </div>
    <div class="paywall">
      Paywalled Content
    </div>
  </body>
</html>

Guidelines

You must follow the general structured data guidelines and technical guidelines for your page to be eligible to appear in search results. In addition, the following guidelines apply to paywalled content:

  • JSON-LD and microdata formats are accepted methods for specifying structured data for paywalled content.
  • Don't nest content sections.
  • Only use .class selectors for the cssSelector property.

Add markup to paywalled content

If you offer any subscription-based access to your website content, or if users must register for access to any content you want to be indexed, follow these steps. The following example applies to NewsArticle structured data. Make sure to follow these steps for all versions of your page (including AMP and non-AMP).

  1. Add a class name around each paywalled section of your page. For example:
    <body>
    <p>This content is outside a paywall and is visible to all.</p>
    <div class="paywall">This content is inside a paywall, and requires a subscription or registration.</div>
    </body>
  2. Add NewsArticle structured data.
  3. Add the highlighted JSON-LD structured data to your NewsArticle structured data.
    {
      "@context": "https://schema.org",
      "@type": "NewsArticle",
      "mainEntityOfPage": {
        "@type": "WebPage",
        "@id": "https://example.org/article"
      },
      (...)
      "isAccessibleForFree": false,
      "hasPart": {
        "@type": "WebPageElement",
        "isAccessibleForFree": false,
        "cssSelector": ".paywall"
      }
    }
  4. Validate your code using the Rich Results Test and fix any critical errors.

Multiple paywalled sections

If you have multiple paywalled sections on a page, add the class names as an array.

Here's an example of the paywalled sections on a page:

<body>
  <div class="section1">This content is inside a paywall, and requires a subscription or registration.</div>
  <p>This content is outside a paywall and is visible to all.</p>
  <div class="section2">This is another section that's inside a paywall, or requires a subscription or registration.</div>
</body>

Here's an example of NewsArticle structured data with multiple paywalled sections.

{
  "@context": "https://schema.org",
  "@type": "NewsArticle",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://example.org/article"
    },
  (...)
  "isAccessibleForFree": false,
  "hasPart": [
    {
      "@type": "WebPageElement",
      "isAccessibleForFree": false,
      "cssSelector": ".section1"
    }, {
      "@type": "WebPageElement",
      "isAccessibleForFree": false,
      "cssSelector": ".section2"
    }
  ]
}

Supported types

This markup is supported for the CreativeWork type or one of the following more specific types of CreativeWork:

Multiple schema.org types can be used, such as the following:

"@type": ["Article", "LearningResource"]

You must include the required properties for Google to understand that your article has paywalled content. You can add the recommended properties for more granularity about which sections of a page are behind a paywall (or require a subscription or registration).

Required properties
isAccessibleForFree

Boolean

Whether the article is accessible to everyone, or if it's behind a paywall (or requires a subscription or registration). Set the isAccessibleForFree property to false to specify that this section is behind a paywall.

Recommended properties
hasPart.cssSelector

CssSelectorType

A CSS selector that references the class name that you set in the HTML to specify the paywalled section.

hasPart.@type

Text

Set the @type to WebPageElement.

hasPart.isAccessibleForFree

Boolean

Whether this section of the article is behind a paywall (or requires a subscription or registration). Set the isAccessibleForFree property to False to specify that this section is behind a paywall.

AMP considerations

Here's a list of considerations to keep in mind if you use AMP pages:

  • If you have an AMP page with paywalled content, use amp-subscriptions where appropriate.
  • Make sure that your authorization endpoint grants access to content to the appropriate bots from Google and others. This is different per publisher.
  • Ensure that your bot access policy is the same for AMP and non-AMP pages, otherwise this can result in content mismatch errors that appear in Search Console.

Generative AI in Search considerations

AI overviews offer a preview of a topic or query based on a variety of sources, including web sources. As such, they are subject to Search's preview controls.

AI tools while browsing, a separate feature than AI Overviews, will not show key points for paywalled articles, if paywall structured data is on the page.

Make sure Google can crawl and index your pages

If you want Google to crawl and index your content, including the paywalled sections, make sure Googlebot, and Googlebot-News if applicable, can access your page.

Use the URL Inspection tool to test how Google crawls and renders a URL on your site.

Control what information is shown in search results

To prevent Google from showing a cached link for your page, use the noarchive robots meta tag.

To exclude certain sections of your content from appearing in search result snippets, use the data-nosnippet HTML attribute. You can also limit how many characters a search result snippet may have by using the max-snippet robots meta tag.

问题排查

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

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