meilisearch-sdk
Library Featured
Rust wrapper for the Meilisearch API. Meilisearch is a powerful, fast, open-source, easy to use and deploy search engine.
- Downloads
- 170,111
- Dependents
- 16
- Stars
- 431
- Forks
- 116
- Contributors
- 73
- Commits
- 1,575
- Latest release
- 0.33.0 ·
About
Meilisearch Rust SDK
Meilisearch | Meilisearch Cloud | Documentation | Discord | Roadmap | Website | FAQ
⚡ The Meilisearch API client written for Rust 🦀
Meilisearch Rust is the Meilisearch API client for Rust developers.
Meilisearch is an open-source search engine. Learn more about Meilisearch.
Table of Contents
- 📖 Documentation
- 🔧 Installation
- 🚀 Getting started
- 🌐 Running in the Browser with WASM
- 🤖 Compatibility with Meilisearch
- ⚙️ Contributing
📖 Documentation
This readme contains all the documentation you need to start using this Meilisearch SDK.
For general information on how to use Meilisearch—such as our API reference, tutorials, guides, and in-depth articles—refer to our main documentation website.
🔧 Installation
To use meilisearch-sdk, add this to your Cargo.toml:
[dependencies]
meilisearch-sdk = "0.33.0"
The following optional dependencies may also be useful:
futures = "0.3" # To be able to block on async functions if you are not using an async runtime
serde = { version = "1.0", features = ["derive"] }
This crate is async but you can choose to use an async runtime like tokio or just block on futures.
You can enable the sync feature to make most structs Sync. It may be a bit slower.
Read the full README
Using this crate is possible without serde, but a lot of features require serde.
Run Meilisearch
⚡️ Launch, scale, and streamline in minutes with Meilisearch Cloud—no maintenance, no commitment, cancel anytime. Try it free now.
🪨 Prefer to self-host? Download and deploy our fast, open-source search engine on your own infrastructure.
🚀 Getting started
Add Documents
use meilisearch_sdk::client::*;
use serde::{Serialize, Deserialize};
use futures::executor::block_on;
#[derive(Serialize, Deserialize, Debug)]
struct Movie {
id: usize,
title: String,
genres: Vec<String>,
}
#[tokio::main(flavor = "current_thread")]
async fn main() {
// Create a client (without sending any request so that can't fail)
let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY)).unwrap();
// An index is where the documents are stored.
let movies = client.index("movies");
// Add some movies in the index. If the index 'movies' does not exist, Meilisearch creates it when you first add the documents.
movies.add_documents(&[
Movie { id: 1, title: String::from("Carol"), genres: vec!["Romance".to_string(), "Drama".to_string()] },
Movie { id: 2, title: String::from("Wonder Woman"), genres: vec!["Action".to_string(), "Adventure".to_string()] },
Movie { id: 3, title: String::from("Life of Pi"), genres: vec!["Adventure".to_string(), "Drama".to_string()] },
Movie { id: 4, title: String::from("Mad Max"), genres: vec!["Adventure".to_string(), "Science Fiction".to_string()] },
Movie { id: 5, title: String::from("Moana"), genres: vec!["Fantasy".to_string(), "Action".to_string()] },
Movie { id: 6, title: String::from("Philadelphia"), genres: vec!["Drama".to_string()] },
], Some("id")).await.unwrap();
}
With the uid, you can check the status (enqueued, canceled, processing, succeeded or failed) of your documents addition using the task.
Basic Search
// Meilisearch is typo-tolerant:
println!("{:?}", client.index("movies_2").search().with_query("caorl").execute::<Movie>().await.unwrap().hits);
Output:
[Movie { id: 1, title: String::from("Carol"), genres: vec!["Romance", "Drama"] }]
Json output:
{
"hits": [{
"id": 1,
"title": "Carol",
"genres": ["Romance", "Drama"]
}],
"offset": 0,
"limit": 10,
"processingTimeMs": 1,
"query": "caorl"
}
Custom Search
let search_result = client.index("movies_3")
.search()
.with_query("phil")
.with_attributes_to_highlight(Selectors::Some(&["*"]))
.execute::<Movie>()
.await
.unwrap();
println!("{:?}", search_result.hits);
Json output:
{
"hits": [
{
"id": 6,
"title": "Philadelphia",
"_formatted": {
"id": 6,
"title": "<em>Phil</em>adelphia",
"genre": ["Drama"]
}
}
],
"offset": 0,
"limit": 20,
"processingTimeMs": 0,
"query": "phil"
}
Custom Search With Filters
If you want to enable filtering, you must add your attributes to the filterableAttributes
index setting.
let filterable_attributes = [
"id",
"genres",
];
client.index("movies_4").set_filterable_attributes(&filterable_attributes).await.unwrap();
You only need to perform this operation once.
Note that Meilisearch will rebuild your index whenever you update filterableAttributes. Depending on the size of your dataset, this might take time. You can track the process using the tasks.
Then, you can perform the search:
let search_result = client.index("movies_5")
.search()
.with_query("wonder")
.with_filter("id > 1 AND genres = Action")
.execute::<Movie>()
.await
.unwrap();
println!("{:?}", search_result.hits);
Json output:
{
"hits": [
{
"id": 2,
"title": "Wonder Woman",
"genres": ["Action", "Adventure"]
}
],
"offset": 0,
"limit": 20,
"estimatedTotalHits": 1,
"processingTimeMs": 0,
"query": "wonder"
}
Customize the HttpClient
By default, the SDK uses reqwest to make http calls.
The SDK lets you customize the http client by implementing the HttpClient trait yourself and
initializing the Client with the new_with_client method.
You may be interested by the futures-unsend feature which lets you specify a non-Send http client.
Wasm support
The SDK supports wasm through reqwest. You'll need to enable the futures-unsend feature while importing it, though.
🌐 Running in the Browser with WASM
This crate fully supports WASM.
The only difference between the WASM and the native version is that the native version has one more variant (Error::Http) in the Error enum. That should not matter so much but we could add this variant in WASM too.
However, making a program intended to run in a web browser requires a very different design than a CLI program. To see an example of a simple Rust web app using Meilisearch, see the our demo.
WARNING: meilisearch-sdk will panic if no Window is available (ex: Web extension).
🤖 Compatibility with Meilisearch
This package guarantees compatibility with version v1.x of Meilisearch, but some features may not be present. Please check the issues for more info.
⚙️ Contributing
Any new contribution is more than welcome in this project!
If you want to know more about the development workflow or want to contribute, please visit our contributing guidelines for detailed instructions!
Meilisearch provides and maintains many SDKs and Integration tools like this one. We want to provide everyone with an amazing search experience for any kind of project. If you want to contribute, make suggestions, or just know what's going on right now, visit us in the integration-guides repository.
Compatibility
- Runs on
- GPU support unknown
What shows it
- no dependency or feature matches a backend row
- Native code
- None found
- No native code found
- Python bindings
- No Python binding crate found
- License
- MIT
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
Rust wrapper for the Meilisearch API. Meilisearch is a powerful, fast, open-source, easy to use and deploy search engine. |
170,111 downloads over 30 days | 16 | 431 | 0.33.0 | GPU support unknown | No native code found | MIT |
|
A lightning-fast search engine API bringing AI-powered hybrid search to your sites and applications. |
5,660 binary downloads per release | Not applicable | 59,815 | Not measured | Not measured | Not measured | |
|
splintr Listed
Tokenizer for Rust and Python: pure Rust by default, with 18 bundled vocabularies and four backends covering BPE, SentencePiece and WordPiece. Its output matches Hugging Face tokenizers id for id on 14 model families, including GPT-2, Qwen, Whisper, T5 and BERT. Python bindings |
8,204 downloads over 30 days | 7 | 63 | 0.22.2 | GPU support unknown | Binds native code: pcre2-sys (feature pcre2) | MIT |
|
Local first semantic and hybrid BM25 grep / search tool for use by AI and humans! |
1,775 binary downloads per release | Not applicable | 1,772 | 0.8.1 | GPU support unknown | Binds native code: tree-sitter, tree-sitter-language, openssl-sys (feature openssl), ort-sys (feature mixedbread) | Apache-2.0 OR MIT |
|
Semantic search and document parsing tools for the command line |
541 binary downloads per release | Not applicable | 1,882 | 3.0.1 | GPU support unknown | Binds native code: zstd-sys (feature workspace) | MIT |
|
🔍 Tiny, full-text search engine for static websites built with Rust and Wasm |
147 binary downloads per release | Not applicable | 2,980 | Not measured | Not measured | Apache-2.0 | |
|
All-in-one platform for search, recommendations, RAG, and analytics offered via API |
9 binary downloads per release | Not applicable | 2,723 | Not measured | Not measured | MIT |
Why FeaturedIt passes every Featured gate.
What it meets
- It has 11 active dependents and 10 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days.
- Active dependents are at 100% of their peak. Featured needs at least 50%.
- Docs are present. The release commit or a manifest ties the crate to the repository.
- No vulnerability advisory stays unpatched past the grace window. At least one version is neither a prerelease nor 0.0.x.
- The last activity is on 4 Nov 2026, 5 days ago. The rules expect an update within 560 days. Dormancy rule
Exact rules: Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 0.33.0 base 140, doubled for 170111 downloads per month, doubled for 11 active users: E = 560 daysdormancy: last activity 2026-11-04, 5 days ago, E = 560: activefeatured: featured: active_users 11, new_adopters 10, former_glory 1
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources6 sources
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption11 active dependents, 10 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 11 | crates.io database dump | Yes | |
| New dependents (365 days) | 10 | crates.io database dump | Yes | |
| Peak active dependents | 11 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 1 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 5 days ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2026-11-04 | GitHub repository | Yes | |
| Latest release | 2026-04-22 | crates.io database dump | Yes | |
| First release | 2020-05-03 | crates.io database dump | Yes | |
| Latest version | 0.33.0 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 567 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 4 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | none | crates.io database dump | Yes |
Distribution51 releases, 170,111 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 51 | crates.io database dump | Yes | |
| Downloads over 30 days | 170111 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository431 stars, 116 forks, 73 contributors, 1,575 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 431 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 116 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 73 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 1575 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | MIT | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | No native code found | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 16 | crates.io database dump | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.