Skip to content

Instantly share code, notes, and snippets.

@SebastianBitsch
Last active January 24, 2026 00:11
Show Gist options
  • Select an option

  • Save SebastianBitsch/83ee67589cb57943ba441b76aadfa589 to your computer and use it in GitHub Desktop.

Select an option

Save SebastianBitsch/83ee67589cb57943ba441b76aadfa589 to your computer and use it in GitHub Desktop.
Google Merchant Center top-level categories
Animals & Pet Supplies
Apparel & Accessories
Arts & Entertainment
Baby & Toddler
Business & Industrial
Cameras & Optics
Electronics
Food, Beverages & Tobacco
Furniture
Hardware
Health & Beauty
Home & Garden
Luggage & Bags
Mature
Media
Office Supplies
Religious & Ceremonial
Software
Sporting Goods
Toys & Games
Vehicles & Parts
"""Extract top-level categories from Google Product Taxonomy CSV."""
# Get the file from: https://www.google.com/basepages/producttype/taxonomy-with-ids.en-US.txt
# Learn more: https://support.google.com/merchants/answer/6324436
top_categories = set()
with open('taxonomy-with-ids.csv', 'r', encoding='utf-8') as f:
for line in f:
# Split by semicolon and get the second field (first category)
parts = line.strip().split(';')
if len(parts) > 1 and parts[1]:
top_categories.add(parts[1])
for category in sorted(top_categories):
print(category)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment