On-Page SEO

Product Variant Structured Data Examples

Original JSON-LD examples for a fictional product family on single-page and multi-page variant sites, with canonical rules and QA for matching visible data.

Variant markup describes how products in one family relate to each other. It works only when the page architecture is decided first: whether every variant lives on one canonical page or each has its own page. Make that choice with Ecommerce Product URL Decisions, then use the matching pattern below.

Every example on this page is fictional. The brand, SKUs, and prices are invented, URLs use the reserved example.com domain, and nothing here was tested as a live merchant listing. GTINs are omitted so the examples do not imitate real products; include the manufacturer-assigned GTIN in real markup when one exists.

What Google’s documentation requires

Google’s product variant documentation uses a ProductGroup for the family and a Product for each variant:

  • ProductGroup requires name. It recommends productGroupID, variesBy, hasVariant, brand, and description; the group ID must appear either on the group or through inProductGroupWithID on variants.
  • variesBy takes Schema.org URLs. The documented values are color, size, suggestedAge, suggestedGender, material, and pattern.
  • Each variant needs a unique identifier such as sku or a GTIN, a name more specific than the group’s, and the properties required for merchant listings or product snippets.
  • Each variant must be preselectable through its own distinct URL that shows the right image, price, and availability.

The merchant listing documentation requires name, image, and an Offer with price and priceCurrency. Price is a number above zero, and the currency is a three-letter ISO 4217 code. Availability, condition, and offer URL are recommended. Shipping and return policies are omitted from the examples for brevity. If you add them, their own required sub-properties apply.

The fictional product family

VariantColourSizeSKUPriceVisible availability
1SlateMEO-PRS-SLT-M129.00 USDIn stock
2SlateLEO-PRS-SLT-L134.00 USDIn stock
3MossMEO-PRS-MOS-M129.00 USDIn stock
4MossLEO-PRS-MOS-L134.00 USDOut of stock

The markup has to match whatever the shopper sees after selecting each variant, including the out-of-stock state for Moss L.

Single-page architecture

All four variants are chosen on one product page. Selection updates the URL with query parameters, so each variant can be opened directly. Google states there must be one distinct canonical URL for the overall ProductGroup. Every variant URL on this page therefore declares the same canonical:

<link rel="canonical" href="https://example.com/products/packable-rain-shell">

The ProductGroup carries that base URL in url. Each variant’s Offer uses its preselection URL:

{
  "@context": "https://schema.org",
  "@type": "ProductGroup",
  "name": "Example Outfitters Packable Rain Shell",
  "description": "Lightweight waterproof shell that packs into its own chest pocket.",
  "url": "https://example.com/products/packable-rain-shell",
  "brand": { "@type": "Brand", "name": "Example Outfitters" },
  "productGroupID": "EO-PRS",
  "variesBy": ["https://schema.org/color", "https://schema.org/size"],
  "hasVariant": [
    {
      "@type": "Product",
      "sku": "EO-PRS-SLT-M",
      "name": "Example Outfitters Packable Rain Shell, Slate, M",
      "color": "Slate",
      "size": "M",
      "image": "https://example.com/images/packable-rain-shell-slate.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://example.com/products/packable-rain-shell?color=slate&size=m",
        "price": 129.00,
        "priceCurrency": "USD",
        "availability": "https://schema.org/InStock",
        "itemCondition": "https://schema.org/NewCondition"
      }
    },
    {
      "@type": "Product",
      "sku": "EO-PRS-SLT-L",
      "name": "Example Outfitters Packable Rain Shell, Slate, L",
      "color": "Slate",
      "size": "L",
      "image": "https://example.com/images/packable-rain-shell-slate.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://example.com/products/packable-rain-shell?color=slate&size=l",
        "price": 134.00,
        "priceCurrency": "USD",
        "availability": "https://schema.org/InStock",
        "itemCondition": "https://schema.org/NewCondition"
      }
    },
    {
      "@type": "Product",
      "sku": "EO-PRS-MOS-M",
      "name": "Example Outfitters Packable Rain Shell, Moss, M",
      "color": "Moss",
      "size": "M",
      "image": "https://example.com/images/packable-rain-shell-moss.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://example.com/products/packable-rain-shell?color=moss&size=m",
        "price": 129.00,
        "priceCurrency": "USD",
        "availability": "https://schema.org/InStock",
        "itemCondition": "https://schema.org/NewCondition"
      }
    },
    {
      "@type": "Product",
      "sku": "EO-PRS-MOS-L",
      "name": "Example Outfitters Packable Rain Shell, Moss, L",
      "color": "Moss",
      "size": "L",
      "image": "https://example.com/images/packable-rain-shell-moss.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://example.com/products/packable-rain-shell?color=moss&size=l",
        "price": 134.00,
        "priceCurrency": "USD",
        "availability": "https://schema.org/OutOfStock",
        "itemCondition": "https://schema.org/NewCondition"
      }
    }
  ]
}

Multi-page architecture

Now suppose each colour has its own page and sizes are selected on that page:

  • https://example.com/products/packable-rain-shell-slate
  • https://example.com/products/packable-rain-shell-moss

There is no single canonical URL for the family, so the ProductGroup has no url property. Google asks for the full ProductGroup definition on every variant page, with self-contained markup for that page’s variants. Variants on the other page are referenced by url alone.

In this example, each colour page is its own canonical, including when a ?size= parameter is present. The pages do not canonicalize to each other or to a family page:

<!-- On the Slate page -->
<link rel="canonical" href="https://example.com/products/packable-rain-shell-slate">

Markup on the Slate page:

{
  "@context": "https://schema.org",
  "@type": "ProductGroup",
  "name": "Example Outfitters Packable Rain Shell",
  "description": "Lightweight waterproof shell that packs into its own chest pocket.",
  "brand": { "@type": "Brand", "name": "Example Outfitters" },
  "productGroupID": "EO-PRS",
  "variesBy": ["https://schema.org/color", "https://schema.org/size"],
  "hasVariant": [
    {
      "@type": "Product",
      "sku": "EO-PRS-SLT-M",
      "name": "Example Outfitters Packable Rain Shell, Slate, M",
      "color": "Slate",
      "size": "M",
      "image": "https://example.com/images/packable-rain-shell-slate.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://example.com/products/packable-rain-shell-slate?size=m",
        "price": 129.00,
        "priceCurrency": "USD",
        "availability": "https://schema.org/InStock",
        "itemCondition": "https://schema.org/NewCondition"
      }
    },
    {
      "@type": "Product",
      "sku": "EO-PRS-SLT-L",
      "name": "Example Outfitters Packable Rain Shell, Slate, L",
      "color": "Slate",
      "size": "L",
      "image": "https://example.com/images/packable-rain-shell-slate.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://example.com/products/packable-rain-shell-slate?size=l",
        "price": 134.00,
        "priceCurrency": "USD",
        "availability": "https://schema.org/InStock",
        "itemCondition": "https://schema.org/NewCondition"
      }
    },
    { "url": "https://example.com/products/packable-rain-shell-moss?size=m" },
    { "url": "https://example.com/products/packable-rain-shell-moss?size=l" }
  ]
}

Markup on the Moss page mirrors it. The group facts stay identical, Moss variants are fully described, and Slate variants become references:

{
  "@context": "https://schema.org",
  "@type": "ProductGroup",
  "name": "Example Outfitters Packable Rain Shell",
  "description": "Lightweight waterproof shell that packs into its own chest pocket.",
  "brand": { "@type": "Brand", "name": "Example Outfitters" },
  "productGroupID": "EO-PRS",
  "variesBy": ["https://schema.org/color", "https://schema.org/size"],
  "hasVariant": [
    { "url": "https://example.com/products/packable-rain-shell-slate?size=m" },
    { "url": "https://example.com/products/packable-rain-shell-slate?size=l" },
    {
      "@type": "Product",
      "sku": "EO-PRS-MOS-M",
      "name": "Example Outfitters Packable Rain Shell, Moss, M",
      "color": "Moss",
      "size": "M",
      "image": "https://example.com/images/packable-rain-shell-moss.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://example.com/products/packable-rain-shell-moss?size=m",
        "price": 129.00,
        "priceCurrency": "USD",
        "availability": "https://schema.org/InStock",
        "itemCondition": "https://schema.org/NewCondition"
      }
    },
    {
      "@type": "Product",
      "sku": "EO-PRS-MOS-L",
      "name": "Example Outfitters Packable Rain Shell, Moss, L",
      "color": "Moss",
      "size": "L",
      "image": "https://example.com/images/packable-rain-shell-moss.jpg",
      "offers": {
        "@type": "Offer",
        "url": "https://example.com/products/packable-rain-shell-moss?size=l",
        "price": 134.00,
        "priceCurrency": "USD",
        "availability": "https://schema.org/OutOfStock",
        "itemCondition": "https://schema.org/NewCondition"
      }
    }
  ]
}

Google’s documentation also shows an equivalent pattern where the group is a separate entity with an @id and each variant points to it with isVariantOf. Choose one pattern per template and keep it consistent.

QA checklist

Check a sample of variants per template, including at least one unavailable variant:

CheckPass condition
ArchitectureMarkup pattern matches the real page model: single page with one family canonical, or distinct pages without a group url.
PreselectionOpening each offer URL directly shows that variant’s image, price, and availability.
Visible matchName, colour, size, price, currency, and availability in markup match the selected state on the page.
IdentifiersEvery variant has a unique sku or GTIN; GTINs are manufacturer-assigned, never invented.
Group IDproductGroupID is identical on every page of the family and matches inProductGroupWithID if that is also used.
RelationshipsvariesBy lists only properties that actually differ; each variant states its values for them.
Multi-page completenessEach page fully describes its own variants and references every other variant by its exact URL.
Feed alignmentPage, markup, and feed agree on price, availability, and grouping. See Merchant Center and Product Feed SEO.
ImagesVariant images are crawlable and represent the variant. See Image Discovery and Search Preview QA.

Validate syntax with the Rich Results Test or Schema Markup Validator, and monitor the relevant Search Console reports after release. Passing validation shows that the markup can be parsed. It does not guarantee a rich result or a merchant listing.

For general entity markup, see Schema Examples for Entity Clarity. For canonical behaviour beyond variants, see Canonical Tags and Duplicate Content.

Useful source references