Google product category: use the ID or the full path?

Google accepts google_product_category as either a numeric ID, such as 2271, or the full path, such as Apparel & Accessories > Clothing > Dresses — one or the other, never both. Google’s specification recommends the ID. It is shorter, cannot be misspelled, and is the same in every language.

What this comes down to

  • Send the ID or the full path — Google says “not both”.
  • Google’s product data specification recommends the category ID.
  • A path must match the taxonomy exactly; an ID only has to be the right number.
  • Older category versions published after August 2011 are translated to the latest one.
  • Microsoft’s googleProductCategory field takes either form, up to 255 characters.

SellerSort Team · Updated

The two accepted forms

Every entry in the Google product taxonomy has two names. The category ID is a number. The category path is the chain of names from the top of the tree, joined with >:

The same category written both ways
FormValue
ID2271
PathApparel & Accessories > Clothing > Dresses
Not valid2271 - Apparel & Accessories > Clothing > Dresses

The last row is how the line appears in Google’s taxonomy-with-ids file, and it is a common thing to paste. Google’s attribute page says to submit either the ID or the full path, but not both.

Why the ID is the better default

Google’s product data specification says it is recommended to use the category ID, and the practical reasons line up with that:

  • No spelling to get wrong. A path must match every level exactly, including ampersands and capitalisation as the taxonomy writes them. A number either exists or it does not.
  • Language-independent. Google publishes the taxonomy in several languages. The ID is the same in all of them; the path is not.
  • Survives spreadsheets. A path contains characters that CSV tools, feed rules and scripts like to mangle. An ID is a short run of digits.

The one catch: a spreadsheet may treat the ID as a number. That is harmless for Google, but keep the column as text if your tool strips or reformats numbers.

When the path still earns its place

Paths are for people. Nobody can review 2271 at a glance; everyone can review Dresses. The usual answer is to keep both — but in different columns: the ID in google_product_category, the path in a working column your team reads and the feed never sends. The Bulk Mapper’s full.csv gives you both side by side for that reason, while its supplemental feed file carries only the ID.

Old IDs and old paths

The taxonomy changes over time. Google’s attribute page says you can submit any version of the categories published after August 2011, and it will translate them to the latest version. That makes an older value less alarming than it sounds, but it is still worth re-checking values against the current file when you rebuild a feed — see taxonomy version for how SellerSort tracks which snapshot it uses.

Meta and Microsoft

Meta defines google_product_category against the same Google taxonomy file, so the same values carry over — see Meta catalogs. Microsoft’s Shopping content API has a googleProductCategory field that takes a Google-style category string or ID, up to 255 characters, and a separate field of its own that draws on Microsoft’s taxonomy — see Microsoft Advertising.

Getting the ID for a product

Look it up in the Category Finder from a product title — it returns the ID and the full path together — or browse the category index. For a catalog that already has paths and needs IDs, or has nothing yet, the Bulk Mapper classifies every row from its title and description.

Questions

Should google_product_category be the ID or the path?

Either is accepted, but Google’s product data specification recommends the category ID. Send one or the other, not both.

Is "2271 - Apparel & Accessories > Clothing > Dresses" a valid value?

No. That is a line from the taxonomy file with both forms joined. Send 2271, or send the path on its own.

Do I need to update IDs when Google changes the taxonomy?

Google says it translates any category version published after August 2011 to the latest one. Re-checking against the current file when you rebuild a feed is still good practice.