Skip to content
Koit Academy

Websites & SEO

·

5 min read

How to Add Product Schema Markup for Google

How to add Product structured data to a product page, the required and recommended properties, a JSON-LD example, and how to test it for Google.

By Koit Academy

Product schema is structured data that describes a product in a form search engines can read without guessing: its name, images, price, availability and brand. On a page where the product can be bought, it makes the page eligible for richer results in Google, such as the price and availability shown with the listing. It does not guarantee them, but without it Google has to work those details out from the page itself.

Two kinds of product markup

Google describes two uses:

  • merchant listing markup, for pages where a shopper can buy the product from you. It needs an Offer with a price, because you are the seller.
  • product snippet markup, for pages that review or describe products without selling them, such as an editorial review. These can use an AggregateOffer showing a price range from several sellers.

This guide covers the first, the common case for a shop’s product pages.

What is required

For a merchant listing, Google requires:

  • name: the product’s name;
  • image: one or more image URLs, ideally several high-resolution images in 16x9, 4x3 and 1x1 ratios;
  • offers: an Offer with the price, above zero, and the priceCurrency, as a three-letter code such as USD or EUR.
  • description: a plain summary of the product;
  • brand: the brand name;
  • gtin, mpn or sku: identifiers that tell Google exactly which product it is;
  • availability: in stock, out of stock, pre-order;
  • itemCondition: new, used or refurbished;
  • url of the product page on the offer.

A JSON-LD example

Google recommends JSON-LD, a block of structured data in a script tag, usually in the page’s head. For an example backpack:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Trailhead 40L Waterproof Hiking Backpack",
  "image": [
    "https://www.example.com/images/trailhead-40-1x1.jpg",
    "https://www.example.com/images/trailhead-40-4x3.jpg",
    "https://www.example.com/images/trailhead-40-16x9.jpg"
  ],
  "description": "A 40-litre hiking pack with a roll-top waterproof main compartment.",
  "brand": { "@type": "Brand", "name": "Trailhead" },
  "sku": "TH-40-GRN",
  "gtin": "4006381333931",
  "offers": {
    "@type": "Offer",
    "url": "https://www.example.com/packs/trailhead-40/",
    "price": 129,
    "priceCurrency": "USD",
    "availability": "https://schema.org/InStock",
    "itemCondition": "https://schema.org/NewCondition"
  }
}
</script>

The product schema generator builds this block from a form, with the required and recommended fields, and checks the price and currency before you copy it.

Where to put it

Paste the block into the product page’s HTML, in the head or the body. On most platforms that means a theme template, a plugin, or a field for custom code. Many shop platforms already add product markup; check before adding a second copy, because two conflicting blocks for one product cause errors.

The markup must match the page

Structured data describes what is on the page. The price, availability and name in the markup must match what a visitor sees. If the price changes, the markup must change with it; most shop platforms that generate markup do this automatically, and hand-written markup is easy to forget.

Reviews and ratings

Product markup can include ratings and reviews, but Google says rating markup must follow its review snippet guidelines, and it may only describe real reviews that visitors can see on the page. Adding ratings that do not exist, or that are not shown on the page, breaks those guidelines and can lead to the rich results being removed. If your shop collects genuine reviews, the review platform usually adds the markup for you.

Shipping and returns

Shipping costs and return policies can be added to each offer, but Google also allows them to be declared once for the whole shop in Organization markup. The organization schema generator builds that block, which also describes your business name, logo and contact details.

A product page several levels deep in a shop benefits from breadcrumb markup, which shows the path, such as Home > Packs > Hiking packs, in search results. The breadcrumb schema generator builds it from the page’s trail.

Products with variants

Many products come in sizes or colours. Each variant that has its own page, or its own price, can have its own markup with its own SKU, GTIN and offer. Google’s documentation also describes a way to group variants of one product together; if your shop has many variants, check the current guidance and whether your platform already supports it before writing it by hand.

Common errors

  • A price written as text, such as “$129.00”, instead of a number with the currency in priceCurrency.
  • A currency name instead of the three-letter code: “dollars” instead of USD.
  • Images Google cannot reach, blocked by robots.txt or behind a login.
  • Availability not updated when stock runs out, so the markup says in stock while the page says sold out.
  • Two blocks for one product, one from the platform and one added by hand, with different prices.
  • Markup on category pages describing many products as if they were one.

Testing it

  1. Run the page through Google’s Rich Results Test and fix any errors it reports.
  2. Check with the URL Inspection tool in Search Console that Google can see the live page and its markup.
  3. Watch the Merchant listings report in Search Console for errors across all product pages.
  4. Make sure product pages are in your sitemap, so Google finds new ones quickly. Our guide on how to submit a sitemap to Google covers it.

Warnings about missing recommended fields do not stop the markup working, but filling them in gives Google more to use.

Common questions

Does product schema improve rankings? It is not described as a ranking factor. It helps Google understand the product and makes the page eligible for richer results, which can improve clicks.

Is JSON-LD better than microdata? Google supports both and recommends JSON-LD, because it is separate from the page’s HTML and easier to maintain.

Do I need a GTIN? It is recommended where the product has one. Products without one, such as handmade items, can use other identifiers like SKU.

Should an out-of-stock product keep its markup? Yes. Keep the markup and change availability to out of stock, so search results show the right status rather than losing the product’s details altogether.

Can I mark up a product I do not sell? Use product snippet markup for review pages, not merchant listing markup.

Limits of this guide

Google’s structured data rules change from time to time. Check its current documentation and test every template after changes.

Sources, read November 15, 2026: