Use the search query in a GraphQL POST to the Storefront API, passing a query string and a productFilters array of ProductFilter input objects; filter types include availability, price, variantOption, tag, productMetafield, and variantMetafield.
Request the filters connection on the search result to retrieve available facet options and their counts; render these as interactive checkboxes or sliders in your UI.
As users apply filters, append the corresponding ProductFilter objects to productFilters and re-execute the query; results and available filter options update in response.
Combine multiple filters in the same request — filters within the same type are OR'd, filters across different types are AND'd (e.g., multiple color variants OR'd, but color AND price AND'd).
Implement the Search & Discovery app in the Shopify admin to manage which filters are enabled for your storefront; the app supports availability, price, vendor, product type, tag, and custom metafield-based filters.
Known gotchas
Metafield-based filters require the metafield definition to exist and be indexed by the Search & Discovery app before they appear in filter results — metafields are not automatically available as filters.
The available filters returned in the filters field reflect only what is applicable to the current result set; a filter option with zero results will not appear, which is the expected behaviour but can surprise users expecting fixed filter panels.
Custom storefronts using the Storefront API and themes using the Liquid filter API both respect Search & Discovery app configurations — changes in the app affect both surfaces simultaneously.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp