support@schemaclinic.com Free JSON-LD checker Free schema generator Shopify App Store
Schema guide

Shopify's structured_data Liquid filter: a JSON-LD guide

Shopify gives themes one built-in tool for schema: the structured_data Liquid filter. It turns a product or an article into JSON-LD in a single line. Here is what it outputs, what it leaves out, and when to add to it or replace it.

Short answer: structured_data is a Liquid filter that converts an object into schema.org JSON-LD. According to Shopify's documentation it supports two objects: product, output as a Product (or a ProductGroup when the product has variants), and article, output as an Article. You wrap it in a <script type="application/ld+json"> tag. Shopify's Dawn theme uses it on product and blog post pages. It does not cover the rest of the store (Organization, breadcrumbs, collections), and it has no review or shipping data, so many stores add to it.

What the structured_data filter does

Shopify's structured_data filter documentation describes it as converting an object into schema.org structured data. A theme uses it like this:

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

The filter returns the JSON itself, not the script tag, so the theme supplies the wrapper. It works on two objects:

  • product: a schema.org Product if the product has no variants, or a ProductGroup if it has one or more variants.
  • article: a schema.org Article for a blog post.

It does not accept collection, shop, page or blog. Anything beyond products and articles has to be written by hand or added by an app.

The Shopify Liquid structured_data filter is not to be confused with Shopify Liquid schema settings, which are defined in a theme section's {% schema %} tag and control the theme editor. See section schema vs schema markup.

What it outputs for a product

Shopify's documented example of product output includes @context, @id, @type, name, description, url, image, brand, category and offers, where each Offer has its own @id, price, priceCurrency, availability and url. For products with variants, the ProductGroup structure is the one Google describes in its product variant documentation: a group with the variants listed beneath it.

The schema Shopify Liquid produces through this filter comes straight from Shopify admin: the product's title, description, images, prices and stock status, among others. If those fields are thin in admin, the markup is thin too; our guide to Shopify product data for schema shows which field feeds which property.

Because the filter is part of the platform, Shopify can change and improve its output without a theme update. That is a strength, and one reason to check your product pages from time to time rather than assume they are unchanged. View the result on any product page with Google's Rich Results Test or the Schema Markup Validator.

How Dawn uses it

Shopify's free Dawn theme is the clearest example. Reading its public source (as of November 2026):

  • sections/main-product.liquid outputs {{ product | structured_data }} inside a JSON-LD script tag.
  • sections/main-article.liquid outputs {{ article | structured_data }} the same way.
  • sections/header.liquid writes Organization and, on the home page only, WebSite markup by hand, because the filter does not cover them.

Many themes built on Dawn keep this pattern. Others write their own Product JSON-LD from scratch, and some older themes still use Microdata in the product template. Our guide does Shopify add schema automatically? has the full table of what Dawn outputs.

What the filter leaves out

The filter gives a sound base for product snippets and merchant listings, but there are gaps that matter to Google:

  • Reviews and ratings. Shopify does not hold your review data, so there is no aggregateRating or review. Review apps add these, often as a separate block. See review and AggregateRating schema.
  • Shipping and returns. No shippingDetails or hasMerchantReturnPolicy in the documented output. Search Console flags these as missing recommended fields; see missing field "shippingDetails" and missing field "hasMerchantReturnPolicy".
  • Identifiers. The documented example has no gtin, mpn or sku. Check your own output, because Shopify may add fields over time.
  • priceValidUntil, which leads to a common warning; see missing field "priceValidUntil".
  • Links to the rest of the store. No seller or brand reference to your Organization by @id.
  • Every other page type. No Organization, WebSite, BreadcrumbList or CollectionPage. See CollectionPage vs ItemList for collection pages.

Warnings for missing recommended fields do not stop rich results. They point at information Google could use.

Extend it, replace it, or leave it?

There are three sensible paths:

  1. Leave it. If the Rich Results Test shows valid Product markup and a review app adds ratings cleanly, the filter may be all you need. Shipping and returns can also be set in Google Merchant Center or Search Console instead of markup.
  2. Extend around it. Keep the filter and add separate blocks for what it misses: Organization, breadcrumbs, collections. Do not try to edit the filter's output; it is a finished string.
  3. Replace it. Remove the filter line and output a complete, hand-written or app-generated Product block that includes everything. This is the route when you need identifiers, shipping, returns and links in one place.

What you must not do is add a second full Product block and leave the filter running. That is the most common cause of duplicate Product schema on Shopify: two Product items on one page, sometimes with different prices. See duplicate Product schema on Shopify.

Replacing it safely

If you replace the filter and write schema in Shopify Liquid by hand, duplicate the theme first, then find the line (search the theme code for structured_data) and remove or comment it out in the copy. Output your own block with every Liquid value passed through the json filter, so a quote in a product title cannot break the JSON. Test the copy with the Rich Results Test before publishing. Our step-by-step guide how to add JSON-LD to Shopify covers the edit in full.

A schema app that injects markup through an app embed avoids editing theme code, but you still need to switch off the theme's filter output or you get duplicates. Schema Clinic's audit shows whether the filter, the theme and any apps are each outputting Product markup, with the source of every block. Its Pro generator ($19.99/month) builds Product with offers, brand, identifiers and ratings where review data exists, linked to your Organization by @id. Install from the Shopify App Store.

Questions people ask

What does the Shopify structured_data filter do?
It converts a product or article object into schema.org JSON-LD. Products become Product, or ProductGroup when they have variants; articles become Article.
Does structured_data work on collections?
No. Shopify documents only the product and article objects. Collection, blog and page markup has to be written by hand or added by an app.
Does the filter include reviews?
No. Shopify does not store your reviews, so rating and review markup comes from a review app, usually as a separate block.
Can I add fields to the filter's output?
Not directly. The filter returns a finished JSON string. To add fields, replace the filter with your own Product block, or add separate blocks for other types.
Why do I have two Product blocks on my Shopify product page?
Usually the theme's structured_data line is still running alongside an app's or a developer's Product block. Remove one source so each page has a single Product.

See what Google sees on your store

Run an audit in minutes. Every schema block, every error and duplicate, with its source.

Install Schema Clinic