Skip to main content
With the official Algolia plugin for Netlify, Algolia recommends to use this frontend bundle. It’s designed to be compatible with the structure extracted by Algolia’s Netlify plugin. It creates a new search input on your site with an Autocomplete menu, providing search as you type results. Screenshot of a search result for a partial query showing 'Algolia x Netlify' and 'Crawler' options with descriptive text and a 'Search by Algolia' tag.

Usage

HTML

Available parameters

Multiple git branches

If you’ve set up the plugin to index multiple branches using the branches option, each configured branch has a dedicated index. You also need to pass the information of which index you want to search in using the branch parameter of the integration. To get access to the currently building branch, you can configure your build tool to forward the HEAD environment variable. For instance, with webpack’s environment plugin configured to forward HEAD, you would pass branch: process.env.HEAD. If you’ve configured your plugin to index only specific branches, you need to duplicate the logic here so that it picks the correct branch only when appropriate. You can also use wildcards in the branch names. For instance, with branches = ['main', 'develop', 'feat/*'], and using webpack’s environment plugin to inject HEAD, here’s how the snippet could look like:
JavaScript

Theme

You can theme the input and the autocomplete by using the theme property.
JavaScript
Screenshot of a search interface with 'Algolia' entered, showing a result for an Algolia Search Netlify test website and a 'Search by Algolia' label. To go further, check the autocomplete.js documentation, or implement your own search with InstantSearch.js.
Last modified on June 19, 2026