Repolode
unum-cloud

unum-cloud/USearch

A single-file C++ library for approximate nearest-neighbor vector search and clustering, with bindings for Python, JavaScript, Rust, Java, Go, Swift and more.

Open-source alternative to:Pinecone

Stars
4,346
Forks
360
Open issues
110
Last commit
3 days ago

What is it?

USearch is a similarity search and clustering engine built on the HNSW graph algorithm. It indexes vectors and supports user-defined distance metrics, so it can be used for semantic search, molecular fingerprint lookup, or geospatial queries with a Haversine distance. The core is a single C++11 header, and bindings are provided for C, Python, JavaScript, Java, Rust, Go, Swift, C#, Objective-C and Wolfram.

The index can store vectors in reduced precision such as bf16, f16, e5m2 and i8, and a binary type for Tanimoto and Hamming metrics. Indexes can be saved to a file, a stream or a memory-mapped buffer, and served from disk without loading everything into RAM. Search can apply predicate functions during graph traversal, and an exact brute-force mode is available for small collections.

The project also includes K-nearest-neighbor clustering over an existing index, and a join operation for one-to-one or many-to-many fuzzy matching. Several databases and tools, including ClickHouse and DuckDB, list it as a vector index backend.

Key features

  • 01Single C++11 header library with a small codebase
  • 02HNSW-based approximate nearest-neighbor search
  • 03User-defined distance metrics, including JIT-compiled Python metrics
  • 04Reduced-precision storage such as bf16, f16, e5m2 and i8
  • 05Index serving from disk or memory-mapped files
  • 06Predicate filtering applied during graph traversal

Use cases

  • Adding semantic search over embeddings to an application or service
  • Embedding a vector index in a mobile or client-side app across platforms
  • Running similarity search on molecular fingerprints or geospatial coordinates
  • Serving very large indexes from disk to reduce RAM costs

Topics

FAQ

What is USearch?
A single-file C++ library for approximate nearest-neighbor vector search and clustering, with bindings for Python, JavaScript, Rust, Java, Go, Swift and more. USearch is a similarity search and clustering engine built on the HNSW graph algorithm. It indexes vectors and supports user-defined distance metrics, so it can be used for semantic search, molecular fingerprint lookup, or geospatial queries with a Haversine distance. The core is a single C++11 header, and bindings are provided for C, Python, JavaScript, Java, Rust, Go, Swift, C#, Objective-C and Wolfram.
Is USearch free to use? What license does it have?
USearch is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is USearch still maintained?
Actively maintained. The last commit to USearch was on Oct 18, 2026.
What can I use USearch for?
Adding semantic search over embeddings to an application or service Embedding a vector index in a mobile or client-side app across platforms Running similarity search on molecular fingerprints or geospatial coordinates Serving very large indexes from disk to reduce RAM costs
Where can I get USearch?
The source code and installation instructions are on GitHub: https://github.com/unum-cloud/USearch

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects