facet_search | Search among the values of one facet (read-only, not a write) — e.g. autocomplete of a category. Arguments: index_uid (string), facetName (string, attribute listed in filterableAttributes), facetQuery (string, text to match in facet values; omit for all), q (string, restrict to documents matching this query), filter (string or array), matchingStrategy (“last”|“all”|“frequency”). Returns { facetHits: [{ value, count }] }. |
get_document | Get one document by its primary-key value. Arguments: index_uid (string), document_id (string, the primary-key value; digits, letters, ”-” and ”_”), fields (array of strings, attributes to return, optional). |
get_documents | List documents of an index (read-only, not a write; uses POST /documents/fetch). Arguments: index_uid (string), limit (integer 1-1000, default 20), offset (integer >= 0), fields (array of strings, attributes to return), ids (array of strings, document ids), filter (string or array, attributes must be in filterableAttributes), sort (array of “attr:asc|desc”). Returns { results, offset, limit, total }. |
get_index | Get one index (uid, primaryKey, createdAt, updatedAt). Argument: index_uid (string, from list_indexes). |
get_index_stats | Get the statistics of one index: number of documents, indexing state and the distribution of fields. Argument: index_uid (string). |
get_settings | Get all settings of an index (searchable/filterable/sortable/displayed attributes, ranking rules, stop words, synonyms, typo tolerance, faceting, pagination…). Argument: index_uid (string). The embedders block is not returned. |
get_stats | Get global statistics: database size and, for each index, its number of documents and whether it is being indexed. No arguments. |
get_task | Get one task: status (“enqueued”, “processing”, “succeeded”, “failed”, “canceled”), type, details and, when failed, the error. Argument: task_id (integer >= 0, the taskUid returned by a write action). Poll until the status is final. |
get_version | Get the Meilisearch version of the instance (commitSha, commitDate, pkgVersion). No arguments. Also checks the API key. |
list_indexes | List indexes (uid, primaryKey, createdAt, updatedAt) with pagination. Returns { results, offset, limit, total }. |
list_tasks | List tasks (most recent first) with optional filters. Arguments (all optional): statuses (array of “enqueued”|“processing”|“succeeded”|“failed”|“canceled”), types (array of strings, e.g. “documentAdditionOrUpdate”, “documentDeletion”, “settingsUpdate”, “indexCreation”), indexUids (array of strings), uids (array of integers, task uids), limit (integer 1-1000, default 20), from (integer, task uid to start from). Returns { results, total, limit, from, next }. |
multi_search | Run several searches (read-only, not a write) in one call, possibly on different indexes. Argument: queries (array of 1-20 objects, each { indexUid: string, q?, filter?, sort?, limit?, offset?, page?, hitsPerPage?, attributesToRetrieve?, attributesToSearchOn?, facets?, matchingStrategy?, rankingScoreThreshold?, hybrid? } with the same types as the search action). Returns { results: [one search result per query, with indexUid] }. |
search | Run a search (read-only, not a write) in one index. Arguments: index_uid (string), q (string query), filter (string or array), sort (array of “attr:asc|desc”), limit (integer), offset (integer), page/hitsPerPage (integers), attributesToRetrieve (array of strings), attributesToSearchOn (array of strings), facets (array of strings), matchingStrategy (“last”|“all”|“frequency”), rankingScoreThreshold (number 0-1), hybrid ({ embedder, semanticRatio }). Returns { hits, query, processingTimeMs, estimatedTotalHits | totalHits, facetDistribution? }. |