Skip to main content
This guide uses create-instantsearch-app to help you quickly build a JavaScript search app that integrates InstantSearch and Autocomplete.

Before you begin

This guide requires Node.js version 8 or later and npm.

Integrate InstantSearch with Autocomplete

Open the terminal and run:
npx create-instantsearch-app my-app --template "InstantSearch.js"
Accept the default options throughout the installation process by pressing Enter. However, you can replace any of the default options with your own. To ensure that your app integrates Autocomplete with InstantSearch, pay particular attention to these configuration options:
  • Attributes to display
  • Attributes for faceting
  • Search input

Attributes to display

Select name, description, and categories when prompted. Select name, description, and categories when prompted

Attributes for faceting

Choose brand when prompted. Choose brand when prompted

Search input

Select Autocomplete as your search input and use the default index for Query Suggestions. Select Autocomplete as your search input and use the default index for Query Suggestions Selecting Y when being prompted to β€œEnable user events” activates the insights option, which allows Algolia to process your user events. Events can unlock powerful aspects which enhance your app’s effectiveness.
For more details about events collection and settings, review the API reference.
When create-instantsearch-app has finished, it will have created a new app, in the directory my-app, with everything you need. Go to the my-app directory:
cd my-app || exit
Run the app:
npm start
Open your browser and go to http://localhost:3000. This is what you should see Result

Next steps

⌘I