Search for facet values within a given facet.
Use this to build autocomplete or refinement UIs for facet filters.
An API key is a token that you provide when making API calls. Read more about how to secure your project.
Include the API key to the Authorization header, for instance:
-H 'Authorization: Bearer 6436fc5237b0d6e0d64253fbaac21d135012ecf1'If you use a SDK, ensure you instantiate the client with the API key, for instance with JS SDK:
const client = new MeiliSearch({
host: 'MEILISEARCH_URL',
apiKey: '6436fc5237b0d6e0d64253fbaac21d135012ecf1'
});Unique identifier of the index.
Request body for searching facet values
Name of the facet to search
Query string to search for facet values
Query string to filter documents before facet search
Custom query vector for semantic search
Multimodal content for AI-powered search
Hybrid search configuration that combines keyword search with semantic
(vector) search. Set semanticRatio to balance between keyword
matching (0.0) and semantic similarity (1.0). Requires an embedder to
be configured in the index settings.
Filter expression to apply before facet search
Strategy used to match query terms
last, all, frequency Restrict search to specified attributes
Minimum ranking score threshold (0.0 to 1.0) that documents must achieve to be considered when computing facet counts. Documents with scores below this threshold are excluded from facet value counts.
Languages to use for query processing
af, ak, am, ar, az, be, bn, bg, ca, cs, da, de, el, en, eo, et, fi, fr, gu, he, hi, hr, hu, hy, id, it, jv, ja, kn, ka, km, ko, la, lv, lt, ml, mr, mk, my, ne, nl, nb, or, pa, fa, pl, pt, ro, ru, si, sk, sl, sn, es, sr, sv, ta, te, tl, th, tk, tr, uk, ur, uz, vi, yi, zh, zu, afr, aka, amh, ara, aze, bel, ben, bul, cat, ces, dan, deu, ell, eng, epo, est, fin, fra, guj, heb, hin, hrv, hun, hye, ind, ita, jav, jpn, kan, kat, khm, kor, lat, lav, lit, mal, mar, mkd, mya, nep, nld, nob, ori, pan, pes, pol, por, ron, rus, sin, slk, slv, sna, spa, srp, swe, tam, tel, tgl, tha, tuk, tur, ukr, urd, uzb, vie, yid, zho, zul, cmn Return exhaustive facet count instead of an estimate
The documents are returned.
Search response containing matching documents and metadata.
Number of results per page.
x >= 0Current page index (1-based).
x >= 0Exhaustive total number of result pages.
x >= 0Exhaustive total number of matching documents.
x >= 0Matching documents.
Each hit contains document fields and, when requested, _formatted, _matchesPosition, _rankingScore, _rankingScoreDetails, _geoDistance.
Query string that produced this response.
Time taken to process the query, in milliseconds.
x >= 0Query embedding used for the search.
Present when vector or hybrid search was used.
Count of matching documents per facet value for each requested facet.
Present when facets was set.
Minimum and maximum numeric values per facet.
Present for numeric facets when facets was set.
UUID v7 identifying this search request.
Query and index metadata.
Present when requested via the Meili-Include-Metadata header.
Timing breakdown per processing step.
Present when showPerformanceDetails was true.
Errors from remote shards. Federated search only.
Exhaustive number of semantic search matches.
AI-powered (hybrid/semantic) searches only.
x >= 0