Skip to main content

Google Shopping XML Feed: Format & Example

By Marius Pahomi · Published 2026-07-20 · Last updated 2026-08-10

A Google Shopping XML feed is an RSS 2.0 document that declares Google’s namespace — xmlns:g="http://base.google.com/ns/1.0" — on the root element and carries one <item> per product, where every product attribute is prefixed with g:. Seven attributes are required for any product to serve: g:id, g:title, g:description, g:link, g:image_link, g:price with an ISO 4217 currency suffix such as "49.99 USD", and g:availability with one of the four supported values (in_stock, out_of_stock, preorder, backorder). Branded products additionally need g:brand plus g:gtin or g:mpn, and used or refurbished products must declare g:condition.

That one paragraph is the entire format contract — everything else in the specification is either conditionally required (variants need item_group_id, preorders need availability_date) or optional enrichment. This guide gives you the complete picture: a copy-ready example feed with a variant pair, what each required attribute accepts, the encoding and formatting mistakes that silently drop rows, how to validate the file before Merchant Center sees it, how to register it, and what changed in Google’s 2026 specification update. Everything here is verified against Google’s live Merchant Center documentation, not folklore — where the spec sets a limit, the limit is quoted with its source.

Validate your XML feed free — in your browser — free, in your browser, no account needed.

The format Google actually requires

RSS 2.0 plus the Google namespace

Google Shopping accepts product data as an XML file in RSS 2.0 format. Two things turn a generic RSS document into a valid product feed: the namespace declaration xmlns:g="http://base.google.com/ns/1.0" on the <rss> root element, and the g: prefix on every product attribute. Google’s RSS 2.0 specification is explicit about the prefix: attributes submitted without it are ignored during processing — the file parses, the products upload, and the data simply never arrives.

The RSS layer itself contributes three required elements at the channel level — <title>, <link> and <description> describing the feed, not any product. Each product then lives in its own <item> element inside <channel>.

XML vs the other submission methods

XML is one of several ways into Merchant Center: tab-delimited text files, Google Sheets, website crawl, the Content API, and platform integrations all exist. XML earns its place in two situations: you are generating the feed programmatically (XML’s nesting handles multi-value attributes like shipping more cleanly than TSV columns), or a feed tool emits it for you. Atom 1.0 and RSS 1.0 are also accepted, but RSS 2.0 is the format Google documents first and the one virtually every feed generator targets.

If you maintain products in a spreadsheet today, TSV or Google Sheets is less error-prone to hand-edit. Choose XML when software writes the file.

Limitations
  • This guide covers the file-based XML path. Very large or fast-changing catalogs eventually outgrow file uploads entirely and move to the Content API or a managed sync — the format knowledge transfers, the transport differs.

A complete example feed you can copy

Two variants, all required attributes, valid markup

The example below is a complete, valid Google Shopping XML feed containing one product in two size variants. It shows the envelope, the namespace, the seven required attributes, the identifier trio (brand + gtin), and the variant mechanics (item_group_id shared, size differing, unique id per variant):

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
  <channel>
    <title>Example Store Product Feed</title>
    <link>https://www.example-store.com</link>
    <description>Product feed for Google Merchant Center</description>
    <item>
      <g:id>SKU-201-M</g:id>
      <g:title>Trailhead Merino Running Socks — Mens M</g:title>
      <g:description>Mid-weight merino running socks with seamless toe.</g:description>
      <g:link>https://www.example-store.com/socks/trailhead?size=m</g:link>
      <g:image_link>https://cdn.example-store.com/trailhead-socks.jpg</g:image_link>
      <g:price>18.00 EUR</g:price>
      <g:availability>in_stock</g:availability>
      <g:condition>new</g:condition>
      <g:brand>Trailhead</g:brand>
      <g:gtin>04012345678901</g:gtin>
      <g:item_group_id>SKU-201</g:item_group_id>
      <g:size>M</g:size>
      <g:google_product_category>188</g:google_product_category>
    </item>
    <item>
      <g:id>SKU-201-L</g:id>
      <g:title>Trailhead Merino Running Socks — Mens L</g:title>
      <g:description>Mid-weight merino running socks with seamless toe.</g:description>
      <g:link>https://www.example-store.com/socks/trailhead?size=l</g:link>
      <g:image_link>https://cdn.example-store.com/trailhead-socks.jpg</g:image_link>
      <g:price>18.00 EUR</g:price>
      <g:availability>in_stock</g:availability>
      <g:condition>new</g:condition>
      <g:brand>Trailhead</g:brand>
      <g:gtin>04012345678918</g:gtin>
      <g:item_group_id>SKU-201</g:item_group_id>
      <g:size>L</g:size>
      <g:google_product_category>188</g:google_product_category>
    </item>
  </channel>
</rss>

How to reuse it as a template

Keep the first six lines and the closing two exactly as they are — envelope, namespace, channel metadata. Repeat the <item> block once per product or variant, replacing every value. Three details preserve validity while you edit: store GTINs as text so leading zeros survive (a spreadsheet that coerces 04012345678901 to a number corrupts the check digit), keep the ISO 4217 currency code inside every price value, and remove any attribute you have no value for — Google’s checklist explicitly says to drop empty attributes rather than ship empty tags.

Google also publishes a downloadable RSS 2.0 example file in its help center if you want a second reference point; the structure is identical.

The seven required attributes, precisely

Identity and content: id, title, description

g:id is the product’s stable identifier — once chosen, never change it, because Merchant Center treats a changed ID as a deleted product plus a brand-new one, resetting its history. g:title accepts a maximum of 150 characters of plain text; Google’s spec bans promotional text ("free shipping"), ALL-CAPS, and gimmicky characters in it. g:description allows up to 5,000 characters under the same content rules. Both must match what the landing page shows — feed-vs-page mismatches are a disapproval class of their own.

Destination and image: link, image_link

g:link is the product’s landing-page URL on your verified domain — not a category page, not the homepage. g:image_link points at the primary product image (URL up to 2,000 characters). Today’s floor for image resolution is 100×100 px for most categories and 250×250 px for apparel, but Google announced in its 2026 specification update that the minimum rises to 500×500 px for all categories, with warnings already issuing and enforcement starting 31 January 2027 — new feeds should target 500×500 or larger now.

Offer state: price, availability (and condition)

g:price takes a number plus an ISO 4217 currency code — 18.00 EUR, 49.99 USD — VAT-inclusive where local law prices that way. g:availability accepts exactly four values: in_stock, out_of_stock, preorder, backorder; anything else is invalid. Submitting preorder makes g:availability_date required. g:condition has three supported values — new, refurbished, used — and must be declared for anything not new.

Limitations
  • The seven-attribute floor makes a product eligible to serve, not competitive. Ranking well inside Shopping results depends on data quality far beyond the minimum — that optimisation layer is covered in the product feed optimization guide, not here.

Identifiers: gtin, mpn, brand, identifier_exists

The identifier trio for branded products

Products with a manufacturer-assigned GTIN should submit it in g:gtin together with g:brand. Where no GTIN exists but a manufacturer part number does, g:mpn plus g:brand is the fallback pair. Google cross-checks GTINs structurally (length and GS1 check digit) at ingestion, and a wrong check digit disapproves the item — which is why the digit deserves validation before upload, not after.

identifier_exists for private-label products

Handmade, vintage, and private-label products with no GTIN or MPN declare <g:identifier_exists>false</g:identifier_exists>, which exempts the item from identifier requirements. Use it truthfully: setting it on a product that demonstrably has a GTIN in GS1’s registry is itself a disapproval reason. The full decision tree — which identifier to send when, and what happens when you get it wrong — is covered in the Merchant Center disapprovals guide.

Variants: item_group_id and the variant attributes

One item per variant, one shared group ID

Every purchasable variant — each size, each colour — is its own <item> with its own unique g:id, its own g:link (ideally deep-linking to that variant pre-selected) and, where barcoded separately, its own GTIN. What ties them together is g:item_group_id: all variants of one parent product carry the same value, which is how Shopping ads render a single listing with a size or colour selector instead of six competing listings.

The differing attribute must actually differ

Per Google’s spec, products sharing an item_group_id must differ in at least one of the variant attributes — color, size, pattern, material, age_group, gender — and that attribute must be populated on every member of the group. A group where two items are identical on all variant axes, or where half the items omit size, generates variant-level disapprovals. The example feed above shows the minimal correct pattern: shared group ID, unique IDs, size populated and differing.

Limitations
  • item_group_id handles true variants of one product. It is not a bundling or accessory mechanism — kits, multipacks and bundles have their own attributes (is_bundle, multipack) with different rules.

XML mistakes that silently break feeds

Escaping: the ampersand problem

The single most common hand-built-feed failure is an unescaped ampersand. A title like Socks & Gloves Set must be written Socks &amp; Gloves Set in raw XML — a bare & makes the entire file malformed, and Merchant Center rejects it at fetch time, not row by row. The same applies to < in any value. URLs with query strings (?size=m&color=blue) are the classic carrier: every & in every URL needs escaping. If your generator emits through a real XML library rather than string concatenation, this class of bug disappears entirely.

Values that look right but are invalid

Beyond well-formedness, four value patterns cause quiet failures: availability spelled outside the four supported values ("available", "yes", "In Stock" with capitals); prices missing the currency code (18.00 instead of 18.00 EUR); GTINs that lost their leading zeros to a spreadsheet export; and attributes without the g: prefix, which Google ignores wholesale rather than erroring. The last one is the cruellest — the feed fetches green, and the products just lack the data you thought you sent.

File naming and empty tags

Google’s pre-submission checklist adds two mechanical rules: the filename must end in .xml and must exactly match the name registered for the data source in Merchant Center, and attributes with no value should be removed from the file rather than shipped as empty tags. Empty tags are not neutral — an empty <g:gtin></g:gtin> is an invalid identifier, not a missing one.

Limitations
  • These checks catch structural and value-level errors. Policy-level disapprovals — landing-page mismatches, prohibited content, image quality — only surface after Google crawls your pages, so a structurally perfect feed can still lose items at review.

Validate the file before Merchant Center sees it

Three layers of pre-upload checking

Pre-upload validation runs in three layers. First, well-formedness: does the file parse as XML at all — any XML parser or even a browser tab answers this. Second, schema: are the seven required attributes present on every item, with supported values for availability and condition. Third, value quality: GTIN check digits, price formats, URL schemes, title lengths. A file can pass layer one and fail hundreds of rows on layers two and three, so parsing alone is false comfort.

A free validator that runs all three layers

FeedArc’s free Google Shopping feed validator runs the full stack in your browser — the file never leaves your machine. It flags missing required attributes, invalid availability and condition values, GTIN format and GS1 check-digit failures, title length and ALL-CAPS violations, price sanity, and non-https URLs, per product, before Merchant Center ever fetches the feed. Fixing a rejection locally takes minutes; discovering it through a Merchant Center disapproval cycle takes hours to days, because Google re-reviews on its own schedule.

Register the feed in Merchant Center

Upload methods and the fetch schedule

In Merchant Center, add the file as a primary data source. Three transport options exist for a file feed: scheduled fetch (Google pulls a URL you host on a cadence you set — the standard choice, because updates need no manual step), direct upload through the UI, and SFTP push. Register the exact filename, set the fetch schedule to at least daily, and Google fetches, parses, and begins processing items into review.

Reading the first processing report

The first fetch’s processing report is where format errors surface: parse failures, missing required attributes, and invalid values are listed per item with counts. Treat this report as the source of truth for what Google actually ingested — not your generator’s logs. Items that clear processing then enter review, where policy checks run; item-level rejections from that stage are disapprovals, a different failure class with its own diagnostic workflow.

Limitations
  • Include every product in every fetch — Google removes from Merchant Center any product absent from the latest file, so a "delta feed" of only changed rows silently deletes the rest of the catalog.

What changed in the 2026 specification

New attributes live now

Google’s annual specification update, announced 14 April 2026, added product-level delivery controls — handling_cutoff_time for daily order-processing deadlines and minimum_order_value for minimum-spend rules — plus loyalty sub-attributes on shipping. The headline addition is video_link: product videos submitted through the attribute became eligible to serve on 30 June 2026, with policy and quality validation reporting from the same date. None of these are required; all are ordinary g:-prefixed attributes that slot into the same XML structure.

The image deadline worth planning for

The consequential change is image resolution: the minimum for image_link and additional_image_link rises to 500×500 pixels across all categories, with warnings issuing since April 2026 and enforcement from 31 January 2027. Google states it will auto-optimise some smaller images rather than disapprove them, but auto-processed images carry their own warning and are out of your control. If you are building a feed today, sourcing 500×500+ imagery now is cheaper than migrating under enforcement next January.

When hand-maintained XML stops scaling

The honest crossover point

A hand-maintained XML file is a perfectly good solution for a small, stable catalog — a dozen SKUs whose prices change quarterly need nothing more than this guide and a text editor. The crossover comes from change frequency, not catalog size alone: every price change, stock-out, and new variant is a manual edit, and every manual edit is an escaping bug waiting to happen. When updates outpace your willingness to edit XML carefully, generation should move to software — whether that is your e-commerce platform’s export, a script, or a feed management tool that emits Merchant Center-compliant XML continuously from your catalog. The discipline around that switch — one canonical catalog in, validated channel-shaped feeds out — is feed management.

What automation adds beyond generation

Generation is the smaller half of what tooling buys. The larger half is the loop around it: pre-export validation against the same rules Google enforces, automatic truncation and category mapping, disapproval monitoring after upload, and bulk fixes when Google reports issues across hundreds of products. That loop — validate, ship, monitor, fix — is what the broader practice of product feed optimization builds on top of a structurally correct feed. One side benefit compounds across channels: because Criteo accepts Google's product taxonomy, the google_product_category mapping you get right for Merchant Center is reused as-is for Criteo feed management — one mapping, two channels.

See FeedArc on your own feed

FeedArc generates exactly this Merchant Center-compliant RSS 2.0 XML from your product catalog — with the g: namespace, required-attribute validation, GTIN check-digit verification, and automatic escaping handled on every export, so the format contract in this guide is enforced by software instead of by hand.

Frequently asked questions

Sources & References

Start with FeedArc

Apply this playbook to your own product feed in minutes. Free to start, no credit card needed.