Skip to main content
Autocomplete is also available as an experimental widget in InstantSearch, making it easier to integrate into your search experience. For more information, see the API reference for InstantSearch.js or React InstantSearch.
Autocomplete v1 offers many new features that are explained in Core concepts. Read this documentation to understand the new capabilities.

Import

JavaScript

Container

Autocomplete now takes a container (for example, a <div>), not an <input>. Autocomplete generates a fully accessible search box for you.
HTML
Read more about installation options in the Getting Started guide.

Parameters

These parameters and how you use them have changed from Autocomplete v0:

Datasets

Datasets are replaced by the getSources function. Learn more about Sources concept.

Sources

Sources are replaced by getItems.

Templates

Autocomplete v1 renamed some templates, and uses an agnostic virtual DOM implementation to render them.

Return HTML

Unlike in v0, you can no longer return plain HTML strings to inject into the DOM. Yet, you can still return HTML strings using the provided html tagged function.
The html function is available in Autocomplete v1.6.0 and later.
See the Returning HTML section of the Templates guide for a full overview and to learn how to support Internet Explorer 11.
If you’re already using a virtual DOM in your app, you can provide it to Autocomplete and directly return JSX from templates.

Renamed templates

Some templates from v0 were renamed in v1.
  • The suggestion template is now item.
  • The empty template is now noResults.
For more information, see Templates.

New renderer.render option

Starting from v1.6.0, Autocomplete introduces a new render property in the renderer option to pass a custom render function when using Autocomplete with a custom virtual DOM implementation (React, Vue). If you were using the render option to specify a custom render function, you can now remove it and pass the function to renderer instead.
JSX
If you were using the render option to customize the layout, you can also use the new renderer.render option and access your custom render function in the provided render parameters.
JSX

Top-level API

JavaScript

Full example

Upgrade the Algolia JavaScript API client from v4 to v5

Upgrading from algoliasearch v4 to v5 doesn’t introduce any breaking changes. However, when you use the query in the search parameters, you need to use the query parameter instead of the query property.
JavaScript
Last modified on June 19, 2026