Back to home
Migration guide

Migrating from Algolia to Headband

A short, honest guide for Algolia refugees. Most migrations take a couple of hours. Here's how.

Why migrate?

Four reasons we hear over and over:

1.Pricing escalation

Algolia's PAYG model is fine until you're successful, at which point your search bill grows faster than your revenue. We've talked to teams whose monthly Algolia spend went from $200 to $4,000 in eighteen months without any real change in product behavior.

2.Vendor lock-in

Algolia's API is proprietary. Once your client code is shaped around it, leaving is a project, not a switch.

3.Data sovereignty

Your search index is a copy of your data sitting on someone else's infrastructure. For some teams that's a compliance problem; for others it's just a thing they'd rather not do.

4.Engine flexibility

Algolia is one engine. With Headband you can run Meilisearch for product search, Elasticsearch for logs, and Typesense for docs -- same API, same dashboard, same client code.

The 3-step migration

1

Install @headband/react

This is the InstantSearch-compatible React kit. If you've been using react-instantsearch with Algolia, you already know about 80% of the API.

terminal
npm i @headband/react
2

Replace algoliasearch(...) with headband(...)

Your client initialization changes by one line. The API surface is intentionally similar.

3

Replace <InstantSearch> with <HeadbandSearch>

Components have the same names where possible ( <SearchBox>, <Hits>, <RefinementList>, <Pagination> ) and the same prop shapes. The mental model is identical.

Side-by-side: SearchBox + Hits

Before (Algolia)

jsx
import algoliasearch from 'algoliasearch/lite';
import {
  InstantSearch, SearchBox, Hits
} from 'react-instantsearch';

const searchClient = algoliasearch(
  'APP_ID', 'SEARCH_KEY'
);

function App() {
  return (
    <InstantSearch
      searchClient={searchClient}
      indexName="products"
    >
      <SearchBox />
      <Hits hitComponent={Hit} />
    </InstantSearch>
  );
}

After (Headband)

jsx
import { headband } from '@headband/react';
import {
  HeadbandSearch, SearchBox, Hits
} from '@headband/react';

const searchClient = headband({
  url: 'https://api.headband.dev',
  apiKey: 'YOUR_HEADBAND_KEY',
});

function App() {
  return (
    <HeadbandSearch
      searchClient={searchClient}
      indexName="products"
    >
      <SearchBox />
      <Hits hitComponent={Hit} />
    </HeadbandSearch>
  );
}

That's it. The Hit component is unchanged. Your CSS selectors are unchanged. Most of your refinement components will work without modification.

Feature mapping

Algolia featureHeadband equivalentStatus
IndexIndex (per-engine, you choose Meili/Typesense/ES)
Search-only API keyHeadband search API key (project-scoped)
Admin API keyHeadband admin API key
searchClient.search()searchClient.search() (Meilisearch-compatible)
Faceted searchNative, via underlying engine
Typo toleranceNative (best on Meilisearch)
SynonymsVia underlying engine
Geo searchSupported on Meilisearch and Elasticsearch
Vector / hybrid searchNative, via underlying engine
InstantSearch React@headband/react (drop-in compatible)
Algolia DashboardHeadband Dashboard
llms.txtNative, generated automatically
MCP server for agentsEngine-agnostic MCP server
AI PersonalizationComing soonSoon
A/B testingComing soonSoon
Query SuggestionsRoadmapSoon
Recommend (related items)RoadmapSoon

What doesn't migrate yet

Being honest: Algolia has spent ten years building features that aren't a weekend port.

AI Personalization

Algolia's user-event-driven re-ranking is genuinely better than anything we ship today. On the roadmap, not shipping this quarter.

A/B testing

Coming soon, but for now you'll need an external experimentation tool.

Query Suggestions

Basic version on the roadmap.

Recommend / related items

Vector-based version possible today via the underlying engine, polished product on the roadmap.

If any of these are critical to your business right now, stay on Algolia for those features and migrate the rest. Headband is happy to be one of several layers in your stack.

Cost comparison

For a representative mid-size catalog (~500k records, ~2M monthly search operations):

OptionApprox. monthly cost
Algolia PAYG$800 -- $2,500
Headband self-hosted (Meilisearch on a $20 droplet)~$25
Headband self-hosted (Elasticsearch on a 4GB box)~$80
Headband hosted (resource-based)~$50 -- $200

The point isn't that we're always cheaper -- for small workloads Algolia's free tier is fine. The point is that Headband's price doesn't escalate with success, because it isn't priced per search.

Next steps

Stuck? Open an issue or email us. We answer.

Get started free