Algolia alternatives in 2026: Meilisearch is the cheap drop-in
Short version: if you are looking for an Algolia alternative it is almost always because of the bill, and the replacement for most apps is Meilisearch, priced per instance instead of per query so the number stops tracking your traffic. Meilisearch on Layerbase Cloud provisions in about ten seconds, and the official meilisearch JS client is a near-drop-in for algoliasearch on the operations most apps use. Typesense is the close second. Postgres full-text search is the free option if your search box is a nicety rather than the product. Stay on Algolia if you depend on its AI ranking, personalization, or search analytics, because nothing here matches those.
The honest caveat first: Algolia is genuinely the best developer experience in the category. The relevance ranking is good out of the box, the instant-search components are clean, and if the bill is not a constraint you should probably stay. Algolia killed the indie-friendly "Build" tier in 2022, and the free tier that remains covers 50,000 records and 10,000 search requests per month. The record allowance is generous; the 10,000 searches are gone within a week for anything user-facing.
Below: how search hosting actually works in 2026, what each option costs you, where Meilisearch comes out ahead, and the cases where staying on Algolia is the right call.
Contents
- The options at a glance
- The Algolia pricing problem
- Option 1: Meilisearch on Layerbase Cloud
- Option 2: Run Meilisearch locally with the Layerbase CLI
- Option 3: Self-host Meilisearch on a VPS
- Option 4: Typesense
- Option 5: Postgres full-text search
- When Algolia is still the right call
- Migrating from Algolia to Meilisearch
- Which one to pick
- FAQ
The options at a glance
| Option | What it is | What it costs | Pick it when |
|---|---|---|---|
| Meilisearch on Layerbase Cloud | Upstream Meilisearch on a TLS endpoint, with backups and a dashboard | Per instance, not per search | You want an Algolia-shaped developer experience and a bill that stops tracking traffic |
| Meilisearch on the Layerbase CLI | The same binary running locally, no Docker | Free | You are developing and do not want to point at production |
| Self-hosted Meilisearch | One binary on a VPS, behind your own reverse proxy and TLS | $5 to $10 a month for the VPS, plus your time | You like operational work and want the cheapest possible dollar figure |
| Typesense | The closest sibling to Meilisearch, GPL-3.0, better GeoSearch defaults | Self-host or Typesense Cloud | You have a specific reason: license, a feature, or team familiarity |
| Postgres full-text search | tsvector and tsquery in the database you already run | Free, no new service | Under about 100K documents and you do not need typo tolerance |
| Algolia (stay) | The category's best developer experience, plus AI ranking and analytics | Grow: $0.50 per 1,000 searches, $0.40 per 1,000 records | You depend on the AI features, the analytics, or ranking rules you have tuned |
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. On Grow, the cheapest paid plan, you get 10,000 search requests and 100,000 records a month for free and then pay $0.50 per additional 1,000 search requests and $0.40 per additional 1,000 records. It is billed monthly with no contract, so there is no minimum commitment to sign. Grow Plus is the same shape at $1.75 per additional 1,000 searches, and what the extra buys is the AI feature set: AI Ranking, AI Synonyms, and advanced personalization.
Algolia rates verified 2026-08-25 from algolia.com/pricing.
That works fine if your traffic is low. It works less fine when you grow, because both meters scale up together and the search meter is the one that moves fastest. A typical e-commerce search box getting 100,000 monthly searches with a 50,000-record catalog is about $45 a month on Grow: 90,000 billable searches at $0.50 per thousand, with the catalog still inside the free record allowance. Push that to 1M monthly searches and a 500,000-record catalog and you are at roughly $650, and that is before any premium feature (personalization, AI ranking, A/B testing) adds its own line item. Sites at that volume with the AI features turned on land in the $500 to $2,000 range.
Note the shape of that curve rather than any single number on it. The bill is a straight line through your traffic with no ceiling on it, so the month a campaign lands or a crawler discovers your search endpoint is the month the invoice moves, and you find out afterwards. 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.
pnpm add meilisearchimport { 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 the Layerbase CLI
You do not want to develop against your production Meilisearch. The Layerbase CLI (formerly SpinDB) runs it locally without Docker:
npm i -g layerbase
lbase create app-search-dev --engine meilisearch --start
lbase url app-search-devThe printed URL is your local Meilisearch host. Local Meilisearch defaults to no API key, so the env vars look like:
MEILISEARCH_HOST=http://localhost:7700
MEILISEARCH_API_KEY=Develop locally, push the same indexing code against your Layerbase Cloud Meilisearch when you ship. lbase stop app-search-dev shuts it down without removing the index. What is the Layerbase CLI? 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:
curl -L https://install.meilisearch.com | sh
./meilisearch --master-key='your-strong-key' --http-addr=0.0.0.0:7700Put 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 handle it for free. No new database, no new client, no new operational surface.
-- 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.
There are now two ways to do it. The fastest is the managed migration wizard on Layerbase Cloud: paste your Algolia Application ID and an Admin key, pick the index, and it browses every record, translates your settings (searchable attributes, ranking, faceting, synonyms), and loads them into a fresh managed Meilisearch instance, then hands you a browser-safe search key and the exact frontend swap snippet. The hands-on version, doing the export, translate, and import yourself, is below. For the full step-by-step with the complete settings mapping table and both frontend-swap paths, see the dedicated guide: Migrating from Algolia to Meilisearch.
Export from Algolia
Algolia has a browse endpoint that pages through every record in an index without ranking. Use it to dump:
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
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:
await meili.index('products').updateSettings({
searchableAttributes: ['name', 'description', 'tags'],
filterableAttributes: ['category', 'price'],
sortableAttributes: ['price', 'created_at'],
})Swap the client in your app
The before:
const { hits } = await algoliaIndex.search('wool jacket', {
filters: 'category:outerwear',
hitsPerPage: 20,
})The after:
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.
FAQ
What is the best Algolia alternative?
Meilisearch, for most apps. It gives you the parts of Algolia people actually use day to day (typo tolerance, instant search, faceted filtering, custom ranking rules, synonyms) with a client library that is close enough to algoliasearch that the swap is measured in hours. Typesense is the close second if you have a reason to prefer it, and Postgres full-text search is the right answer when search is a feature rather than the product.
Is Meilisearch cheaper than Algolia?
At any meaningful traffic, yes, because the pricing models are different in kind rather than degree. Algolia bills per search and per record, so the number climbs with your traffic forever. Meilisearch on Layerbase Cloud is priced per instance, so 1,000 searches a month and 10 million searches a month cost the same. The crossover comes early: a site doing 100,000 monthly searches is already paying Algolia around $45 for something a single flat-priced instance handles.
Can I migrate from Algolia to Meilisearch without rewriting my search UI?
Mostly. Both store JSON documents and return ranked hits, so the data shape carries over directly and the work concentrates in the search call. Meilisearch returns hits directly and the faceting structure differs slightly, so expect minor tweaks rather than a rebuild. Plan a day if your search code lives in one place, longer if ten files call the index.
How do I move my Algolia index across?
The fast path is the managed migration wizard on Layerbase Cloud: paste your Algolia Application ID and an Admin key, pick the index, and it browses every record, translates your settings, loads them into a fresh Meilisearch instance, and hands back a browser-safe search key plus the frontend swap snippet. By hand it is Algolia's browse endpoint to dump the records, addDocuments with objectID as the primary key to load them, and updateSettings for searchable and filterable attributes.
When should I stay on Algolia?
Four cases, and they are real. You depend on Algolia Recommend, AI Ranking, or Personalization, which Meilisearch does not match. You depend on the search analytics and A/B testing dashboard for product decisions. You have ranking rules and tunings built up over years that would cost more engineering time to port than the bill costs to keep. Or your team is large enough that a fully hosted vendor is simply cheaper than anyone's attention.
Is Postgres full-text search good enough?
For a lot of apps, yes. If your data is already in Postgres and the requirement is "find documents matching these words," a generated tsvector column with a GIN index does it with no new service, no new client, and no new operational surface. The limits arrive around a million documents, or the first time someone types "jaket" and expects to find the jacket. Trigram indexes patch the second one, but once you are patching, a dedicated search engine is the cleaner answer.
Where to start
For local development against any of the above, the Layerbase CLI runs Meilisearch locally with one command, identical to the production binary. Develop locally, deploy with confidence. When you are ready to move the real index, create a managed Meilisearch and let the migration wizard pull it across.
Keep reading
- Migrating from Algolia to MeilisearchA practical guide to moving search from Algolia to Meilisearch: what maps cleanly, what does not, how to copy records and settings, and the frontend swap.
- Meilisearch Cloud alternatives: the same engine on a flat planMeilisearch Cloud starts at $20 a month, has no free plan, and bills per instance or per usage, for a search engine that is open source and runs anywhere. Here is what the Cloud tiers actually buy, where a flat $15 plan with Meilisearch 1.52 fits, how to move an index, and when the Cloud is still the right call.
- Getting Started with MeilisearchBuild instant, typo-tolerant search with Meilisearch and TypeScript. Learn why database queries fail on misspelled input and how Meilisearch fixes that fast.
- Preview environment platforms in 2026: what is in the database when the preview comes upEvery platform on this list will give a pull request its own URL. The question that sorts them is what is in the database behind that URL: nothing, a restore of last night's backup, or the live data as of right now. Here is where each of eleven platforms lands, quoted from their own docs, and what a preview costs while the PR sits open.