// the find
algolia/docsearch
:blue_book: The easiest way to add search to your documentation.
DocSearch is the front end for Algolia's hosted documentation search: a search box shipped as a vanilla JS build, a React component, or a Docusaurus adapter, querying an index built by a separate crawler. It is for maintainers of public documentation sites who can get Algolia credentials and are willing to depend on Algolia's hosted index.
- The package split is sensible. Search logic lives in docsearch-core, the modal and button in docsearch-modal, and styles in a separate docsearch-css package, with the React and vanilla JS entry points built on top. You can restyle without forking the component.
- Testing goes past unit tests. Each package has its own suite, and the e2e folder has a Playwright accessibility run alongside the search and Ask AI specs, which catches regressions that unit tests miss.
- Releases go through Changesets with a CHANGELOG per package, so the upgrade path from one major version to the next is readable from the package history.
- The crawler is not in this repo. Indexing lives in algolia/docsearch-scraper and site configs live in docsearch-configs, so the parts that decide result quality sit outside what you can read or change here. Anything the public crawler cannot reach, such as pages behind a login, is out of reach.
- Lock-in is structural. Queries go to Algolia's hosted index with a public search key, and this repo has no self-hosted backend. Moving off DocSearch means replacing the search client and the index, not just the widget.
- The repo is wider than the search box. It also carries Ask AI and sidepanel components, MCP client plugins for ChatGPT, Codex, Cursor and Claude Code, and a CLI with a setup wizard. If you only want a search box, you are reading and depending on code you won't use.