React InstantSearch

7.29.0 · active · verified Sun Apr 19

React InstantSearch is an open-source React library developed by Algolia, designed to help developers quickly create fast, dynamic search user interfaces. It leverages Algolia's powerful search API to deliver an instant search experience, adhering to modern React principles for component-based development. The current stable version is 7.29.0, with releases occurring regularly, typically monthly, as seen by the March 2026 update. Key differentiators include its highly customizable component architecture, seamless integration with the Algolia ecosystem, and a focus on best practices for search UI design. It's part of the broader InstantSearch family, offering similar experiences for other frameworks like Vue and vanilla JavaScript. For environments without DOM access, such as React Native, `react-instantsearch-core` is the appropriate alternative.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates setting up a basic instant search interface with a search box and result list, connecting to an Algolia index.

import React from 'react';
import ReactDOM from 'react-dom/client';
import { liteClient as algoliasearch } from 'algoliasearch/lite';
import { InstantSearch, SearchBox, Hits } from 'react-instantsearch';
import 'instantsearch.css/themes/algolia.css'; // Optional: for basic styling

// Replace with your Algolia App ID and Search API Key
const searchClient = algoliasearch(
  process.env.NEXT_PUBLIC_ALGOLIA_APP_ID ?? 'latency',
  process.env.NEXT_PUBLIC_ALGOLIA_SEARCH_API_KEY ?? '6be0576ff61c053d5f9a3225e2a90f76'
);

const App = () => (
  <InstantSearch indexName="bestbuy" searchClient={searchClient}>
    <h1>React InstantSearch Example</h1>
    <SearchBox placeholder="Search products..." />
    <Hits />
  </InstantSearch>
);

const root = ReactDOM.createRoot(document.getElementById('root')!);
root.render(<App />);

view raw JSON →