Predictive Search API
Definition
The Predictive Search API is a Shopify storefront endpoint that returns type-ahead results for a partial query. A theme requests /search/suggest and receives matching products, collections, pages, articles and query suggestions, either as JSON or as a rendered section, with the resource types and result limits set per request. It powers the dropdown that appears while a shopper is still typing.
Documented at https://shopify.dev/docs/api/ajax/reference/predictive-search.
How we've used it
Two patterns sit on top of it. The first keeps Shopify's endpoint and rebuilds what surrounds it: one popdown component reused by the header and the search page, with a zero state merchandised from a navigation menu plus a pair of collection carousels, so an empty query still sells something. The second replaces the endpoint. On one storefront the panel now fetches an external search service and renders results client-side through a template engine, because that catalog is faceted at shade level and the native suggest response has no shape for it. Both keep the same trigger, the same panel markup and the same keyboard and listbox semantics. Only the data source moves, which is what makes the swap survivable.
Builds using it
- Adults/Kids audience-switching header with automatic menu swap — LUS Brands
- Predictive search moved off Shopify onto an external search API with client-side templating — Nudestix
5 further gated builds use it; their pages follow.
Related entities
Storefront search · Storefront filtering · Section Rendering API · Custom elements