search discovery⏱10 minutes
Get Started with Typesense
UnverifiedQuick Summary
“Open-source, typo-tolerant search engine — a fast, simple Algolia alternative.”
Best for: Instant search on a budget
Time to first integration: 10 minutes
📋Prerequisites
- ✓Node.js 18+ installed
- ✓A Typesense account — sign up here
- ✓An existing project (Next.js, React, or Node.js recommended)
Setup Steps
4 steps1
1
Run a server
Start Typesense via Docker or Typesense Cloud, and note the host and API key.
bash
docker run -p 8108:8108 typesense/typesense:latest --data-dir /data --api-key=xyz2
2
Install
Add the Typesense client to your project.
bash
npm install typesense3
3
Create a collection
Define a schema and create a collection.
typescript
await client.collections().create({
name: 'products',
fields: [{ name: 'title', type: 'string' }],
})4
4
Index and search
Import documents, then search — typo tolerance is on by default.
typescript
await client.collections('products').documents().import(docs)
const results = await client.collections('products').documents().search({ q: 'shoe', query_by: 'title' })