Algolia alternatives in 2026: Meilisearch is the cheap drop-in

AlgoliaMeilisearchSearchComparisonDatabases

Algolia is the polished, default answer for "I need fast search in my app." The relevance ranking is good out of the box. The instant-search UI components are clean. The developer experience is the best in the category. If money is not a constraint, you should probably just use Algolia.

For everyone else, the bill is the issue. Algolia killed the indie-friendly "Build" tier in 2022, and the current pricing meters two things together: searches per month and records indexed. Small apps that grow into mid-size traffic regularly run into bills in the high hundreds or low thousands per month for what feels like a small search index. The free tier covers 10,000 records and 10,000 searches per month, which is gone within a week for anything user-facing.

If your app has hit that wall, or you can see it coming, this post is for you. Below: how search hosting actually works in 2026, what each option costs you, and where Meilisearch comes out ahead.

Contents

The Algolia pricing problem

The shape of the issue is that Algolia charges for usage, not for capacity. Each search is metered. Each record indexed is metered. The Grow tier (the cheapest paid plan as of 2026) starts around $0.50 per 1,000 searches plus $1.50 per 1,000 records, with a minimum commitment.

That works fine if your traffic is low. It works less fine when you grow, because both meters scale up together. A typical e-commerce search box getting 100,000 monthly searches with a 50,000-record catalog runs $100 to $200 per month before you turn on any premium features (personalization, AI ranking, A/B testing) which add their own line items. Sites that hit 1M monthly searches typically pay $500 to $2,000 per month.

The recurring pattern on Hacker News and Twitter is "I thought search would be cheap and the Algolia bill keeps growing." If you would rather pay for capacity and not get billed per query, Meilisearch is the answer.

Option 1: Meilisearch on Layerbase Cloud

Meilisearch on Layerbase Cloud is the simplest answer. Provisioning takes about ten seconds. Pricing is per-instance, not per-search.

You get the upstream Meilisearch binary unchanged, on a TLS endpoint, with backups and a dashboard. The developer experience is close to Algolia: typo tolerance, instant-search, faceted filtering, custom ranking rules, synonyms. The official JavaScript client (meilisearch) is a near-drop-in replacement for algoliasearch for the operations most apps use.

bash
pnpm add meilisearch
ts
import { MeiliSearch } from 'meilisearch'

const client = new MeiliSearch({
  host: process.env.MEILISEARCH_HOST!,
  apiKey: process.env.MEILISEARCH_API_KEY!,
})

// Index a batch of documents.
await client.index('products').addDocuments([
  { id: 1, name: 'Wool jacket', category: 'outerwear', price: 240 },
  { id: 2, name: 'Cotton tee', category: 'tops', price: 35 },
])

// Search.
const results = await client.index('products').search('jacket', {
  limit: 20,
  filter: ['category = outerwear'],
})

That is the entire integration. No per-search billing, no per-record billing. The bill is the same whether you do 1,000 searches a month or 10 million.

Option 2: Run Meilisearch locally with SpinDB

You do not want to develop against your production Meilisearch. SpinDB runs it locally without Docker:

bash
npm i -g spindb
spindb create app-search-dev --engine meilisearch --start
spindb url app-search-dev

The printed URL is your local Meilisearch host. Local Meilisearch defaults to no API key, so the env vars look like:

text
MEILISEARCH_HOST=http://localhost:7700
MEILISEARCH_API_KEY=

Develop locally, push the same indexing code against your Layerbase Cloud Meilisearch when you ship. spindb stop app-search-dev shuts it down without removing the index. What is SpinDB? covers the rest, including how to point Layerbase Desktop at the same local instance for a GUI.

Option 3: Self-host Meilisearch on a VPS

If you want to run your own, Meilisearch is a single binary. Drop it on a $5 to $10 DigitalOcean droplet, Hetzner CX22, or any VPS:

bash
curl -L https://install.meilisearch.com | sh
./meilisearch --master-key='your-strong-key' --http-addr=0.0.0.0:7700

Put it behind a reverse proxy with TLS (Caddy is the easiest), set up backups, and you have a working search server for the cost of the VPS. The operational work is real: OS updates, monitoring, backups, restoring from backup when the disk fills up. For some teams that work is fine, for others it is the reason to pay someone else to do it.

This option is the cheapest in dollars and the most expensive in your time.

Option 4: Typesense

Typesense is the most direct alternative to Meilisearch. Similar feature set, similar developer experience, also open source. The differences are small in practice:

  • Meilisearch is MIT-licensed. Typesense is GPL-3.0, which has implications if you embed it in proprietary software (most apps do not embed search servers, so this rarely matters).
  • Typesense has slightly better support for "GeoSearch" out of the box.
  • Meilisearch has slightly better typo tolerance defaults.
  • Both have managed hosting from their respective companies; Typesense Cloud and Meilisearch Cloud are both fine.

If you have an existing reason to prefer Typesense (license, specific feature, team familiarity), use it. Otherwise the Meilisearch ecosystem is slightly larger and the integration story with Layerbase is direct.

Option 5: Postgres full-text search

Underrated. If your data already lives in Postgres and your search is "find documents matching these words" without typo tolerance or fuzzy ranking, the built-in tsvector and tsquery in Postgres handles it for free. No new database, no new client, no new operational surface.

sql
-- Add a search column.
alter table products add column search_vector tsvector
  generated always as (to_tsvector('english', name || ' ' || description)) stored;

create index idx_products_search on products using gin(search_vector);

-- Query.
select * from products
where search_vector @@ to_tsquery('english', 'wool & jacket');

The limits show up around 1M documents or when you want typo tolerance ("jaket" finding "jacket"). Both can be worked around (trigram indexes for fuzzy matching, smarter indexing strategies), but at the point where you are working around limits you are usually better off with a dedicated search engine. Below 100K documents and basic search needs, Postgres is more than enough and zero additional cost.

This is what I would default to for a side project. Promote to Meilisearch when the queries get more sophisticated than name LIKE '%pattern%'.

When Algolia is still the right call

The honest list:

  • You have an existing Algolia integration with custom ranking rules and personalization that you have tuned over time. Migrating those tunings is real work and the per-month cost may be worth the time saved.
  • You need their AI features specifically. Algolia Recommend, AI Ranking, and Personalization are real differentiators if you are using them. Meilisearch has some of this in progress but it is not at feature parity.
  • You need their analytics and A/B testing. The Algolia dashboard for search analytics is excellent. If you depend on it for product decisions, that is a real cost to give up.
  • Your team is large enough that the operational simplicity of a fully-hosted vendor exceeds the cost difference. At company scale, paying $1,000 per month for someone else to handle the search infrastructure can be cheaper than the engineering time to do anything different.

If none of those apply, Meilisearch is almost certainly the better trade.

Migrating from Algolia to Meilisearch

The migration is shorter than people expect because the data shape is identical: both store JSON documents, both index them, both return ranked results. The work is mostly in the search call, not the data.

Export from Algolia

Algolia has a browse endpoint that pages through every record in an index without ranking. Use it to dump:

ts
import algoliasearch from 'algoliasearch'

const algolia = algoliasearch('YOUR_APP_ID', 'YOUR_ADMIN_KEY')
const index = algolia.initIndex('products')

const allRecords: unknown[] = []
await index.browseObjects({
  batch: (batch) => allRecords.push(...batch),
})

await fs.writeFile('products.json', JSON.stringify(allRecords, null, 2))

Import into Meilisearch

ts
import { MeiliSearch } from 'meilisearch'
import fs from 'fs/promises'

const meili = new MeiliSearch({
  host: process.env.MEILISEARCH_HOST!,
  apiKey: process.env.MEILISEARCH_API_KEY!,
})

const records = JSON.parse(await fs.readFile('products.json', 'utf8'))

// Meilisearch needs each document to have a primary key field.
// Algolia uses `objectID`; Meilisearch can use anything, but you
// have to tell it which field to treat as the primary key.
await meili.index('products').addDocuments(records, { primaryKey: 'objectID' })

Configure searchable attributes, filterable attributes, and ranking rules:

ts
await meili.index('products').updateSettings({
  searchableAttributes: ['name', 'description', 'tags'],
  filterableAttributes: ['category', 'price'],
  sortableAttributes: ['price', 'created_at'],
})

Swap the client in your app

The before:

ts
const { hits } = await algoliaIndex.search('wool jacket', {
  filters: 'category:outerwear',
  hitsPerPage: 20,
})

The after:

ts
const { hits } = await meili.index('products').search('wool jacket', {
  filter: ['category = outerwear'],
  limit: 20,
})

The shape of the response is similar enough that most existing UI code keeps working with minor tweaks (Meilisearch returns hits directly, faceting structure is slightly different). Plan a day for the migration if your search code is contained, longer if you have ten different places calling the index.

Keep Algolia running for a week

The clean way to do this: index into both Algolia and Meilisearch in parallel during the transition. Run shadow traffic to Meilisearch and compare result quality against Algolia for the same queries. Cut over when you are happy. Algolia bills you for the overlap, but it is bounded.

Which one to pick

For a typical app picking a search engine in 2026:

  • You have an Algolia bill over $200 per month and your needs are normal: managed Meilisearch on Layerbase Cloud. You will save 70 to 90 percent on the search bill.
  • You are starting fresh and the data is small (under 100K docs): Postgres full-text search. Promote to Meilisearch when you outgrow it.
  • You like operational work and want the cheapest possible bill: self-host Meilisearch on a small VPS.
  • You specifically need Algolia's AI features: stay on Algolia. The cost is justified.
  • You have an existing reason to prefer Typesense: use Typesense. It is fine.

The case for Meilisearch on Layerbase specifically is twofold. First, the pricing model is sane (per-instance, not per-query) so the bill does not surprise you as you grow. Second, if you also need a database (Postgres, Redis, Qdrant for vector search), they are all on the same account, same dashboard, same bill. The "one place for the whole data layer" story is the reason people pick the platform; search just happens to fit in alongside everything else.

For local development against any of the above, SpinDB runs Meilisearch locally with one command, identical to the production binary. Develop locally, deploy with confidence.

Something not working?