Skip to main content
Version: Stable (v5.x)

DocSearch packages

DocSearch v5 provides keyword search, AI answers powered by Agent Studio, and lower-level packages for custom integrations.

Start with @docsearch/js for a browser integration or @docsearch/react for a React application. Both packages support the same keyword search options.

Choose a package

PackageUse it for
@docsearch/jsJavaScript sites, including sites that don't use React. The default entry includes keyword search and Ask AI.
@docsearch/reactReact applications. Choose DocSearch for keyword search or DocSearchAI for keyword search and Ask AI.
@docsearch/cssThe complete button and modal stylesheet. See Styling.
@docsearch/coreShared state, keyboard handling, and the provider for the Composable API.
@docsearch/modalSearch button, keyword modal, and Ask AI modal components for the Composable API.
@docsearch/sidepanelReact Sidepanel components for persistent AI conversations.
@docsearch/sidepanel-jsJavaScript wrapper for the AI Sidepanel.

If your Docusaurus site uses the DocSearch adapter, follow the Docusaurus adapter guide.

Choose a search experience

Use keyword search when you only need results from Algolia indices. It has no Ask AI runtime.

  • JavaScript: import @docsearch/js/docsearch.
  • React: render DocSearch from @docsearch/react.

Keyword search and Ask AI

Use the AI-capable integration when you have an Agent Studio assistant.

  • JavaScript: use the default @docsearch/js export.
  • React: render DocSearchAI from @docsearch/react.

Create and configure the assistant before adding it to DocSearch. See Get started with Agent Studio.

Composable and hybrid experiences

Use the Composable API to control the provider, button, and modal separately. Use hybrid mode to combine the modal with the AI Sidepanel.

Beta version

Install the v5 beta with the caret range:

npm install @docsearch/js@^5 @docsearch/css@^5

For an existing v4 integration, read Migrate from v4 and v5 breaking changes.