Skip to main content
GET
/
search
/
complete?query=
{query}
Autocomplete: Get Suggestions
curl --request GET \
  --url 'https://app.uselayers.com/api/storefront/v1/search/complete?query={query}' \
  --header 'Accept: <accept>' \
  --header 'Content-Type: <content-type>' \
  --header 'X-Storefront-Access-Token: <x-storefront-access-token>'
{
    "matchedQueries": [
        {
            "query_text": "sup",
            "num_searches": 1
        },
        {
            "query_text": "supreme",
            "num_searches": 11
        }
    ],
    "originalQuery": "sup",
    "normalizedQuery": "sup"
}

Authorization

X-Storefront-Access-Token
string
required
Token-based authentication header in the form of <YOUR_LAYERS_TOKEN>.

Headers

Content-Type
string
default:"application/json"
required
Accept
string
default:"application/json"
required

Query Parameters

query
string
The partial query you want to retrieve suggestions for. When omitted, the endpoint returns default or trending suggestions.

Response

matchedQueries
Array of Objects
originalQuery
string
The original query text.
normalizedQuery
string
The normalized version of the original query text.
_meta
object
Metadata about the autocomplete response. Currently includes semantic redirect information when a match is found.
Semantic Redirects: When the autocomplete query semantically matches a configured semantic redirect term, the response includes a _meta.redirect object with the redirect URL. This allows you to redirect users directly from the typeahead experience before they submit a full search. Autocomplete suggestions are still returned alongside the redirect — your frontend decides whether to redirect immediately or show suggestions.
{
    "matchedQueries": [
        {
            "query_text": "sup",
            "num_searches": 1
        },
        {
            "query_text": "supreme",
            "num_searches": 11
        }
    ],
    "originalQuery": "sup",
    "normalizedQuery": "sup"
}