Skip to main content
Prefer using the Autocomplete widget from InstantSearch instead of the standalone Autocomplete library. It integrates more closely with your search experience. For more information, see the API reference for InstantSearch.js or React InstantSearch.

Query Suggestions

These examples use the autocomplete-plugin-query-suggestions plugin. It shows suggested search queries in your autocomplete menu. For more information, see Build a Query Suggestions UI with Autocomplete.

Search suggestions

query-suggestions
As users start typing, the autocomplete menu shows suggested search queries.

Search suggestions with categories

query-suggestions-with-categories
The top suggestions are shown with categories to help users search more precisely.

Search suggestions with inline categories

query-suggestions-with-inline-categories
Categories are shown on the same line as the suggestion for a more compact experience.

Multiple sources

These examples use multiple data sources for the autocomplete items. They use several plugins, such as autocomplete-plugin-query-suggestions and autocomplete-plugin-recent-searches. They also use the getAlgoliaResults function to retrieve search results. For more information, see Sources.

Search suggestions and results

query-suggestions-with-hits
As users start typing, the autocomplete menu shows suggested searches and matching search results.

Search suggestions and recent searches

query-suggestions-with-recent-searches
This autocomplete menu remembers previous searches and shows them on top of the suggested searches.

Search suggestions with categories and recent searches

query-suggestions-with-recent-searches-and-categories
This autocomplete menu shows the top search suggestions with their categories, plus recent searches.

Search suggestions with recent searches and search results

reshape
This autocomplete shows recent searches and search suggestions. It also shows matching search results grouped by category.

Federated ecommerce search experience

ecom-advanced-federated-experience-desktop
This autocomplete menu uses a two-column layout. The left column shows recent searches and suggestions, and the right column shows matching products in a grid.

Integrate Autocomplete

These examples show how to integrate Autocomplete with InstantSearch or popular frontend frameworks.

Autocomplete and React InstantSearch

instantsearch

Autocomplete + React InstantSearch

Autocomplete and InstantSearch.js

instantsearch

Autocomplete + InstantSearch.js

Autocomplete and Vue InstantSearch

instantsearch

Autocomplete + Vue InstantSearch

Autocomplete and React

react-renderer

Custom React renderer

Other

These examples highlight other autocomplete features and plugins.

Static sources

As users start typing, this autocomplete menu shows matching predefined links to GitHub repositories.

Recently-viewed items

recently-viewed-items
This autocomplete menu remembers items that users have previously viewed and shows them before the user starts typing (empty query).

Redirect searches

redirect-url
This autocomplete menu redirects users to other pages if the query matches predefined criteria.
Last modified on September 16, 2026