Autosuggest Best Practices

To maximize conversion and user satisfaction, effective autosuggest implementation requires a dynamic approach that adjusts based on user input and combines query suggestions with other recommendation types. Request both suggestion types (query and product) in every call and adjust maxResults by input stage

Dynamic display logic

The primary goal is to provide the most helpful information at every stage of the user's search process.

User input stagequery.text fieldBest practice (action)Recommendation
Initial focus (no input)EmptyDisplay trending suggestions and products for the localeUse maxResults to show 6-10 popular terms and 4-6 popular products. This provides immediate inspiration and discovery
Completion stage3+ characters
For example: "dre"
Switch to displaying query autocomplete suggestions alongside matching productsUse maxResults to show 6-8 term completions and 4-6 products. Ensure these terms are direct continuations of the input
High confidence5+ charactersContinue with query autocomplete, but reduce the number of suggestions to make room for product/content recommendations (see the next section)4-6 term completions and 6-8 products, so the user can go directly to a product page

Combine query suggestions with product suggestions

A modern search box can show search terms and products together in a single dropdown. A single Autosuggest request returns both suggestion types, so you don't need to call a separate recommendation API while the user types.

Suggestion typePurposeHow to display
Query suggestionsHelp the user express their intent and reach a full results pageDisplay as a list of terms. Selecting a term sends a Search API request
Product suggestionsLet the user skip the results page and go directly to a productDisplay the product image, name, and price. Selecting a product opens the product page

Implementation tips:

  • Use a 2-column layout: One column for query suggestions and one for product suggestions.
  • Send one request per keystroke, and discard responses that arrive out of order.
  • When productSuggestions is empty, continue showing query suggestions rather than collapsing the product column.
  • Report a click on a product suggestion as engagement, just as you would report a click on a search result.

Did this page help you?