SEO Guide · 2026
Shopify Metafield Types Reference: Complete Guide for AI Agent Visibility
Shopify's default product data model is deliberately minimal. Metafields are how merchants and developers extend it — and several specific metafield namespaces are read directly by AI shopping agents, Google Merchant Center, and Facebook Catalog Manager to disambiguate products and improve category matching.
google.google_product_category (taxonomy ID), google.condition (new/used/refurbished), google.age_group, google.gender. SEO metafields: global.title_tag, global.description_tag. Access in Liquid as product.metafields['namespace']['key'].value. All are available via the Storefront API and Admin API; none appear in /products.json.
All Shopify metafield types (2026)
Shopify supports 17 metafield types. The type controls validation, UI in the admin, and how the value is serialized in API responses:
| Type | Stored as | Use case | AI value |
|---|---|---|---|
single_line_text_field | String (max 255 chars) | Brand, model number, country of origin, color name | High |
multi_line_text_field | String (newlines preserved) | Extended descriptions, care instructions, size guide text | Medium |
rich_text_field | JSON (Shopify rich text schema) | Formatted specifications, bullet-point feature lists | Medium |
number_integer | Integer | Pack quantity, minimum order quantity, warranty years | Medium |
number_decimal | Decimal string | Precise dimensions, weight in custom units | Medium |
boolean | true / false | Is-organic, is-FSC-certified, is-assembled-in-USA | Low |
date | ISO 8601 date string | Release date, warranty-expiry date | Low |
date_time | ISO 8601 datetime string | Sale end date/time for priceValidUntil | High |
url | URL string | sameAs links (brand LinkedIn, Wikidata), product page on manufacturer site | High |
json | Arbitrary JSON | Structured specifications, compatibility tables | Medium |
color | Hex string (#rrggbb) | Product color in hex for visual search compatibility | Low |
dimension | JSON {value, unit} | Length, width, height in standardized units | Medium |
volume | JSON {value, unit} | Capacity for food, beverage, containers | Medium |
weight | JSON {value, unit} | Product weight with unit (g, kg, lb, oz) for shipping AI | Medium |
rating | JSON {value, scale_min, scale_max} | Manual rating override (rarely used — review apps write AggregateRating directly) | Low |
money | JSON {amount, currency_code} | Compare-at price, MSRP, or floor price for B2B | Low |
file_reference | Shopify file GID | Spec sheet PDF, 3D model, additional images | Low |
The metafield namespaces that matter for AI agents
The namespace is the first part of the namespace.key pair. Several namespaces have semantic meaning to external systems:
| Namespace | Written by | Key fields | Read by |
|---|---|---|---|
google |
Google & YouTube Sales Channel app | google_product_category, condition, age_group, gender, custom_label_0–4, mpn |
Google Merchant Center, Facebook Catalog Manager (fb_product_category), AI agents via JSON-LD output |
global |
Shopify SEO settings, apps | title_tag, description_tag |
Shopify themes (override page title + meta description); Google and AI agents reading meta tags |
custom |
Merchant-defined in admin | Any key, merchant-defined | Theme templates only (not read by external systems unless explicitly output in JSON-LD or meta tags) |
reviews |
Judge.me, Okendo, Loox, Yotpo, Fera | rating, count |
Some review apps read this namespace; others write JSON-LD directly. Do not rely on this namespace for AggregateRating — verify via JSON-LD output |
The google namespace in detail
The google namespace metafields are the most directly impactful for AI shopping agent visibility because they provide structured category and attribute data that is not available in the default Shopify product model:
| Metafield key | Type | Values | Impact if missing |
|---|---|---|---|
google.google_product_category |
single_line_text_field |
Google taxonomy ID (e.g., "2271") or full path (e.g., "Apparel & Accessories > Clothing") | AI agents use product_type as a loose substitute — lower precision on category-based queries |
google.condition |
single_line_text_field |
"new", "refurbished", "used" | Defaults to "new" in most implementations; refurbished/used products without explicit condition are miscategorized |
google.age_group |
single_line_text_field |
"newborn", "infant", "toddler", "kids", "adult" | Apparel products without age_group receive lower relevance for age-specific queries; required for Google Shopping apparel inclusion |
google.gender |
single_line_text_field |
"male", "female", "unisex" | Gendered apparel without gender metafield misses gender-filtered queries ("women's jacket under $100") |
google.mpn |
single_line_text_field |
Manufacturer part number string | Used as GTIN fallback for B2B and parts/accessories; absence reduces cross-catalog deduplication accuracy |
Reading metafields in Liquid for JSON-LD output
To include google.google_product_category in your Product JSON-LD (required for AI agent category matching), add this to your theme's JSON-LD Liquid snippet:
{% assign gpc = product.metafields['google']['google_product_category'].value %}
{% assign condition = product.metafields['google']['condition'].value | default: 'new' %}
{
"@type": "Product",
"name": {{ product.title | json }},
{% if gpc != blank %}
"category": {{ gpc | json }},
{% endif %}
"offers": {
"@type": "Offer",
"itemCondition": "https://schema.org/{% if condition == 'refurbished' %}RefurbishedCondition{% elsif condition == 'used' %}UsedCondition{% else %}NewCondition{% endif %}"
}
}
Bulk-setting metafields via CSV import
For stores with large catalogs, setting google.google_product_category one product at a time in the admin is impractical. The fastest bulk path is via Shopify's product CSV import with metafield columns:
# CSV column header format for metafield import: # Metafield: namespace.key [type] # Example column header: Metafield: google.google_product_category [single_line_text_field] # One row per product, with the taxonomy ID or path in the column value: 2271 # or: Apparel & Accessories > Clothing > Shirts & Tops
FAQ
What metafield types does Shopify support?
Shopify supports 17 metafield types as of 2026: single_line_text_field, multi_line_text_field, rich_text_field, number_integer, number_decimal, boolean, date, date_time, url, json, color, dimension, volume, weight, rating, money, and file_reference. Each type accepts a namespace and key pair. The google namespace is used by the Google & YouTube Sales Channel app for Shopping feed enrichment.
Which Shopify metafields are most important for AI shopping agent visibility?
The highest-impact metafields: (1) google.google_product_category — provides the taxonomy ID that AI agents use for category-based query matching; (2) google.condition — "new", "used", or "refurbished" — critical for disambiguation in used/refurbished queries; (3) google.age_group and google.gender — required for apparel products in gendered queries; (4) global.title_tag and global.description_tag — override the default page title and meta description for product SEO.
How do I read Shopify metafields in a Liquid theme template?
Access metafields in Liquid with: product.metafields['namespace']['key'].value. For example, to read the Google product category: product.metafields['google']['google_product_category'].value. The .value suffix is required — without it you access the metafield object itself, not the scalar value. To include a metafield value in JSON-LD, pipe through the Liquid json filter: {{ product.metafields['google']['google_product_category'].value | json }}.
What is the difference between a Shopify metafield and a metaobject?
Metafields attach extra data to an existing Shopify resource (product, variant, collection, customer, order). A metaobject is a standalone custom data structure that can be referenced by multiple resources — useful for size guides, material specs, or brand profiles shared across many products. For AI agent purposes, metafields on the product and variant are most relevant because they're directly readable by the Storefront API and can be included in JSON-LD output. Metaobjects require custom theme work to appear in structured data.
Check which metafield signals your catalog is missing
CatalogScan scores google_product_category coverage, GTIN population, AggregateRating, and 15 more signals across your full product catalog.
Run the free scan →