Optimization Guide
Shopify Clothing & Apparel Size Schema for AI Shopping Agents
AI shopping agents answering "women's XL merino wool sweater," "men's size 32 slim chinos," and "plus-size running shoes in EU 44" need structured, machine-readable size declarations — not variant title strings. Shopify's default product JSON-LD outputs no size schema, making every clothing and footwear listing invisible to AI size-filter queries.
ProductGroup with hasVariant to declare each size variant as a separate Product. On each variant's Offer, set size to a SizeSpecification with name, sizeSystem (WearableSizeSystemUS/EU/UK), sizeGroup (WearableSizeGroupWomens/Mens/Plus/Tall/Petite), and suggestedGender. Drive from variant metafields or option name parsing with a tag gate.
The Apparel Size Visibility Gap
Clothing and footwear is the category with the highest AI shopping agent size-filter query volume. Users routinely ask AI agents questions that are structurally size-dependent: "women's size 8 wide running shoes," "men's tall XL fleece pullover," "plus-size denim jackets under $80," "girls' size 10-12 swimsuits." These queries require structured, normalized size data — not a variant title string.
Shopify stores sizes as variant option values: strings like "S", "XL", "US 9 / Wide", "38 EU". These strings exist in the admin and on the storefront, but Shopify's default product JSON-LD does not output a size property or any SizeSpecification object. AI agents reading the structured data have no machine-readable size signal — the same product appears identical to a non-apparel product.
The schema.org SizeSpecification type — combined with WearableSizeSystemEnumeration and WearableSizeGroupEnumeration — provides the complete vocabulary for size, gender group, and size system declaration. Mapping your Shopify variant options to this vocabulary lets AI agents surface your products in size-specific queries.
Apparel size query types requiring structured data
| Query type | Example | Required signal | AI shopping behavior |
|---|---|---|---|
| Size + gender filter | "women's XL fleece jacket" | sizeGroup: WearableSizeGroupWomens + name: "XL" |
Filters to women's sizing group and XL in any size system |
| Extended sizing | "plus-size wool coats" | sizeGroup: WearableSizeGroupPlus |
Surfaces products in plus-size range from any brand |
| International size conversion | "size 38 EU men's dress shirt" | sizeSystem: WearableSizeSystemEU + name: "38" |
Matches EU 38 in EU size system; also surfaces US equivalent via normalization |
| Shoe size + width | "women's wide US 8 running shoes" | sizeSystem: WearableSizeSystemUS + additionalProperty: width: Wide |
Matches size 8 in US system with width declaration |
| Kids sizing | "boys' size 10-12 swim trunks" | sizeGroup: WearableSizeGroupBoys + name: "10-12" |
Surfaces youth boys sizing range in the appropriate group |
Shopify default vs. size-aware JSON-LD
{
"@type": "Product",
"name": "Alpine Fleece Pullover — XL",
"offers": {
"@type": "Offer",
"price": "89.00",
"availability": "InStock"
// size "XL" is only in the title
// no sizeSystem declared
// no gender group
}
}
{
"@type": "Offer",
"size": {
"@type": "SizeSpecification",
"name": "XL",
"sizeSystem":
"https://schema.org/WearableSizeSystemUS",
"sizeGroup":
"https://schema.org/WearableSizeGroupMens",
"suggestedGender": "Male"
}
}
Apparel Size JSON-LD Patterns
ProductGroup with per-size variant Products
The recommended pattern for apparel: use ProductGroup as the parent, with each size variant declared as a child Product via hasVariant. Each variant carries its own Offer with a size SizeSpecification. This structure lets AI agents surface in-stock sizes independently:
{
"@context": "https://schema.org",
"@type": "ProductGroup",
"name": "Alpine Fleece Pullover — Men's",
"description": "Midweight fleece pullover for hiking and outdoor activities. Men's sizing.",
"brand": { "@type": "Brand", "name": "PeakLayer" },
"variesBy": ["https://schema.org/size"],
"hasVariant": [
{
"@type": "Product",
"name": "Alpine Fleece Pullover — Men's — S",
"sku": "AFL-MENS-S",
"offers": {
"@type": "Offer",
"price": "89.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"size": {
"@type": "SizeSpecification",
"name": "S",
"sizeSystem": "https://schema.org/WearableSizeSystemUS",
"sizeGroup": "https://schema.org/WearableSizeGroupMens",
"suggestedGender": "Male"
}
}
},
{
"@type": "Product",
"name": "Alpine Fleece Pullover — Men's — M",
"sku": "AFL-MENS-M",
"offers": {
"@type": "Offer",
"price": "89.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"size": {
"@type": "SizeSpecification",
"name": "M",
"sizeSystem": "https://schema.org/WearableSizeSystemUS",
"sizeGroup": "https://schema.org/WearableSizeGroupMens",
"suggestedGender": "Male"
}
}
},
{
"@type": "Product",
"name": "Alpine Fleece Pullover — Men's — XL",
"sku": "AFL-MENS-XL",
"offers": {
"@type": "Offer",
"price": "89.00",
"priceCurrency": "USD",
"availability": "https://schema.org/OutOfStock",
"size": {
"@type": "SizeSpecification",
"name": "XL",
"sizeSystem": "https://schema.org/WearableSizeSystemUS",
"sizeGroup": "https://schema.org/WearableSizeGroupMens",
"suggestedGender": "Male"
}
}
}
]
}
Plus-size and extended sizing
Declare extended sizing groups using the sizeGroup property from WearableSizeGroupEnumeration. For plus-size products, include both the plus group and the gender group in the sizeGroup array:
{
"@type": "Offer",
"price": "74.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"size": {
"@type": "SizeSpecification",
"name": "2X",
"sizeSystem": "https://schema.org/WearableSizeSystemUS",
"sizeGroup": [
"https://schema.org/WearableSizeGroupPlus",
"https://schema.org/WearableSizeGroupWomens"
],
"suggestedGender": "Female"
}
}
International footwear sizing — US, EU, UK
For footwear brands selling internationally, declare the primary size system for your main market and use additionalProperty to surface equivalent sizes in other systems. This lets AI agents match size queries from any regional system:
{
"@type": "Offer",
"price": "120.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"size": {
"@type": "SizeSpecification",
"name": "US 9",
"sizeSystem": "https://schema.org/WearableSizeSystemUS",
"sizeGroup": "https://schema.org/WearableSizeGroupWomens",
"suggestedGender": "Female"
},
"additionalProperty": [
{
"@type": "PropertyValue",
"propertyID": "sizeEU",
"name": "EU size equivalent",
"value": "40"
},
{
"@type": "PropertyValue",
"propertyID": "sizeUK",
"name": "UK size equivalent",
"value": "6.5"
}
]
}
Shopify Liquid implementation with variant size mapping
Map Shopify's variant option values to SizeSpecification in Liquid. Use a lookup table for size system and gender group based on product tags. Drive from variant options — avoid hardcoding sizes in the template:
{% if product.tags contains 'apparel' or product.tags contains 'footwear' %}
{% assign gender_group = "https://schema.org/WearableSizeGroupUnisex" %}
{% assign suggested_gender = "Unisex" %}
{% if product.tags contains 'mens' %}
{% assign gender_group = "https://schema.org/WearableSizeGroupMens" %}
{% assign suggested_gender = "Male" %}
{% elsif product.tags contains 'womens' %}
{% assign gender_group = "https://schema.org/WearableSizeGroupWomens" %}
{% assign suggested_gender = "Female" %}
{% elsif product.tags contains 'plus-size' %}
{% assign gender_group = "https://schema.org/WearableSizeGroupPlus" %}
{% endif %}
{% endif %}
WearableSizeGroupEnumeration reference
| sizeGroup value | Shopify tag | Use case |
|---|---|---|
WearableSizeGroupWomens |
womens | Women's adult sizing (S–XXL, numeric 0–20) |
WearableSizeGroupMens |
mens | Men's adult sizing (XS–4XL, numeric 28–52) |
WearableSizeGroupPlus |
plus-size | Plus sizing (1X–6X, 14W–32W for women) |
WearableSizeGroupTall |
tall | Tall inseam sizing for extended height |
WearableSizeGroupPetite |
petite | Petite inseam sizing for shorter stature |
WearableSizeGroupMaternity |
maternity | Maternity-fit clothing |
WearableSizeGroupBoys |
boys | Boys' youth sizing (2T–18/20, 4–18) |
WearableSizeGroupGirls |
girls | Girls' youth sizing (2T–18/20, 4–18) |
Common Mistakes
1. Only outputting size in the product name or variant title
Putting size in the product name ("Men's Fleece Jacket — XL") or variant title makes the size human-readable but not machine-readable for structured filtering. AI agents answering "men's XL fleece jacket" need the size in a SizeSpecification object with a declared sizeSystem — not in a text string that might say "XL", "Extra Large", "Extra-Large", or "X-Large" inconsistently across brands.
2. Using a single Product instead of ProductGroup for multi-size products
Declaring a single Product with multiple Offers (one per size) works technically but does not clearly signal the size-per-Offer relationship. The canonical pattern for apparel with size variants is ProductGroup with hasVariant — each variant Product declares its own size Offer. This structure is explicitly recommended by Google's structured data guidelines for apparel and is the pattern AI agents are optimized to consume.
3. Declaring sizeGroup without sizeSystem
Declaring sizeGroup: WearableSizeGroupWomens without a sizeSystem leaves the size ambiguous across international markets. A size "M" in a US women's system is different from an EU 38 or a UK 12. Always include sizeSystem to let AI agents normalize across regional size conventions when answering international queries.
4. Missing per-variant availability on OutOfStock sizes
Declaring all size variants as InStock in the ProductGroup JSON-LD — even when some sizes are sold out — is schema spam. AI agents answering "women's L merino cardigan in stock" will surface your product only to return an out-of-stock size at checkout. Set availability: OutOfStock on each variant where variant.available == false in your Liquid template to give AI agents accurate per-size inventory signals.
5. Not gating apparel schema on clothing/footwear product tags
Injecting ProductGroup and SizeSpecification on non-apparel products (home goods, accessories without sizing) creates invalid structured data. Gate the apparel JSON-LD template on tags like apparel, clothing, or footwear to ensure the size schema is only injected for products where size is actually a meaningful attribute.
Implementation Checklist
- Use
ProductGroupwithhasVariantfor multi-size apparel products - Add
size: { "@type": "SizeSpecification" }to each variant's Offer - Declare
sizeSystemfrom WearableSizeSystemEnumeration (US, EU, UK, JP, IT, AU, DE, FR) - Declare
sizeGroupfrom WearableSizeGroupEnumeration (Womens, Mens, Plus, Tall, Petite, Boys, Girls) - Declare
suggestedGender(Male, Female, Unisex) on each SizeSpecification - Set per-variant
availability: OutOfStockfor sold-out sizes in real time - For international size systems, include equivalent sizes in
additionalProperty - Gate apparel JSON-LD on product tags (e.g.,
apparel,footwear) - Run CatalogScan to verify ProductGroup and SizeSpecification appear in your AI readiness report
Frequently Asked Questions
How do I declare clothing sizes in Shopify product JSON-LD?
Use ProductGroup with hasVariant for multi-size products. Each variant Product's Offer carries a size property pointing to a SizeSpecification with name (the size label), sizeSystem (WearableSizeSystemUS/EU/UK), sizeGroup (WearableSizeGroupWomens/Mens/Plus), and suggestedGender. Drive size values from Shopify's variant.option1 in Liquid.
What is the difference between Shopify's variant title 'XL' and schema.org SizeSpecification?
Shopify's variant title string "XL" is unstructured text — it has no declared size system, gender group, or normalization mapping. Schema.org SizeSpecification adds context: sizeSystem (US? EU?) and sizeGroup (women's? men's?) that AI agents need to match size queries across brands and international size conventions. The variant title remains for display; the SizeSpecification is for machine consumption.
How do I handle extended sizing (plus size, tall, petite) in Shopify structured data?
Use sizeGroup from WearableSizeGroupEnumeration: WearableSizeGroupPlus for plus sizes, WearableSizeGroupTall for tall sizing, WearableSizeGroupPetite for petite. You can declare an array of sizeGroup values — e.g., a plus-size women's product uses both WearableSizeGroupPlus and WearableSizeGroupWomens to surface in both "plus size" and "women's" size queries.
Does Shopify output SizeSpecification in its default product JSON-LD?
No. Shopify's default JSON-LD contains no size schema. Variant option names ("S / Red", "US 9") are unstructured strings not mapped to WearableSizeSystemEnumeration or WearableSizeGroupEnumeration. Apparel and footwear brands must manually add ProductGroup with SizeSpecification in product.liquid.
How do I mark shoe sizes in Shopify structured data?
Use the same SizeSpecification type with sizeSystem set to WearableSizeSystemUS (US sizing), WearableSizeSystemEU (European), or WearableSizeSystemUK (UK). Set suggestedGender for the target customer. For multi-system brands, add equivalent sizes as additionalProperty entries with propertyID sizeEU, sizeUK, etc.