Shopify Product Feeds

Shopify product feed XML format:
structure, fields, and AI compatibility

How Shopify's native /products.json maps to Google Shopping XML, what fields AI shopping agents actually read, and how to export or generate a compliant XML product feed from your Shopify store.

TL;DR Shopify's native feed is JSON at /products.json, not XML. AI shopping agents read on-page JSON-LD, not bulk feed files. XML feeds matter for Google Merchant Center → Google AI Mode. Use the Google & YouTube channel app for GMC sync, and ensure on-page Product JSON-LD is present for direct AI agent discovery.

Shopify's native product feed: /products.json

Every public Shopify store exposes a JSON endpoint at https://yourstore.com/products.json. This is the starting point for any product feed work. By default it returns up to 250 products per page, paginated via ?page=2 or cursor-based ?limit=250&since_id= for large catalogs.

Sample /products.json response structure

{
  "products": [
    {
      "id": 7891234567890,
      "title": "Merino Wool Crew Neck Sweater",
      "body_html": "<p>100% merino wool...</p>",
      "vendor": "Patagonia",
      "product_type": "Sweater",
      "handle": "merino-wool-crew-neck-sweater",
      "status": "active",
      "tags": "merino,wool,sustainable,sweater",
      "variants": [
        {
          "id": 4321098765432,
          "title": "S / Navy",
          "price": "129.00",
          "compare_at_price": "159.00",
          "sku": "MW-CREW-S-NAV",
          "barcode": "0123456789012",
          "inventory_quantity": 14,
          "inventory_policy": "deny",
          "fulfillment_service": "manual",
          "requires_shipping": true,
          "weight": 0.45,
          "weight_unit": "kg"
        }
      ],
      "images": [
        {
          "id": 1122334455667,
          "src": "https://cdn.shopify.com/s/files/.../merino-crew-navy.jpg",
          "alt": "Merino Wool Crew Neck Sweater in Navy",
          "width": 1200,
          "height": 1200
        }
      ],
      "options": [
        { "name": "Size", "values": ["XS","S","M","L","XL"] },
        { "name": "Color", "values": ["Navy","Forest Green","Charcoal"] }
      ]
    }
  ]
}

Mapping /products.json to Google Shopping XML

Google Merchant Center expects an XML feed using the Google Content API schema with the g: namespace. The mapping from Shopify's JSON to Google's XML attributes is mostly straightforward but requires several transformations:

Google XML attributeShopify source fieldNotes / transformation
g:idvariants[].sku or variants[].idMust be unique per variant; use SKU when available
g:titletitle + variant titleAppend variant for non-default variants: "Sweater - S / Navy"
g:descriptionbody_html stripped of HTMLStrip all tags; max 5000 chars; no HTML entities
g:linkshop URL + handle + ?variant=Include variant ID for multi-variant products
g:image_linkimages[0].srcUse first image; min 100×100px; no watermarks
g:pricevariants[].priceFormat: "129.00 USD" (price + space + ISO currency)
g:sale_pricevariants[].price when compare_at_price > priceOnly set when product is on sale
g:availabilityvariants[].inventory_quantity + policy"in_stock" / "out_of_stock" / "preorder"
g:brandvendorRequired for most categories
g:gtinvariants[].barcodeRequired if globally registered; skip if private-label
g:mpnvariants[].skuUse when GTIN is absent
g:conditionStatic: "new"Most Shopify stores sell new; set "used" for secondhand
g:product_typeproduct_typeMaps to Google product category taxonomy

Minimal valid Google Shopping XML feed structure

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
  <channel>
    <title>My Shopify Store</title>
    <link>https://mystore.com</link>
    <description>Product feed for Google Merchant Center</description>
    <item>
      <g:id>MW-CREW-S-NAV</g:id>
      <g:title>Merino Wool Crew Neck Sweater - S / Navy</g:title>
      <g:description>100% merino wool crew neck sweater...</g:description>
      <g:link>https://mystore.com/products/merino-wool-crew-neck-sweater?variant=4321098765432</g:link>
      <g:image_link>https://cdn.shopify.com/s/files/.../merino-crew-navy.jpg</g:image_link>
      <g:price>129.00 USD</g:price>
      <g:sale_price>129.00 USD</g:sale_price>
      <g:availability>in_stock</g:availability>
      <g:condition>new</g:condition>
      <g:brand>Patagonia</g:brand>
      <g:gtin>0123456789012</g:gtin>
      <g:product_type>Apparel &amp; Accessories > Clothing > Sweaters</g:product_type>
    </item>
  </channel>
</rss>

How to generate an XML feed from Shopify

Shopify does not provide XML feed generation built-in. Three paths exist depending on your plan and technical resources:

Option 1: Google & YouTube sales channel app (free, recommended)

Install the Google & YouTube channel from the Shopify App Store. It automatically syncs your Shopify catalog to Google Merchant Center in the correct format, handles variant flattening, price currency formatting, and availability mapping. Updates on a 24-hour sync cadence. No XML file to manage manually — GMC pulls from a Google-owned feed endpoint Shopify writes to directly.

Option 2: Third-party feed app

Apps like Simprosys Google Shopping Feed, DataFeedWatch, or GoDataFeed generate XML (and CSV, TSV) feeds compatible with Google, Meta, TikTok, Pinterest, and Microsoft. They offer field mapping UIs, custom rules, and scheduled refresh. Best for stores needing feeds for multiple channels or fine-grained attribute control.

Option 3: Custom Liquid XML template

Create a custom page template (or app proxy) in Shopify that outputs XML. This approach requires development work but gives full control over field mapping, custom metafields inclusion, and variant handling logic. The template uses application/xml content type and loops through all products and variants:

{% comment %}Shopify XML feed page template{% endcomment %}
{% layout none %}
{{ "Content-Type: application/xml" | header }}
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
<channel>
{% paginate collections.all.products by 250 %}
{% for product in collections.all.products %}
{% for variant in product.variants %}
  <item>
    <g:id>{{ variant.sku | escape }}</g:id>
    <g:title>{{ product.title | escape }}{% unless variant.title == 'Default Title' %} - {{ variant.title | escape }}{% endunless %}</g:title>
    <g:price>{{ variant.price | money_without_currency }} {{ cart.currency.iso_code }}</g:price>
    <g:availability>{% if variant.available %}in_stock{% else %}out_of_stock{% endif %}</g:availability>
    <g:condition>new</g:condition>
    <g:link>{{ shop.url }}{{ product.url }}?variant={{ variant.id }}</g:link>
    <g:image_link>{{ product.featured_image | img_url: 'master' | prepend: 'https:' }}</g:image_link>
    <g:brand>{{ product.vendor | escape }}</g:brand>
    {% if variant.barcode != blank %}<g:gtin>{{ variant.barcode }}</g:gtin>{% endif %}
  </item>
{% endfor %}
{% endfor %}
{% endpaginate %}
</channel>
</rss>

How AI shopping agents use product feed data

There are two distinct AI agent data pipelines. Understanding which one your store uses determines what to optimize:

AI surfaceData sourceFeed involvementWhat to optimize
Google AI Mode (Shopping)Google Merchant Center → Google Shopping GraphHigh — GMC feed is primary inputXML feed completeness + GMC account health
ChatGPT ShoppingBing index + page crawlIndirect — reads on-page JSON-LDProduct schema on PDPs
Perplexity ShoppingWeb crawl of PDPsNone — reads on-page JSON-LD onlyProduct schema on PDPs
Meta AI / Instagram ShoppingMeta Catalog / Facebook feedHigh — product catalog feed requiredMeta feed + product catalog setup
Amazon RufusAmazon product dataNone — reads Amazon listings onlyAmazon Seller Central listings

Critical XML feed fields that affect AI agent visibility

For Google AI Mode specifically, certain feed attributes have outsized impact on whether your products surface in AI-generated shopping answers:

Feed freshness and AI agent update cadence

AI agents and merchant platforms re-crawl feeds on different schedules. Price and availability errors from stale feeds are the most common cause of AI-surfaced product misinformation:

PlatformFeed refresh cadenceForced refresh option
Google Merchant CenterDaily automatic re-fetchManual fetch button in GMC dashboard; Content API supplemental feeds for real-time updates
Meta CatalogDaily (scheduled) or hourly (pixel-based)Manual sync in Commerce Manager
ChatGPT / Bing crawlWeekly–monthlyIndexNow ping accelerates Bing re-crawl
Perplexity crawlWeekly–monthlyNo direct submission; IndexNow has partial effect

For price-sensitive products (flash sales, limited-time offers), use the Google Content API's supplemental feed or real-time updates rather than relying on daily XML fetch — it allows price updates within minutes rather than days.

Run a CatalogScan check to verify your store's /products.json is accessible, variant-complete, and that on-page JSON-LD is present for direct AI agent discovery alongside your XML feed pipeline.

Related: Shopify product feed for Google · Shopify product feed API · Structured data validation errors

Frequently asked questions

Does Shopify natively export an XML product feed?

No — Shopify's native endpoint is JSON at /products.json. For XML, use the Google & YouTube channel app (syncs to GMC automatically), a third-party app like Simprosys, or a custom Liquid XML template. Shopify Plus stores can also use the Storefront API for programmatic feed generation.

What is the difference between /products.json and a Google Shopping XML feed?

/products.json uses Shopify field names in JSON format. Google Shopping XML uses the g: namespace with Google's attribute names and specific value formatting (price with currency, availability as "in_stock"/"out_of_stock"). The data is the same but the schema and format differ completely.

Do AI shopping agents read XML product feeds directly?

Generally no — AI agents like ChatGPT Shopping and Perplexity crawl individual product pages and read on-page JSON-LD structured data. XML feeds matter for Google AI Mode (via GMC) and Meta AI (via Meta Catalog). For comprehensive AI agent coverage, optimize both your XML feed and on-page Product schema.

Why do AI agents show wrong prices from my Shopify store?

Common causes: stale crawl cache (AI indexed during a sale), missing priceValidUntil so expired prices persist, mismatched prices between JSON-LD and GMC feed, or automatic discount prices that don't appear in structured data. Fix by keeping JSON-LD in sync with current prices and pinging IndexNow after price changes.