Skip to main content
GET
Search Autocomplete

Search Autocomplete

Returns predictive-search suggestions for autocomplete UIs. This is a storefront endpoint served from the store domain — no OAuth token is required (it is the same endpoint themes call from the browser). There are two response shapes:
  • GET /search/suggest.json — returns a Shopify-compatible JSON payload.
  • GET /search/suggest — returns a rendered HTML section (used by themes that render the predictive-search drawer markup directly).
This page documents the JSON form.

Request

Parameters

q
string
required
Search query (predictive search activates at 2+ characters). Also accepts the query alias, and Shopify-style syntax such as id:123 OR id:456.
resources[type]
string
default:"product,collection,article,page"
Comma-separated result types: product, collection, article, page.
resources[limit]
integer
default:"10"
Maximum results per type (max 50). Also accepts the limit alias.

Response

Matches the Shopify /search/suggest.json shape: a top-level resources object containing results grouped by type.
resources
object

Example Response

Performance Tips

  • Use debouncing (300ms) in your UI before making requests.
  • Start searching at 2+ characters for relevant results.
  • Cache frequent queries on the client.
  • Use resources[type] to limit result types for faster responses.

Example Implementation