·9 min read·UCPReady Team

Schema.org for E-Commerce: The Complete Guide to Product Markup for AI Shopping

Schema.org structured data helps AI agents understand your products. Learn how to implement Product markup in JSON-LD with required fields, examples, and testing tools.

schema-orgstructured-datajson-ldecommerceai-shopping

Schema.org structured data is the foundation of how AI shopping agents understand your products. When an AI agent visits your product page, it does not "read" the page the way a human does. It looks for structured data — specifically, JSON-LD markup — that describes the product in a machine-readable format.

If your product pages lack schema.org markup, AI agents have to guess what you are selling based on page content alone. That guessing is unreliable, and it means your products are far less likely to appear in AI shopping results.

This guide covers everything you need to implement proper Product markup for AI shopping.

#What Is Schema.org and Why Do AI Agents Use It?

Schema.org is a collaborative vocabulary created by Google, Microsoft, Yahoo, and Yandex to provide a shared set of schemas for structured data on the web. It defines types like Product, Offer, Review, and Organization — along with their properties — so that machines can reliably extract information from web pages.

AI shopping agents rely on schema.org because it removes ambiguity. Consider a product page that displays "$49.99" somewhere in the text. Without schema, the AI agent has to figure out: Is that the current price? A sale price? A price for a different variant? With schema.org Offer markup, the price is explicitly tagged with its currency, availability status, and the specific product it applies to.

The major AI platforms that use schema.org for product discovery include:

  • ChatGPT Shopping — Uses Product schema for its shopping carousels
  • Google Gemini — Deeply integrated with Google's structured data ecosystem
  • Perplexity — Extracts product details from schema.org during web searches
  • Claude — Uses structured data to provide accurate product recommendations

#JSON-LD: The Preferred Format

Schema.org structured data can be implemented in three formats: JSON-LD, Microdata, and RDFa. For e-commerce, JSON-LD is the preferred format and the one all AI agents support best.

JSON-LD (JavaScript Object Notation for Linked Data) is added to your page as a <script> tag in the HTML head or body. It does not affect the visual appearance of your page — it is purely machine-readable.

HTML
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Product Name Here"
}
</script>

The key advantage of JSON-LD over Microdata or RDFa is that it is completely separate from your HTML markup. You do not need to add attributes to existing elements — you just add a script block with the structured data.

#Required vs. Optional Product Fields

Not all schema.org fields are equal. Some are essential for AI shopping agents to recommend your products, while others add helpful context.

#Required Fields

These fields are the minimum needed for a product to appear in AI shopping results:

| Field | Description | Example | |-------|-------------|---------| | @type | Must be "Product" | "Product" | | name | Product name | "Merino Wool Hiking Socks" | | description | Product description | "Lightweight merino wool socks..." | | image | Product image URL | "https://store.com/socks.jpg" | | offers | Pricing and availability | See Offer section below |

The offers field must include:

| Offer Field | Description | Example | |-------------|-------------|---------| | @type | Must be "Offer" | "Offer" | | price | Numeric price | "24.99" | | priceCurrency | ISO 4217 currency code | "USD" | | availability | Stock status URL | "https://schema.org/InStock" | | url | Link to buy the product | "https://store.com/products/socks" |

These fields significantly improve how AI agents understand and rank your products:

Brand information:

JSON
"brand": {
  "@type": "Brand",
  "name": "TrailPeak"
}

Aggregate ratings:

JSON
"aggregateRating": {
  "@type": "AggregateRating",
  "ratingValue": "4.6",
  "reviewCount": "234"
}

Individual reviews:

JSON
"review": [
  {
    "@type": "Review",
    "author": { "@type": "Person", "name": "Sarah M." },
    "reviewRating": {
      "@type": "Rating",
      "ratingValue": "5"
    },
    "reviewBody": "Best hiking socks I have ever owned."
  }
]

Product identifiers (GTIN, SKU, MPN):

JSON
"sku": "TP-SOCK-MW-LG",
"gtin13": "0123456789012",
"mpn": "MW-HIKE-001"

#Optional but Helpful Fields

These fields provide additional context that AI agents can use for more specific queries:

  • color — Product color
  • material — What the product is made of
  • weight — Product weight
  • size — Product size or dimensions
  • category — Product category
  • additionalProperty — Any custom attributes (e.g., "waterproof: yes")

#Complete JSON-LD Example

Here is a comprehensive example for a product page that covers all the important fields:

HTML
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Merino Wool Hiking Socks — Lightweight Crew",
  "description": "Lightweight merino wool hiking socks with reinforced heel and toe, moisture-wicking construction, and seamless toe closure. Perfect for day hikes and trail running in warm to moderate conditions.",
  "image": [
    "https://trailpeak.com/images/merino-socks-main.jpg",
    "https://trailpeak.com/images/merino-socks-detail.jpg",
    "https://trailpeak.com/images/merino-socks-worn.jpg"
  ],
  "brand": {
    "@type": "Brand",
    "name": "TrailPeak"
  },
  "sku": "TP-SOCK-MW-LG",
  "gtin13": "0123456789012",
  "mpn": "MW-HIKE-001",
  "color": "Charcoal Grey",
  "material": "65% Merino Wool, 25% Nylon, 10% Elastane",
  "category": "Clothing > Socks > Hiking Socks",
  "offers": {
    "@type": "Offer",
    "price": "24.99",
    "priceCurrency": "USD",
    "availability": "https://schema.org/InStock",
    "url": "https://trailpeak.com/products/merino-wool-hiking-socks",
    "seller": {
      "@type": "Organization",
      "name": "TrailPeak"
    },
    "shippingDetails": {
      "@type": "OfferShippingDetails",
      "shippingRate": {
        "@type": "MonetaryAmount",
        "value": "0",
        "currency": "USD"
      },
      "deliveryTime": {
        "@type": "ShippingDeliveryTime",
        "handlingTime": {
          "@type": "QuantitativeValue",
          "minValue": 1,
          "maxValue": 2,
          "unitCode": "d"
        },
        "transitTime": {
          "@type": "QuantitativeValue",
          "minValue": 3,
          "maxValue": 5,
          "unitCode": "d"
        }
      },
      "shippingDestination": {
        "@type": "DefinedRegion",
        "addressCountry": "US"
      }
    },
    "hasMerchantReturnPolicy": {
      "@type": "MerchantReturnPolicy",
      "returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
      "merchantReturnDays": 30,
      "returnMethod": "https://schema.org/ReturnByMail",
      "returnFees": "https://schema.org/FreeReturn"
    }
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.6",
    "reviewCount": "234",
    "bestRating": "5",
    "worstRating": "1"
  },
  "review": [
    {
      "@type": "Review",
      "author": {
        "@type": "Person",
        "name": "Sarah M."
      },
      "datePublished": "2026-01-15",
      "reviewRating": {
        "@type": "Rating",
        "ratingValue": "5",
        "bestRating": "5"
      },
      "reviewBody": "Best hiking socks I have ever owned. No blisters on a 14-mile day hike. The merino wool keeps my feet dry and the cushioning is perfect — not too thick, not too thin."
    },
    {
      "@type": "Review",
      "author": {
        "@type": "Person",
        "name": "Mike T."
      },
      "datePublished": "2026-02-01",
      "reviewRating": {
        "@type": "Rating",
        "ratingValue": "4",
        "bestRating": "5"
      },
      "reviewBody": "Great socks overall. Comfortable and durable. Only reason for 4 stars instead of 5 is that I wish they came in more color options."
    }
  ]
}
</script>

This example gives AI agents everything they need: product identity, pricing, availability, brand, ratings, reviews, shipping, and returns. A product page with this level of markup will be strongly preferred by AI shopping agents over one with minimal or no schema.

#Testing Your Schema Markup

Before you consider your markup done, test it with these tools:

#Google Rich Results Test

URL: https://search.google.com/test/rich-results

Paste your product page URL and Google will show you exactly what structured data it finds, along with any errors or warnings. This is the gold standard for testing because Google's parser is what many other systems are based on.

#Schema.org Validator

URL: https://validator.schema.org

The official schema.org validation tool checks your markup against the full schema.org specification. It is more strict than Google's tool and can catch issues with property types and required fields.

#UCPReady.ai Scanner

Our scanner specifically checks your product schema for AI shopping readiness. It goes beyond syntax validation to check whether your markup includes the fields AI agents actually need — like offers with price and availability — and flags common issues that reduce your AI shopping visibility.

#Platform-Specific Implementation

#Shopify

Shopify themes typically include basic Product schema automatically. However, the default markup is often minimal. Check your theme's product.liquid or product.json template to see what schema is included. Many Shopify merchants add more comprehensive schema through:

  • Theme code customization (editing the JSON-LD in the product template)
  • Apps like JSON-LD for SEO, Smart SEO, or Schema Plus
  • Shopify's built-in structured data features (which have expanded significantly)

#WooCommerce

WooCommerce includes basic Product schema through its default templates. For more comprehensive markup, use:

  • Yoast SEO or Rank Math (both add enhanced Product schema)
  • WooCommerce-specific schema plugins
  • Custom code in your theme's single-product.php template

#Headless / Custom Stores

If you are running a headless commerce setup or custom-built store, you need to implement JSON-LD manually. Add the script tag to your product page template and populate it dynamically from your product data. Make sure the JSON-LD is rendered server-side — not injected via client-side JavaScript — so that crawlers can parse it without executing JavaScript.

#Common Schema Mistakes

Missing offers. A Product without an Offer is useless for shopping. Always include price and availability.

Stale availability data. If your schema says InStock but the product is actually sold out, AI agents will learn to distrust your data. Keep availability in sync with your actual inventory.

Using Microdata instead of JSON-LD. While technically valid, Microdata is harder to maintain and some AI parsers handle it less reliably than JSON-LD. Migrate to JSON-LD if you are still using Microdata.

Duplicate schema blocks. If your theme and a plugin both inject Product schema, you may have duplicate or conflicting markup. Use your browser's developer tools to search for application/ld+json and make sure there is only one Product schema per page.

Missing images. Products without images in their schema rarely appear in AI shopping carousels. Always include at least one high-quality image URL.

#Next Steps

Start with the required fields. Get name, description, image, and offers (with price, priceCurrency, and availability) on every product page. Then progressively add brand, aggregateRating, review, and product identifiers.

Test each change with the Google Rich Results Test to make sure your markup is valid. Then scan your store with UCPReady.ai to see how your schema markup scores in the context of overall AI shopping readiness.

Check your store’s AI readiness

Free scan — see how AI shopping agents perceive your store in under 60 seconds.

Scan Your Store Free