What is USearch?
USearch is an embedded similarity search engine for vectors, built around a single C++11 header and the HNSW algorithm for approximate nearest-neighbor search. It runs in-process inside your own application rather than as a separate server, so you create an index, add vectors, and query it directly from your code. It sits in the Vector Databases category of the Retrieval & Knowledge (RAG) tools and is open-source, written in C++ and licensed Apache-2.0.
Overview
USearch is an embedded similarity search engine for vectors, built around a single C++11 header and the HNSW algorithm for approximate nearest-neighbor search. It runs in-process inside your own application rather than as a separate server, so you create an index, add vectors, and query it directly from your code.
It is aimed at developers who need to search over embeddings without standing up a full vector database. The same core ships with bindings for many languages, including Python, JavaScript, Java, Rust, C, C99, Objective-C, Swift, C#, Go, and Wolfram, and runs on Linux, macOS, Windows, iOS, Android, and WebAssembly.
Within the embedded / in-process vector category, USearch focuses on a compact codebase, few dependencies, and user-defined metrics. It supports half- and quarter-precision types such as bf16, e5m2, and i8, can view large indexes from disk without loading them fully into RAM, and handles on-the-fly deletions and relabeling.
What it does
- HNSW-based approximate nearest-neighbor search from a single C++11 header library
- Bindings for many languages, including Python, JavaScript, Java, Rust, C, Swift, C#, and Go
- SIMD-optimized distance functions plus user-defined metrics with JIT compilation
- Half- and quarter-precision support (bf16, e5m2, i8) for memory efficiency
- View large indexes directly from disk without loading them entirely into RAM
- On-the-fly deletions, renaming/relabeling, and heterogeneous lookups
Getting started
Install the binding for your language, then create an index, add vectors, and search. The example below uses the Python package.
Install the Python package
Install USearch from PyPI.
pip install usearchIndex and search vectors
Create an index with a fixed dimensionality, add a vector under a key, then search for the nearest matches.
import numpy as np
from usearch.index import Index
index = Index(ndim=3)
vector = np.array([0.2, 0.6, 0.4])
index.add(42, vector)
matches = index.search(vector, 10)
assert matches[0].key == 42Use another language (optional)
USearch also ships as an npm package for JavaScript and as crates/packages for Rust, Java, C#, Go, and more.
npm install usearchCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Adding semantic or embedding-based search to an app without running a separate vector database server
- Nearest-neighbor lookup on edge or mobile targets, including iOS, Android, and WebAssembly
- Searching very large vector sets by viewing the index from disk instead of holding it all in RAM
- Domain-specific similarity (for example Genomics or Chemistry) using built-in binary metrics or custom user-defined ones
How USearch compares
USearch alongside other open-source vector databases tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Supabase | ★ 116k | Managed Postgres backend whose Vector toolkit (pgvector) stores, indexes, and queries embeddings next to transactional data. |
| Redis Cloud | ★ 77.8k | Fully-managed Redis with built-in vector search, offering low-latency similarity and hybrid queries over any embeddings. |
| Milvus | ★ 46.8k | A distributed vector database for storing and searching billions of embeddings at scale, with multiple index types and Kubernetes-native deployment. |
| FAISS | ★ 42k | A library from Meta for efficient similarity search and clustering of dense vectors, with both exact and approximate indexes. |
| Qdrant | ★ 35.8k | A Rust-based vector search engine that stores embeddings with rich payload filtering for semantic search and recommendation systems. |
| Chroma | ★ 29.8k | A developer-focused vector database designed for quickly building retrieval and RAG features with a simple Python and JavaScript API. |
| pgvector | ★ 23.9k | A PostgreSQL extension that adds a vector data type and similarity search so you can store and query embeddings inside an existing Postgres database. |
| USearch | ★ 4.4k | Single-file similarity search and clustering engine for vectors across many languages |

