Skip to content

Product structured data: price and stock in Google results

Guide/ 12 min read

What Google needs in Product JSON-LD, a complete example, what a Shopify theme already prints and how to validate it without guessing.

  • SEO
  • Shopify
  • Liquid
In this article (8)
  1. What product structured data is
  2. Required and recommended Product properties
  3. A complete Product JSON-LD example
  4. How a Shopify theme handles structured data
  5. Validate and fix errors (and who decides in the end)
  6. Common mistakes
  7. Frequently asked questions
  8. Checklist

Product structured data is a JSON-LD block on the page that tells Google exactly what you sell: name, image, price, currency, stock and reviews. With it, your product page can show up in search with its price, availability and star rating. It makes you eligible; Google decides whether to show it.

This guide covers which properties Google asks for, a complete tested JSON-LD example, what a Shopify theme already prints and how to validate it before and after you publish. If you have not checked the basics yet (indexing, canonicals, sitemap), start with the technical SEO foundations for Shopify stores.

What product structured data is

A product page already shows the price and the stock, but to a search engine that is loose text: "24" could be a price, a size or a review count. Structured data says it explicitly, in schema.org vocabulary: this is a Product, this is its name, and this is its offers with price and priceCurrency. Google supports three formats and recommends JSON-LD, per its general structured data guidelines: a <script type="application/ld+json"> separate from the visible HTML, easy to generate from a template.

For products, Google's Product structured data documentation separates two experiences:

  • Product snippets: for pages where people cannot buy, such as an editorial review. They lean on review information, including pros and cons.
  • Merchant listings: for pages where customers buy from you. They support more detail, such as sizing, shipping and returns.

A store wants the second one. There is a shortcut, too: per Google, a page with the required merchant listing properties can also be eligible for product snippets. And if you also run a Merchant Center feed, Google says providing both maximizes eligibility and helps it verify your data.

the same search result (illustrative)no structured dataexample.com › productsHandmade ceramic mugtitle and description onlywith structured dataexample.com › productsHandmade ceramic mug4.6/5 · 38 reviews$24.00 · In stockShipping $4.99 · 30-day returnsmarkup makes you eligible; google decidesprice, stock and reviews must also be visible on the page

Scroll the figure sideways to see all of it

One rule from the guidelines applies to everything below: do not mark up content visitors cannot see. If the JSON-LD says 4.6 stars, the reviews must be on the page; if it says in stock, the buy button must work.

This table sums up the merchant listing documentation as it stood on October 30, 2026:

PropertyLevelWhat goes in it
nameRequiredThe product name, as it appears on the page.
imageRequiredOne or more crawlable URLs. Google recommends several high-resolution images in 16x9, 4x3 and 1x1 ratios.
offersRequiredA nested Offer. You must be the seller.
offers.priceRequiredThe current price, as a number above zero.
offers.priceCurrencyRequiredA three-letter ISO 4217 code: USD, CAD, EUR.
offers.availabilityRecommendedOne value, such as https://schema.org/InStock or OutOfStock.
offers.itemConditionRecommendedNewCondition, RefurbishedCondition or UsedCondition.
brand, sku, gtin, mpnRecommendedProduct identifiers. If you have real GTINs, include them.
aggregateRating, reviewRecommendedOnly when the reviews come from customers and show on the page.
shippingDetails, hasMerchantReturnPolicyRecommendedShipping and returns. Google prefers a global policy (see below).

Product snippets ask for less: name plus at least one of review, aggregateRating or offers, per the product snippet documentation. Two rules rule out whole pages: only pages focused on one product (or variants of one product) count, not collection pages; and merchant listings only apply to pages where the product can actually be bought.

anatomy of a Product JSON-LD block"@type": "Product"one page, one product"name"required"image"requiredcrawlable URL"brand", "sku"recommendedidentify the product"aggregateRating"recommendedonly with visible reviews"offers": Offerrequiredmerchant listings"price"requirednumber above 0"priceCurrency"requiredISO 4217: MXN, USD"availability"recommendedschema.org/InStock"shippingDetails"recommendedor in Merchant Center"hasMerchantReturnPolicy"recommendedor in Search Consolewithout the required ones there is no rich resultrecommended ones add detail; they are not needed to be eligible

Scroll the figure sideways to see all of it

A complete Product JSON-LD example

This example is fictional and illustrative: the store, brand, price and reviews do not exist, and the URLs use the reserved example.com domain. We parsed it with JSON.parse and a local script checked it against the rules in the table above:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Handmade ceramic mug, 12 oz",
  "description": "Hand-glazed stoneware mug. Dishwasher and microwave safe.",
  "image": [
    "https://example.com/photos/1x1/blue-mug.jpg",
    "https://example.com/photos/4x3/blue-mug.jpg",
    "https://example.com/photos/16x9/blue-mug.jpg"
  ],
  "sku": "MUG-BLUE-12",
  "brand": { "@type": "Brand", "name": "Example Ceramics" },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": 4.6,
    "reviewCount": 38
  },
  "offers": {
    "@type": "Offer",
    "url": "https://example.com/products/blue-mug-12oz",
    "price": 24.00,
    "priceCurrency": "USD",
    "itemCondition": "https://schema.org/NewCondition",
    "availability": "https://schema.org/InStock",
    "shippingDetails": {
      "@type": "OfferShippingDetails",
      "shippingRate": { "@type": "MonetaryAmount", "value": 4.99, "currency": "USD" },
      "shippingDestination": { "@type": "DefinedRegion", "addressCountry": "US" },
      "deliveryTime": {
        "@type": "ShippingDeliveryTime",
        "handlingTime": { "@type": "QuantitativeValue", "minValue": 0, "maxValue": 1, "unitCode": "DAY" },
        "transitTime": { "@type": "QuantitativeValue", "minValue": 2, "maxValue": 5, "unitCode": "DAY" }
      }
    },
    "hasMerchantReturnPolicy": {
      "@type": "MerchantReturnPolicy",
      "applicableCountry": "US",
      "returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
      "merchantReturnDays": 30,
      "returnMethod": "https://schema.org/ReturnByMail",
      "returnFees": "https://schema.org/FreeReturn"
    }
  }
}
</script>

Block by block:

  1. <script type="application/ld+json">: the container. The browser does not render it; Google reads it. It can sit in the <head> or the <body>.
  2. @context and @type: the vocabulary (schema.org) and the kind of thing you describe, a Product.
  3. name, description, image: the name as in the page's H1, a real description and three photos in the ratios Google recommends. Image URLs must be crawlable and indexable.
  4. sku and brand: identifiers. With a real GTIN (the barcode number) add gtin12, gtin13 or whichever applies; never make one up.
  5. aggregateRating: the average (ratingValue) and how many reviews (reviewCount). Without bestRating, Google assumes a 5-point scale. Drop this block if the reviews are not on the page.
  6. offers: the price as a number with a decimal point and no symbol, the ISO 4217 currency, the condition and the availability as a full schema.org URL.
  7. shippingDetails: the shipping rate, destination country, handling days (handlingTime) and transit days (transitTime), in DAY.
  8. hasMerchantReturnPolicy: country, policy type, a 30-day window, return by mail and free returns. With MerchantReturnFiniteReturnWindow, merchantReturnDays is required.

On shipping and returns, Google recommends one global policy in your Organization markup and the Offer properties only for products that differ. You can also set both at account level in Merchant Center or Search Console. If you define them in several places, Google's published order of precedence is: product feed in Merchant Center, Content API, Merchant Center or Search Console settings, product-level markup and, last, organization-level markup.

How a Shopify theme handles structured data

Shopify has a filter for this. The structured_data filter turns a product (or article) object into schema.org: a Product when it has no variants and a ProductGroup when it has them. Dawn, Shopify's reference theme, prints it in sections/main-product.liquid like this:

<script type="application/ld+json">
  {{ product | structured_data }}
</script>

In the documentation's example, the output carries name, description, image, brand (the vendor), url and an offers with price, priceCurrency, availability and url. That covers the required set. It carries no shipping or returns; on Shopify the simplest route for those is the account-level settings in Merchant Center or Search Console, which Google accepts.

Before changing anything, check what your store already prints: open a product page, view the source and search for application/ld+json. Two Product blocks are common, one from the theme and one from a reviews app. If they disagree (another price, another currency), you are handing Google two versions of the truth; keep one.

If your theme does not use the filter, or you need control over every property, build the JSON-LD yourself with the json filter, which adds the quotes and escapes whatever needs it. This snippet passed shopify theme check in a minimal local theme:

{% doc %}
  Prints Product JSON-LD for the selected or first available variant.
  @param {product} product - The product on the page
  @example
  {% render 'product-json-ld', product: product %}
{% enddoc %}
{%- assign variant = product.selected_or_first_available_variant -%}
<script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "Product",
    "name": {{ product.title | json }},
    "description": {{ product.description | strip_html | strip | json }},
    {%- if product.featured_image %}
    "image": {{ product.featured_image | image_url: width: 1200 | prepend: 'https:' | json }},
    {%- endif %}
    {%- if variant.sku != blank %}
    "sku": {{ variant.sku | json }},
    {%- endif %}
    "brand": { "@type": "Brand", "name": {{ product.vendor | json }} },
    "offers": {
      "@type": "Offer",
      "url": {{ variant.url | prepend: request.origin | json }},
      "price": {{ variant.price | divided_by: 100.0 }},
      "priceCurrency": {{ cart.currency.iso_code | json }},
      "itemCondition": "https://schema.org/NewCondition",
      "availability": "https://schema.org/{% if variant.available %}InStock{% else %}OutOfStock{% endif %}"
    }
  }
</script>

Line by line:

  • {% doc %}: the LiquidDoc header Shopify asks for in snippets. Render it with {% render 'product-json-ld', product: product %} instead of the filter block, not next to it.
  • assign variant: the selected variant or the first available one, so price, SKU and stock match what the shopper sees.
  • | json on every string: if the title contains quotes, like Mug "blue", the JSON stays valid. Typing "{{ product.title }}" by hand breaks it.
  • if product.featured_image and if variant.sku != blank: they skip empty properties. Each block ends in a comma and is followed by a fixed property, so the JSON is valid either way.
  • prepend: 'https:': image_url returns a URL that starts with //; this completes it.
  • prepend: request.origin: variant.url is relative; request.origin adds the store's protocol and domain.
  • divided_by: 100.0: Liquid prices are in cents; dividing by 100.0 gives a decimal with a point. Shopify warns against money_without_currency for a schema.org price: with a currency format that uses a decimal comma the value becomes invalid.
  • cart.currency.iso_code: the currency the shopper sees the price in, as an ISO code.
  • availability: InStock or OutOfStock from the variant.

We checked it with shopify theme check and rendered its JSON with sample values (with and without SKU, image and stock) to confirm it parses. We did not render it on a live store: try it on a development theme before you publish it.

Validate and fix errors (and who decides in the end)

Google's suggested flow has two tools and a report:

  1. Rich Results Test. At search.google.com/test/rich-results you enter a public URL or paste a code snippet. It tests as a smartphone by default. The Rich Results Test help groups results into valid items, valid items with warnings and invalid items. Google asks you to fix critical errors; warnings improve your data but are not needed for eligibility. To test a URL, the page and its resources must be reachable without a password.
  2. URL Inspection. After you publish a few pages, Search Console shows how Google sees them and whether something blocks crawling: robots.txt, noindex or a login wall.
  3. Search Console reports. Under Shopping you get "Product snippets" and "Merchant listings", with valid and invalid items across the site. Once you fix an issue, the Validate fix button checks a sample of pages first; per the validation help page, it typically takes up to about two weeks and notifies you when it ends.
from your theme to the Search Console report1JSON-LDin the theme2Rich ResultsTestURL or code3fixerrors firstthen test again4publisha few pages5URL Inspectionhow Google sees it6Search ConsoleShopping reportsValidate fixGoogle decides whether to show the rich resultvalidating a fix typically takes up to about two weekspassing the test does not guarantee the resultthe test checks syntax; Google checks the policies afterwards

Scroll the figure sideways to see all of it

And the part people skip: passing the test guarantees nothing. The guidelines say it plainly: Google does not guarantee that your structured data will show up in search results. It makes you eligible; Google decides when and what to show, and the Product documentation adds that enhancements such as ratings, shipping or returns are shown at each experience's discretion. The test checks syntax, not policy: markup describing something that is not on the page can end in a manual action, which removes rich result eligibility (per Google, it does not change how the page ranks in web search).

Typical messageLikely causeFix
Missing offers, review or aggregateRatingOnly name and image are thereAdd the Offer with price and currency
Invalid price valueA price with a comma or symbol: "24,00", "$24"A number with a point: 24.00
Missing priceCurrencyNo currency, or a symbol instead of a codeAn ISO 4217 code: USD
Parsing errorUnescaped quotes in the name, or a stray commaUse | json on every string

These messages are examples of what usually goes wrong, not the tool's exact wording, which changes over time.

Common mistakes

  • Marking up reviews nobody can see. If the block says 4.6 stars, the reviews must be on the page and come from customers.
  • Two Product blocks that disagree. The theme and an app each print their own, with a different price or currency. Keep one.
  • A money-formatted price. money_without_currency or a decimal comma leave an invalid price. Use a number with a point.
  • Stale price or stock. The JSON-LD has to follow the variant and the inventory, just like the HTML.
  • Marking up collections as products. Product results are for single-product pages or their variants.
  • Treating a passing test as a promise of stars. It makes you eligible. Google decides.
  • Testing once and ignoring the report. The test checks one page; the Search Console report tells you when hundreds break.

Frequently asked questions

Does structured data improve my Google ranking?

Google does not frame it that way. It helps Google understand the page and makes it eligible for rich results with price, stock or stars. What can change is how your result looks, not a guaranteed position.

Do I need an app if my theme already uses structured_data?

Not for the required properties: the filter already prints the name, image, brand and an offer with price, currency and availability. An app makes sense when you need something the theme does not cover, and then check it does not leave two Product blocks.

How long until the rich result shows up?

There is no set time. Google has to recrawl the page, and even with everything valid it may not show it. If you fix an issue from the report, validation typically takes up to about two weeks.

Can I test the JSON-LD before publishing it?

Yes: in the Rich Results Test, choose Code and paste the snippet. To test a URL, the page must be public; the tool cannot see behind a password.

Checklist

  • Each product page has exactly one Product block in JSON-LD.
  • name, image and an offers with a price above zero and an ISO 4217 priceCurrency are there.
  • availability uses a schema.org value and matches the real stock.
  • The price is a number with a point, no symbol, no comma.
  • Marked-up reviews are visible on the page and come from customers.
  • Shipping and returns are in the markup or set in Merchant Center or Search Console.
  • The Rich Results Test shows no critical errors.
  • You watch the Product snippets and Merchant listings reports in Search Console.

Structured data tells Google what you sell; the page still has to load fast and be easy to buy from. For the first part, continue with how to fix your hero image's LCP. If your products run into trouble in Shopping, see why Google Merchant Center rejects products, and for the full base, the technical SEO foundations for Shopify stores.

Saw this on Instagram? Comment SEO on the Reel and I'll send you the guide.

Written by

Luis Morales

Luis Morales

Frontend and Shopify developer, EcomLabs

@luismoralesdev on Instagram

Published October 30, 2026 · updated November 1, 2026

← Blog