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.
/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 attribute | Shopify source field | Notes / transformation |
|---|---|---|
g:id | variants[].sku or variants[].id | Must be unique per variant; use SKU when available |
g:title | title + variant title | Append variant for non-default variants: "Sweater - S / Navy" |
g:description | body_html stripped of HTML | Strip all tags; max 5000 chars; no HTML entities |
g:link | shop URL + handle + ?variant= | Include variant ID for multi-variant products |
g:image_link | images[0].src | Use first image; min 100×100px; no watermarks |
g:price | variants[].price | Format: "129.00 USD" (price + space + ISO currency) |
g:sale_price | variants[].price when compare_at_price > price | Only set when product is on sale |
g:availability | variants[].inventory_quantity + policy | "in_stock" / "out_of_stock" / "preorder" |
g:brand | vendor | Required for most categories |
g:gtin | variants[].barcode | Required if globally registered; skip if private-label |
g:mpn | variants[].sku | Use when GTIN is absent |
g:condition | Static: "new" | Most Shopify stores sell new; set "used" for secondhand |
g:product_type | product_type | Maps 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 & 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 surface | Data source | Feed involvement | What to optimize |
|---|---|---|---|
| Google AI Mode (Shopping) | Google Merchant Center → Google Shopping Graph | High — GMC feed is primary input | XML feed completeness + GMC account health |
| ChatGPT Shopping | Bing index + page crawl | Indirect — reads on-page JSON-LD | Product schema on PDPs |
| Perplexity Shopping | Web crawl of PDPs | None — reads on-page JSON-LD only | Product schema on PDPs |
| Meta AI / Instagram Shopping | Meta Catalog / Facebook feed | High — product catalog feed required | Meta feed + product catalog setup |
| Amazon Rufus | Amazon product data | None — reads Amazon listings only | Amazon 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:
- GTIN / barcode — Products with GTINs are matched against Google's global product knowledge graph. AI Mode uses this graph to answer "best [product]" queries with confidence. Products without GTINs are indexed but ranked lower in AI-curated recommendations.
- Detailed descriptions — AI Mode reads
g:descriptionto understand use cases, materials, and audience fit. Thin descriptions ("Great product!") reduce the product's relevance surface. Aim for 150–300 words covering materials, dimensions, use cases, and compatibility. - Product type taxonomy — Map to Google's product taxonomy precisely.
Apparel & Accessories > Clothing > Sweatersis more useful than justClothing. Specific taxonomy improves AI agent category matching. - Additional images (
g:additional_image_link) — Multiple product images improve AI agent confidence in answering visual queries ("show me a navy blue sweater under $150"). - Size and color attributes —
g:colorandg:sizeare required for apparel and footwear in Google's taxonomy and are used by AI Mode to filter results for size/color-specific queries.
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:
| Platform | Feed refresh cadence | Forced refresh option |
|---|---|---|
| Google Merchant Center | Daily automatic re-fetch | Manual fetch button in GMC dashboard; Content API supplemental feeds for real-time updates |
| Meta Catalog | Daily (scheduled) or hourly (pixel-based) | Manual sync in Commerce Manager |
| ChatGPT / Bing crawl | Weekly–monthly | IndexNow ping accelerates Bing re-crawl |
| Perplexity crawl | Weekly–monthly | No 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.