Subscription and paywalled content

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

Example

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

Guidelines

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

  • JSON-LD is the only accepted method 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 subscription-based access to your website content, or if users must register for access, follow the steps below. 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:
    <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>
  2. Add NewsArticle structured data.
  3. Add the highlighted JSON-LD structured data to your NewsArticle structured data.
    {
      "@context": "http://schema.org",
      "@type": "NewsArticle",
      "mainEntityOfPage": {
        "@type": "WebPage",
        "@id": "https://example.org/article"
      },
      (...)
      "isAccessibleForFree": "False",
      "hasPart":
        {
        "@type": "WebPageElement",
        "isAccessibleForFree": "False",
        "cssSelector" : ".paywall"
        }
     }
    

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:

<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, and requires a subscription or registration.</div>

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

{
  "@context": "http://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"
    }
  ]
 }

AMP considerations

If you have an AMP page with structured data, consider using amp-access where appropriate.

Send feedback about...