Meilisearch Core API

Search engine API

www.meilisearch.com/docs/reference/api ↗
Version
1.7.0
OpenAPI
3.0.3
Endpoints
73
Schemas
71
85
Quality
Updated
3 days ago
Search search indexing full-text
Use this API in your AI agent

Query structured spec data via REST or MCP. Get exactly what your agent needs.

Get API Key

Server URLs

{protocol}://{domain}:{port}

Endpoints

Documents 9 endpoints

DELETE /indexes/{indexUid}/documents

Delete all documents in the specified index.

operationId: Documents_deleteAll

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

202

Accepted

401

Unauthorized

404

Not Found

DELETE /indexes/{indexUid}/documents
GET /indexes/{indexUid}/documents

Get documents by batch.

operationId: Documents_getByBatch

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

limit query optional number

Maximum number of results to return.

offset query optional number

Number of results to skip.

fields query optional string

Comma-separated list of fields to display for an API resource. By default it contains all fields of an API resource.

filter query optional

Attribute(s) to filter on.

Can be made of 3 syntaxes

  • Nested Array: ["something > 1", "genres=comedy", ["genres=horror", "title=batman"]]
  • String: something > 1 AND genres=comedy AND (genres=horror OR title=batman)
  • Mixed: ["something > 1 AND genres=comedy", "genres=horror OR title=batman"]

info
_geoRadius({lat}, {lng}, {distance_in_meters}) and _geoBoundingBox([{lat, lng}], [{lat}, {lng}]) built-in filter rules can be used to filter documents within geo shapes.

warn
Attribute(s) used in filter should be declared as filterable attributes. See Filtering and Faceted Search.

Responses

200

Ok

401

Unauthorized

404

Not Found

GET /indexes/{indexUid}/documents
POST /indexes/{indexUid}/documents

Add a list of documents or replace them if they already exist.

If you send an already existing document (same id) the whole existing document will be overwritten by the new document. Fields previously in the document not present in the new document are removed.

For a partial update of the document see Add or update documents route.

info
If the provided index does not exist, it will be created.

info
Use the reserved _geo object to add geo coordinates to a document. _geo is an object made of lat and lng field.

Use the reserved _vectors arrays of floats to add embeddings to a document. _vectors is an array of floats or multiple arrays of floats in an outer array.

operationId: Documents_addOrUpdateBatch

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

primaryKey query optional string

The primary key of the documents. primaryKey is optional.
If you want to set the primary key of your index through this route, it only has to be done the first time you add documents to the index. After which it will be ignored if given.

csvDelimiter query optional string

Customize the csv delimiter when importing CSV documents. By default its a comma “,”

Request Body

required
application/json
schema DocumentsAddOrUpdateBatchRequest
array

Responses

202

Accepted

401

Unauthorized

413

Payload Too Large

POST /indexes/{indexUid}/documents
PUT /indexes/{indexUid}/documents

Add a list of documents or update them if they already exist.

If you send an already existing document (same id) the old document will be only partially updated according to the fields of the new document. Thus, any fields not present in the new document are kept and remained unchanged.

To completely overwrite a document, see Add or replace documents route.

info
If the provided index does not exist, it will be created.

info
Use the reserved _geo object to add geo coordinates to a document. _geo is an object made of lat and lng field.

Use the reserved _vectors arrays of floats to add embeddings to a document. _vectors is an array of floats or multiple arrays of floats in an outer array.

operationId: Documents_addOrUpdateBatch

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

primaryKey query optional string

The primary key of the documents. primaryKey is optional.
If you want to set the primary key of your index through this route, it only has to be done the first time you add documents to the index. After which it will be ignored if given.

csvDelimiter query optional string

Customize the csv delimiter when importing CSV documents. By default its a comma “,”

Request Body

required
application/json
schema DocumentsAddOrUpdateBatchRequest1
array of object

Responses

202

Accepted

401

Unauthorized

413

Payload Too Large

PUT /indexes/{indexUid}/documents
POST /indexes/{indexUid}/documents/delete

Delete a selection of documents based on a filter.

operationId: Documents_deleteSelectionBasedFilter

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Request Body

required
application/json
schema DocumentsDeleteSelectionBasedFilterRequest
Property Type Required
filter object optional

Responses

202

Accepted

401

Unauthorized

404

Not Found

POST /indexes/{indexUid}/documents/delete
POST /indexes/{indexUid}/documents/delete-batch

Delete a selection of documents based on array of document id’s.

operationId: Documents_deleteSelectionByFilter

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Request Body

required
application/json
schema DocumentsDeleteSelectionByFilterRequest
array of ["string", "number"]

Responses

202

Accepted

401

Unauthorized

404

Not Found

POST /indexes/{indexUid}/documents/delete-batch
POST /indexes/{indexUid}/documents/fetch

Get documents by batch.

operationId: Documents_getByBatch

Request Body

required
application/json
schema DocumentsGetByBatchRequest
Property Type Required
limit number optional
fields array optional
filter object optional
offset number optional

Responses

200

Ok

401

Unauthorized

404

Not Found

POST /indexes/{indexUid}/documents/fetch
DELETE /indexes/{indexUid}/documents/{documentId}

Delete one document based on its unique id.

operationId: Documents_deleteDocumentById

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

documentId path optional any

The document identifier

Responses

202

Accepted

401

Unauthorized

404

Not Found

DELETE /indexes/{indexUid}/documents/{documentId}
GET /indexes/{indexUid}/documents/{documentId}

Get one document using its unique id.

operationId: Documents_getById

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

documentId path optional any

The document identifier

fields query optional string

Comma-separated list of fields to display for an API resource. By default it contains all fields of an API resource.

Responses

200

Ok

401

Unauthorized

404

Not Found

GET /indexes/{indexUid}/documents/{documentId}

Dumps 1 endpoints

POST /dumps

Triggers a dump creation process. Once the process is complete, a dump is created in the dump directory. If the dump directory does not exist yet, it will be created.

operationId: Dumps_triggerDumpCreation

Responses

202

Accepted

401

Unauthorized

POST /dumps

Experimental 2 endpoints

GET /experimental-features

Get the status of all experimental features that can be toggled at runtime

operationId: Experimental_runtimeFeaturesGet

Responses

200

Ok

401

Unauthorized

GET /experimental-features
PATCH /experimental-features

Set the status of experimental features that can be toggled at runtime

operationId: Experimental_setRuntimeExperimentalFeatures

Request Body

required
application/json
schema ExperimentalSetRuntimeExperimentalFeaturesRequest
Property Type Required
metrics boolean optional
vectorStore boolean optional
exportPuffinReports boolean optional

Responses

200

Ok

401

Unauthorized

PATCH /experimental-features

Health 1 endpoints

GET /health

Get health of the Meilisearch instance.

operationId: Health_checkMeilisearchInstance

Responses

200

Ok

GET /health

Indexes 6 endpoints

GET /indexes

List all indexes.

operationId: Indexes_list

Parameters

Name In Required Type Description
limit query optional number

Maximum number of results to return.

offset query optional number

Number of results to skip.

Responses

200

Ok

401

Unauthorized

GET /indexes
POST /indexes

Create an index.

operationId: Indexes_createIndex

Request Body

required
application/json
schema IndexesCreateIndexRequest
Property Type Required
uid string required
primaryKey string optional

Responses

202

Accepted

400

Bad Request

401

Unauthorized

POST /indexes
DELETE /indexes/{indexUid}

Delete an index.

operationId: Indexes_deleteIndex

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

202

Accepted

401

Unauthorized

404

Not Found

DELETE /indexes/{indexUid}
GET /indexes/{indexUid}

Get information about an index.

operationId: Indexes_getIndex

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

200

OK

401

Unauthorized

404

Not Found

GET /indexes/{indexUid}
PATCH /indexes/{indexUid}

Update an index. Specify a primaryKey if it doesn’t already exists yet.

operationId: Indexes_updateIndexPrimaryKey

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Request Body

required
application/json
schema IndexesUpdateIndexPrimaryKeyRequest
Property Type Required
primaryKey string required

Responses

202

Accepted

400

Bad Request

401

Unauthorized

404

Not Found

PATCH /indexes/{indexUid}
POST /swap-indexes

Deploy a new version of an index without any downtime for clients by swapping documents, settings, and task history between two indexes. Specifying several swap operations that will be processed in an atomic way is possible.

operationId: Indexes_swapIndexes

Parameters

Name In Required Type Description
taskUid path optional integer

The task identifier

Request Body

application/json
schema swapIndexes
array of object
Property Type Required
indexes array required

Responses

202

Accepted

401

Unauthorized

POST /swap-indexes

Keys 5 endpoints

GET /keys

Get API Keys

operationId: Keys_get

Parameters

Name In Required Type Description
limit query optional number

Maximum number of results to return.

offset query optional number

Number of results to skip.

Responses

200

Ok

401

Unauthorized

GET /keys
POST /keys
operationId: Keys_createApiKey

Request Body

application/json
schema key
Property Type Required
key string optional
uid string optional
name ["string", "null"] optional
actions array required
indexes array required
createdAt string optional
expiresAt ["string", "null"] required
updatedAt ["string", "null"] optional
description ["string", "null"] optional

Responses

200

OK

POST /keys
DELETE /keys/{uid_or_key}
operationId: Keys_deleteKeyByUidOrKey

Responses

204

No Content

DELETE /keys/{uid_or_key}
GET /keys/{uid_or_key}

Get an API Key

operationId: Keys_getApiKey

Parameters

Name In Required Type Description
uidOrKey path required string

The uid or the key field value of the API Key.

Responses

200

OK

GET /keys/{uid_or_key}
PATCH /keys/{uid_or_key}

Update an API Key

operationId: Keys_updateApiKey

Request Body

application/json
schema KeysUpdateApiKeyRequest
Property Type Required
name ["string", "null"] optional
description ["string", "null"] optional

Responses

200

OK

PATCH /keys/{uid_or_key}

Settings 22 endpoints

DELETE /indexes/{indexUid}/settings

Reset the settings of an index.

All settings will be reset to their default value.

operationId: Settings_resetSettings

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

202

Accepted

401

Unauthorized

404

Not Found

DELETE /indexes/{indexUid}/settings
GET /indexes/{indexUid}/settings

Get the settings of an index.

Learn more about the settings.

operationId: Settings_getSettings

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

200

Ok

401

Unauthorized

404

Not Found

GET /indexes/{indexUid}/settings
PATCH /indexes/{indexUid}/settings

Update the settings of an index.

Updates in the settings route are partial. This means that any parameters not provided in the body will be left unchanged.
Learn more about the settings in this guide.

info
If the provided index does not exist, it will be created.

operationId: Settings_updateSettings

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Request Body

required
application/json
schema SettingsUpdateSettingsRequest
Property Type Required
faceting object optional
maxValuesPerFacet integer optional
sortFacetValuesBy object optional
synonyms object optional
wow array optional
logan array optional
wolverine array optional
stopWords array optional
pagination object optional
maxTotalHits integer optional
rankingRules array optional
typoTolerance object optional
enabled boolean optional
disableOnWords array optional
disableOnAttributes array optional
minWordSizeForTypos object optional
oneTypo integer optional
twoTypos integer optional
distinctAttribute string optional
sortableAttributes array optional
displayedAttributes array optional
filterableAttributes array optional
searchableAttributes array optional

Responses

202

Accepted

401

Unauthorized

404

Not Found

PATCH /indexes/{indexUid}/settings
DELETE /indexes/{indexUid}/settings/displayed-attributes

Reset the displayed attributes of an index to its default value (['*']).

operationId: Settings_resetDisplayedAttributes

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

202

Accepted

401

Unauthorized

404

Not Found

DELETE /indexes/{indexUid}/settings/displayed-attributes
GET /indexes/{indexUid}/settings/displayed-attributes

Get the displayed attributes of an index.

operationId: Settings_getDisplayedAttributes

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

200

Ok

401

Unauthorized

404

Not Found

GET /indexes/{indexUid}/settings/displayed-attributes
PUT /indexes/{indexUid}/settings/displayed-attributes

Update the displayed attributes of an index.

info
If the provided index does not exist, it will be created.

operationId: Settings_updateDisplayedAttributes

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Request Body

required
application/json
schema displayedAttributes
array of string

Responses

202

Accepted

401

Unauthorized

404

Not Found

PUT /indexes/{indexUid}/settings/displayed-attributes
DELETE /indexes/{indexUid}/settings/distinct-attribute

Reset the distinct attribute field of an index to its default value (null).

operationId: Settings_resetDistinctAttribute

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

202

Accepted

401

Unauthorized

404

Not Found

DELETE /indexes/{indexUid}/settings/distinct-attribute
GET /indexes/{indexUid}/settings/distinct-attribute

Get the distinct attribute field of an index.

operationId: Settings_getDistinctAttribute

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

200

Ok

401

Unauthorized

404

Not Found

GET /indexes/{indexUid}/settings/distinct-attribute
PUT /indexes/{indexUid}/settings/distinct-attribute

Update the distinct attribute field of an index.

info
If the provided index does not exist, it will be created.

operationId: Settings_updateDistinctAttribute

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Request Body

required
application/json
schema distinctAttribute
string

Responses

202

Accepted

401

Unauthorized

404

Not Found

PUT /indexes/{indexUid}/settings/distinct-attribute
DELETE /indexes/{indexUid}/settings/faceting

Reset the faceting settings of an index to its default configuration.

operationId: Settings_resetFacetingSettings

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

202

Accepted

401

Unauthorized

404

Not Found

DELETE /indexes/{indexUid}/settings/faceting
GET /indexes/{indexUid}/settings/faceting

Get the faceting configuration of an index.

operationId: Settings_getFacetingConfiguration

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

200

Ok

401

Unauthorized

404

Not Found

GET /indexes/{indexUid}/settings/faceting
PATCH /indexes/{indexUid}/settings/faceting

Update the faceting settings of an index.

info
If the provided index does not exist, it will be created.

operationId: Settings_updateFacetingSettings

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Request Body

required
application/json
schema faceting
Property Type Required
maxValuesPerFacet integer optional
sortFacetValuesBy object optional

Responses

202

Accepted

401

Unauthorized

404

Not Found

PATCH /indexes/{indexUid}/settings/faceting
DELETE /indexes/{indexUid}/settings/filterable-attributes

Reset the filterable attributes of an index to its default value ([]).

operationId: Settings_resetFilterableAttributes

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

202

Accepted

401

Unauthorized

404

Not Found

DELETE /indexes/{indexUid}/settings/filterable-attributes
GET /indexes/{indexUid}/settings/filterable-attributes

Get the filterable attributes of an index.

operationId: Settings_getFilterableAttributes

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

200

Ok

401

Unauthorized

404

Not Found

GET /indexes/{indexUid}/settings/filterable-attributes
PUT /indexes/{indexUid}/settings/filterable-attributes

Update the filterable attributes of an index.

info
In order to enable filtering capabilities on geographic data, the _geo field must be added as a filterableAttribute.

info
If the provided index does not exist, it will be created.

operationId: Settings_updateFilterableAttributes

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Request Body

application/json
schema filterableAttributes
array of string

Responses

202

Accepted

401

Unauthorized

404

Not Found

PUT /indexes/{indexUid}/settings/filterable-attributes
DELETE /indexes/{indexUid}/settings/pagination

Reset the pagination settings of an index to its default configuration.

operationId: Settings_resetPaginationSettings

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

202

Accepted

401

Unauthorized

404

Not Found

DELETE /indexes/{indexUid}/settings/pagination
GET /indexes/{indexUid}/settings/pagination

Get the pagination configuration of an index.

operationId: Settings_getPaginationConfiguration

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

200

Ok

401

Unauthorized

404

Not Found

GET /indexes/{indexUid}/settings/pagination
PATCH /indexes/{indexUid}/settings/pagination

Update the pagination configuration of an index.

info
If the provided index does not exist, it will be created.

operationId: Settings_updatePaginationSettings

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Request Body

required
application/json
schema pagination
Property Type Required
maxTotalHits integer optional

Responses

202

Accepted

401

Unauthorized

404

Not Found

PATCH /indexes/{indexUid}/settings/pagination
DELETE /indexes/{indexUid}/settings/ranking-rules

Reset the ranking rules of an index to its default value.

Default Value:

["words", "typo", "proximity", "attribute", "sort", "exactness"]

To remove all ranking rules, which is not recommended in any case, you would send an empty array to the add or replace ranking rules route.

operationId: Settings_resetRankingRules

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

202

Accepted

401

Unauthorized

404

Not Found

DELETE /indexes/{indexUid}/settings/ranking-rules
GET /indexes/{indexUid}/settings/ranking-rules

Get the ranking rules of an index.

operationId: Settings_getRankingRules

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

200

Ok

401

Unauthorized

404

Not Found

GET /indexes/{indexUid}/settings/ranking-rules
PUT /indexes/{indexUid}/settings/ranking-rules

Update the ranking rules of an index.

To add your own ranking rule, you have to communicate either asc for ascending order or desc for descending order followed by the field name in brackets.

  • To apply an ascending custom ranking rule: attribute_name:asc
  • To apply a descending custom ranking rule: attribute_name:desc

info
If the provided index does not exist, it will be created.

operationId: Settings_updateRankingRules

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Request Body

required
application/json
schema rankingRules
array of string

Responses

202

Accepted

401

Unauthorized

404

Not Found

PUT /indexes/{indexUid}/settings/ranking-rules
DELETE /indexes/{indexUid}/settings/searchable-attributes

Reset the searchable attributes of an index to its default value (['*']).

operationId: Settings_resetSearchableAttributes

Parameters

Name In Required Type Description
indexUid path optional string

Index Unique Identifier

Responses

202

Accepted

401

Unauthorized

404

Not Found

DELETE /indexes/{indexUid}/settings/searchable-attributes

Schemas

array DocumentsAddOrUpdateBatchRequest
{
  "type": "array",
  "items": {
    "description": "WARNING: Missing items property in array schema. Missing items property has been filled with this AnyType schema."
  }
}
array DocumentsAddOrUpdateBatchRequest1
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/document"
  }
}
object DocumentsDeleteSelectionBasedFilterRequest
{
  "type": "object",
  "properties": {
    "filter": {
      "$ref": "#/components/schemas/filter"
    }
  }
}
array DocumentsDeleteSelectionByFilterRequest
{
  "type": "array",
  "items": {
    "type": [
      "string",
      "number"
    ]
  },
  "description": "An array of document ids to delete"
}
object DocumentsGetByBatch200Response
{
  "type": "object",
  "required": [
    "results",
    "limit",
    "offset",
    "total"
  ],
  "properties": {
    "limit": {
      "$ref": "#/components/schemas/limit"
    },
    "total": {
      "$ref": "#/components/schemas/total"
    },
    "offset": {
      "$ref": "#/components/schemas/offset"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/document"
      }
    }
  }
}
object DocumentsGetByBatchRequest
{
  "type": "object",
  "properties": {
    "limit": {
      "type": "number",
      "default": 20,
      "description": "Maximum number of documents returned."
    },
    "fields": {
      "type": "array",
      "items": {
        "type": "string",
        "default": "[\"*\"]",
        "example": "[\"title\", \"overview\"]"
      },
      "description": "Array of attributes whose fields will be present in the returned documents. By default all attributes will be returned."
    },
    "filter": {
      "$ref": "#/components/schemas/filter"
    },
    "offset": {
      "type": "number",
      "default": 0,
      "description": "Number of documents to skip."
    }
  }
}
object DocumentsGetByBatchResponse
{
  "type": "object",
  "required": [
    "results",
    "limit",
    "offset",
    "total"
  ],
  "properties": {
    "limit": {
      "$ref": "#/components/schemas/limit"
    },
    "total": {
      "$ref": "#/components/schemas/total"
    },
    "offset": {
      "$ref": "#/components/schemas/offset"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/document"
      }
    }
  }
}
object ExperimentalRuntimeFeaturesGetResponse
{
  "type": "object",
  "required": [
    "vectorStore",
    "metrics",
    "exportPuffinReports"
  ],
  "properties": {
    "metrics": {
      "type": "boolean"
    },
    "vectorStore": {
      "type": "boolean"
    },
    "exportPuffinReports": {
      "type": "boolean"
    }
  }
}
object ExperimentalSetRuntimeExperimentalFeaturesRequest
{
  "type": "object",
  "properties": {
    "metrics": {
      "type": "boolean"
    },
    "vectorStore": {
      "type": "boolean"
    },
    "exportPuffinReports": {
      "type": "boolean"
    }
  }
}
object ExperimentalSetRuntimeExperimentalFeaturesResponse
{
  "type": "object",
  "required": [
    "vectorStore",
    "metrics",
    "exportPuffinReports"
  ],
  "properties": {
    "metrics": {
      "type": "boolean"
    },
    "vectorStore": {
      "type": "boolean"
    },
    "exportPuffinReports": {
      "type": "boolean"
    }
  }
}
object HealthCheckMeilisearchInstanceResponse
{
  "type": "object",
  "required": [
    "status"
  ],
  "properties": {
    "status": {
      "enum": [
        "available"
      ],
      "type": "string"
    }
  }
}
object IndexesCreateIndexRequest
{
  "type": "object",
  "required": [
    "uid"
  ],
  "properties": {
    "uid": {
      "type": "string"
    },
    "primaryKey": {
      "type": "string"
    }
  }
}
object IndexesListResponse
{
  "type": "object",
  "required": [
    "results",
    "limit",
    "offset",
    "total"
  ],
  "properties": {
    "limit": {
      "$ref": "#/components/schemas/limit"
    },
    "total": {
      "$ref": "#/components/schemas/total"
    },
    "offset": {
      "$ref": "#/components/schemas/offset"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/index"
      }
    }
  }
}
object IndexesUpdateIndexPrimaryKeyRequest
{
  "type": "object",
  "required": [
    "primaryKey"
  ],
  "properties": {
    "primaryKey": {
      "type": "string"
    }
  }
}
object KeysGetResponse
{
  "type": "object",
  "required": [
    "results",
    "limit",
    "offset",
    "total"
  ],
  "properties": {
    "limit": {
      "$ref": "#/components/schemas/limit"
    },
    "total": {
      "$ref": "#/components/schemas/total"
    },
    "offset": {
      "$ref": "#/components/schemas/offset"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/key"
      }
    }
  }
}
object KeysUpdateApiKeyRequest
{
  "type": "object",
  "properties": {
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    }
  }
}
object MultiSearchRequest
{
  "type": "object",
  "required": [
    "queries"
  ],
  "properties": {
    "queries": {
      "type": "array",
      "items": {
        "type": "object",
        "examples": {
          "Example": {
            "value": {
              "$ref": "#components/schemas/searchQuery/examples/Example/value",
              "indexUid": "movies"
            }
          }
        },
        "required": [
          "indexUid"
        ],
        "properties": {
          "indexUid": {
            "type": "string",
            "description": "The unique identifier of the index to be searched."
          }
        }
      },
      "description": "Array of the search queries to be performed."
    }
  }
}
object MultiSearchResponse
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "indexUid": {
            "type": "string",
            "description": "The unique identifier of the searched index."
          }
        }
      }
    }
  }
}
object SettingsGetSettingsResponse
{
  "type": "object",
  "required": [
    "rankingRules",
    "distinctAttribute",
    "searchableAttributes",
    "displayedAttributes",
    "stopWords",
    "synonyms",
    "filterableAttributes",
    "sortableAttributes",
    "typoTolerance",
    "pagination",
    "faceting"
  ],
  "properties": {
    "faceting": {
      "$ref": "#/components/schemas/faceting"
    },
    "synonyms": {
      "$ref": "#/components/schemas/synonyms"
    },
    "stopWords": {
      "$ref": "#/components/schemas/stopWords"
    },
    "pagination": {
      "$ref": "#/components/schemas/pagination"
    },
    "rankingRules": {
      "$ref": "#/components/schemas/rankingRules"
    },
    "typoTolerance": {
      "$ref": "#/components/schemas/typoTolerance"
    },
    "distinctAttribute": {
      "$ref": "#/components/schemas/distinctAttribute"
    },
    "sortableAttributes": {
      "$ref": "#/components/schemas/sortableAttributes"
    },
    "displayedAttributes": {
      "$ref": "#/components/schemas/displayedAttributes"
    },
    "filterableAttributes": {
      "$ref": "#/components/schemas/filterableAttributes"
    },
    "searchableAttributes": {
      "$ref": "#/components/schemas/searchableAttributes"
    }
  }
}
object SettingsUpdateSettingsRequest
{
  "type": "object",
  "properties": {
    "faceting": {
      "$ref": "#/components/schemas/faceting"
    },
    "synonyms": {
      "$ref": "#/components/schemas/synonyms"
    },
    "stopWords": {
      "$ref": "#/components/schemas/stopWords"
    },
    "pagination": {
      "$ref": "#/components/schemas/pagination"
    },
    "rankingRules": {
      "$ref": "#/components/schemas/rankingRules"
    },
    "typoTolerance": {
      "$ref": "#/components/schemas/typoTolerance"
    },
    "distinctAttribute": {
      "$ref": "#/components/schemas/distinctAttribute"
    },
    "sortableAttributes": {
      "$ref": "#/components/schemas/sortableAttributes"
    },
    "displayedAttributes": {
      "$ref": "#/components/schemas/displayedAttributes"
    },
    "filterableAttributes": {
      "$ref": "#/components/schemas/filterableAttributes"
    },
    "searchableAttributes": {
      "$ref": "#/components/schemas/searchableAttributes"
    }
  }
}
object StatsGetAllIndexesStatsResponse
{
  "type": "object",
  "required": [
    "databaseSize",
    "lastUpdate",
    "indexes"
  ],
  "properties": {
    "indexes": {
      "type": "object",
      "properties": {
        "indexUid": {
          "$ref": "#/components/schemas/stats"
        }
      }
    },
    "lastUpdate": {
      "$ref": "#/components/schemas/timestamp"
    },
    "databaseSize": {
      "type": "number"
    }
  }
}
object TasksGetAllResponse
{
  "type": "object",
  "required": [
    "results",
    "total",
    "limit",
    "from",
    "next"
  ],
  "properties": {
    "from": {
      "$ref": "#/components/schemas/from"
    },
    "next": {
      "$ref": "#/components/schemas/next"
    },
    "limit": {
      "$ref": "#/components/schemas/limit"
    },
    "total": {
      "$ref": "#/components/schemas/total"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/task"
      }
    }
  }
}
object VersionGetMeilisearchVersionResponse
{
  "type": "object",
  "required": [
    "commitSha",
    "commitDate",
    "pkgVersion"
  ],
  "properties": {
    "commitSha": {
      "type": "string",
      "example": "b46889b5f0f2f8b91438a08a358ba8f05fc09fc1"
    },
    "commitDate": {
      "type": "string",
      "example": "2021-07-08"
    },
    "pkgVersion": {
      "type": "string",
      "example": "0.1.1"
    }
  }
}
object customRankingRuleDetails
{
  "type": "object",
  "required": [
    "order",
    "value"
  ],
  "properties": {
    "order": {
      "$ref": "#/components/schemas/order"
    },
    "value": {
      "type": [
        "string",
        "number",
        "point"
      ],
      "description": "The value that was used for sorting this document"
    },
    "distance": {
      "type": "number",
      "description": "The distance between the target point and the geoPoint in the document"
    },
    "similarity": {
      "type": "number",
      "description": "the similarity score between the target vector and the value vector.\n\n1.0 means a perfect similarity, 0.0 a perfect dissimilarity.\n"
    }
  },
  "description": "Custom rule in the form of either `attribute:direction`, `vectorSort(vector)` or `_geoPoint(lat, lng):direction`."
}
array dictionary
{
  "type": "array",
  "items": {
    "type": "string"
  },
  "example": [
    "J.K",
    "Dr.",
    "G/Box"
  ],
  "description": "List of words on which the segmentation will be overridden."
}
array displayedAttributes
{
  "type": "array",
  "items": {
    "type": "string"
  },
  "example": [
    "title",
    "description",
    "genre",
    "release_date"
  ],
  "description": "Fields displayed in the returned documents."
}
string distinctAttribute
{
  "type": "string",
  "nullable": true,
  "description": "Search returns documents with distinct (different) values of the given field."
}
object document
{
  "type": "object",
  "example": {
    "id": 25684,
    "title": "American Ninja 5",
    "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg",
    "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.",
    "release_date": 725846400
  },
  "description": "A document made of attribute. The maximum number of attribute for a document is 65,535.",
  "additionalProperties": true
}
object documentId
{
  "oneOf": [
    {
      "type": "number"
    },
    {
      "type": "string"
    }
  ],
  "example": 468219
}
object error
{
  "type": "object",
  "title": "error",
  "required": [
    "message",
    "code",
    "type",
    "link"
  ],
  "properties": {
    "code": {
      "type": "string"
    },
    "link": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "description": ""
}
object facetHit
{
  "type": "object",
  "example": {
    "count": 25,
    "value": "Romance"
  },
  "properties": {
    "count": {
      "type": "integer",
      "description": "The number of document containing the matched facet value."
    },
    "value": {
      "type": "string",
      "description": "The facet value being matched.",
      "additionalProperties": true
    }
  },
  "x-examples": [
    {
      "count": 25,
      "value": "Romance"
    }
  ],
  "description": "FacetHit object represents a matched facet value for a facet search.",
  "additionalProperties": true
}
object facetSearchQuery
{
  "type": "object",
  "examples": {
    "Example": {
      "value": {
        "facetName": "genres",
        "facetQuery": "Romance"
      }
    }
  },
  "properties": {
    "q": {
      "type": "string",
      "default": "\"\"",
      "example": "\"Back to the future\"",
      "description": "Additional search parameter. If additional search parameters are set, the method will return facet values that both: - Match the face query - Are contained in the records matching the additional search parameters"
    },
    "filter": {
      "$ref": "#/components/schemas/filter"
    },
    "facetName": {
      "type": "string",
      "example": "\"genres\"",
      "description": "Query string."
    },
    "facetQuery": {
      "type": "string",
      "default": "\"\"",
      "example": "\"Horror\"",
      "description": null
    },
    "matchingStrategy": {
      "type": "string",
      "default": "last",
      "description": "Additional search parameter. If additional search parameters are set, the method will return facet values that both: - Match the face query - Are contained in the records matching the additional search parameters"
    }
  }
}
object facetSearchResponse
{
  "type": "object",
  "title": "",
  "required": [
    "facetHits",
    "facetQuery",
    "processingTimeMs"
  ],
  "properties": {
    "facetHits": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/facetHit"
      },
      "description": "Array of facet hits"
    },
    "facetQuery": {
      "type": "string",
      "example": "ninja",
      "description": "Facet query originating the response."
    },
    "processingTimeMs": {
      "type": "integer",
      "description": "Processing time of the facet search query."
    }
  }
}
object faceting
{
  "type": "object",
  "properties": {
    "maxValuesPerFacet": {
      "type": "integer",
      "default": 100,
      "nullable": false,
      "description": "Define maximum number of value returned for a facet for a **search query**. It means that with the default value of `100`, it is not possible to have `101` different colors if the `color`` field is defined as a facet at search time."
    },
    "sortFacetValuesBy": {
      "type": "object",
      "example": {
        "*": "alpha",
        "genres": "count"
      },
      "description": "Defines how facet values are sorted. By default, all facets (`*`) are sorted by name, alphanumerically in ascending order (`alpha`). `count` sorts facet values by the number of documents containing a facet value in descending order."
    }
  },
  "description": "Customize faceting settings"
}
object filter
{
  "oneOf": [
    {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[^:]+:[^:]+$"
      }
    },
    {
      "type": "string",
      "pattern": "^[^:]+:[^:]+$",
      "properties": {}
    },
    {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "array",
            "items": {}
          },
          {
            "type": "string"
          }
        ]
      }
    }
  ],
  "title": "filter",
  "example": [
    "director:Mati Diop",
    [
      "genres:Comedy",
      "genres:Romance"
    ]
  ],
  "description": "Attribute(s) to filter on.\n\nCan be made of 3 syntaxes\n\n- Nested Array: `[\"something > 1\", \"genres=comedy\", [\"genres=horror\", \"title=batman\"]]`\n- String: `\"something > 1 AND genres=comedy AND (genres=horror OR title=batman)\"`\n- Mixed: `[\"something > 1 AND genres=comedy\", \"genres=horror OR title=batman\"]`\n\n> info\n> _geoRadius({lat}, {lng}, {distance_in_meters}) and _geoBoundingBox([{lat, lng}], [{lat}, {lng}]) built-in filter rules can be used to filter documents within geo shapes.\n\n> warn\n> Attribute(s) used in `filter` should be declared as filterable attributes. See [Filtering and Faceted Search](https://docs.meilisearch.com/reference/features/filtering_and_faceted_search.html).\n"
}
array filterableAttributes
{
  "type": "array",
  "items": {
    "type": "string"
  },
  "title": "filterableAttributes",
  "example": [
    "genres",
    "director"
  ],
  "description": "Attributes to use for faceting and filtering. See [Filtering and Faceted Search](https://docs.meilisearch.com/reference/features/filtering_and_faceted_search.html).\n"
}
integer from
{
  "type": "integer",
  "example": 999,
  "description": "The first task uid returned."
}
object hit
{
  "type": "object",
  "example": {
    "id": 25684,
    "title": "American Ninja 5",
    "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg",
    "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.",
    "_formatted": {
      "id": 25684,
      "title": "American Ninja 5",
      "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg",
      "overview": "When a scientists daughter is kidnapped, American <em>Ninja</em>, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the <em>ninja</em>.",
      "release_date": 725846400
    },
    "release_date": 725846400,
    "_matchesPosition": {
      "overview": [
        {
          "start": 49,
          "length": 5
        },
        {
          "start": 155,
          "length": 5
        }
      ]
    }
  },
  "properties": {
    "attribute": {
      "type": [
        "string",
        "number"
      ],
      "description": "Retrieve attributes of a search result. `attributesToRetrieve` controls these fields."
    },
    "_formatted": {
      "type": "object",
      "description": "Only present if `attributesToHighlight`/`attributesToCrop` is not empty. Return highlighted and cropped fields.",
      "additionalProperties": true
    },
    "_geoDistance": {
      "type": "number",
      "description": "Using _geoPoint({lat}, {lng}) built-in sort rule at search leads the engine to return a _geoDistance within the search results. This field represents the distance in meters of the document from the specified _geoPoint."
    },
    "_rankingScore": {
      "type": "number",
      "description": "Only present if showRankingScore = `true`. The ranking score of that document."
    },
    "_matchesPosition": {
      "type": "object",
      "properties": {
        "": {
          "$ref": "#/components/schemas/matchesPosition"
        }
      },
      "description": "Only present if showMatchesPosition = `true`. Array of all search query occurrences in all fields."
    },
    "_rankingScoreDetails": {
      "type": "object",
      "properties": {
        "": {
          "$ref": "#/components/schemas/rankingScoreDetails"
        }
      },
      "description": "Only present if showRankingScoreDetails = `true`. The ranking score of each ranking rule for that document."
    }
  },
  "x-examples": [
    {
      "id": 25684,
      "title": "American Ninja 5",
      "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg",
      "overview": "When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.",
      "_formatted": {
        "id": 25684,
        "title": "American Ninja 5",
        "poster": "https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg",
        "overview": "When a scientists daughter is kidnapped, American <em>Ninja</em>, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the <em>ninja</em>.",
        "release_date": 725846400
      },
      "release_date": 725846400,
      "_matchesPosition": {
        "overview": [
          {
            "start": 49,
            "length": 5
          },
          {
            "start": 155,
            "length": 5
          }
        ]
      }
    }
  ],
  "description": "",
  "additionalProperties": true
}
integer hitsPerPage
{
  "type": "integer",
  "example": 20,
  "description": "Sets the number of results returned per page. If hitsPerPage is not provided as a query parameter, this parameter is ignored."
}
object index
{
  "type": "object",
  "title": "",
  "example": {
    "uid": "movies",
    "createdAt": "2019-11-20T09:40:33.711324Z",
    "updatedAt": "2019-11-20T09:40:33.711324Z",
    "primaryKey": "movie_id"
  },
  "required": [
    "uid",
    "createdAt",
    "updatedAt"
  ],
  "properties": {
    "uid": {
      "type": "string",
      "example": "movies",
      "description": "Unique identifier for the index"
    },
    "createdAt": {
      "$ref": "#/components/schemas/timestamp"
    },
    "updatedAt": {
      "$ref": "#/components/schemas/timestamp"
    },
    "primaryKey": {
      "type": [
        "string",
        "null"
      ],
      "example": "movie_id",
      "nullable": true,
      "description": "Custom primaryKey for documents"
    }
  },
  "x-examples": [
    {
      "uid": "movies",
      "createdAt": "2019-11-20T09:40:33.711324Z",
      "updatedAt": "2019-11-20T09:40:33.711324Z",
      "primaryKey": "movie_id"
    }
  ],
  "description": ""
}
object key
{
  "type": "object",
  "title": "key",
  "required": [
    "actions",
    "indexes",
    "expiresAt"
  ],
  "properties": {
    "key": {
      "type": "string",
      "example": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4",
      "readOnly": true,
      "description": "The derived key to use in the Authorization header to authorize requests. Generated by Meilisearch with an HMAC, using an SHA-256 hash, of the uid and the master key."
    },
    "uid": {
      "type": "string",
      "example": "01b4bc42-eb33-4041-b481-254d00cce834",
      "description": "A uuid v4 to identify the API Key. If not specified, it's generated by Meilisearch."
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "A human-readable name for the key. null if empty."
    },
    "actions": {
      "type": "array",
      "items": {
        "enum": [
          "search",
          "documents.add",
          "documents.get",
          "documents.delete",
          "indexes.create",
          "indexes.get",
          "indexes.update",
          "indexes.delete",
          "indexes.swap",
          "tasks.get",
          "tasks.cancel",
          "tasks.delete",
          "settings.get",
          "settings.update",
          "stats.get",
          "metrics.get",
          "dumps.create",
          "snapshots.create",
          "version",
          "keys.get",
          "keys.create",
          "keys.update",
          "keys.delete",
          "experimental.get",
          "experimental.update"
        ],
        "type": "string",
        "example": "documents.add"
      },
      "description": "A list of actions permitted for the key. [\"*\"] for all actions. The * character can be used as a wildcard when located at the last position. e.g. `documents.*` to authorize access on all documents endpoints.",
      "uniqueItems": false
    },
    "indexes": {
      "type": "array",
      "items": {
        "type": "string",
        "example": "movies"
      },
      "description": "A list of accesible indexes permitted for the key. [\"*\"] for all indexes. The * character can be used as a wildcard when located at the last position. e.g. \"products_*\"\" to allow access to all indexes whose names start with \"products_\"."
    },
    "createdAt": {
      "type": "string",
      "example": "2021-11-12T10:00:00Z",
      "readOnly": true,
      "description": "Represent the date and time as RFC 3339 format when the API key has been created. Generated by Meilisearch."
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "description": "Represent the expiration date and time as RFC 3339 format. null equals to no expiration time."
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "readOnly": true,
      "description": "Represent the date and time as RFC 3339 format when the API key has been updated. Generated by Meilisearch."
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "default": null,
      "description": "A description for the key. null if empty."
    }
  },
  "description": "API keys are stored and managed by the master key holder and the default admin key holder. These are the keys used by the technical teams to interact with Meilisearch at the level of the client/server code. API keys can have restrictions on which methods can be accessed via an actions list; they can also expiresAt a specific date time and be restricted to a specific set of indexes."
}
integer limit
{
  "type": "integer",
  "example": 10,
  "description": "Limit given for the query. If limit is not provided as a query parameter, this parameter displays the default limit value."
}
object matchesPosition
{
  "type": "object",
  "required": [
    "start",
    "length"
  ],
  "properties": {
    "start": {
      "type": "integer"
    },
    "length": {
      "type": "integer"
    }
  },
  "description": "Starting position and length in bytes of the matched term in the returned value"
}
integer next
{
  "type": "integer",
  "example": 989,
  "description": "Represents the value to send in `from` to fetch the next slice of the results. The first item for the next slice starts at this exact number. When the returned value is null, it means that all the data have been browsed in the given order."
}
array nonSeparatorTokens
{
  "type": "array",
  "items": {
    "type": "string"
  },
  "example": [
    "#",
    "-",
    "_"
  ],
  "description": "List of tokens that will not be considered as word separators by Meilisearch."
}
integer offset
{
  "type": "integer",
  "example": 0,
  "description": "Offset given for the query. If offset is not provided as a query parameter, this parameter displays the default offset value."
}
integer order
{
  "type": "integer",
  "description": "The order that this ranking rule was applied"
}
integer page
{
  "type": "integer",
  "example": 1,
  "description": "Sets the specific results page to fetch. If page is not provided as a query parameter, this parameter is ignored."
}
object pagination
{
  "type": "object",
  "properties": {
    "maxTotalHits": {
      "type": "integer",
      "default": 1000,
      "nullable": false,
      "description": "Define the maximum number of documents reachable for a search request. It means that with the default value of `1000`, it is not possible to see the `1001`st result for a **search query**."
    }
  },
  "description": "Customize pagination settings"
}
array rankingRules
{
  "type": "array",
  "items": {
    "type": "string"
  },
  "example": [
    "words",
    "typo",
    "proximity",
    "attribute",
    "sort",
    "exactness",
    "release_date:asc"
  ],
  "examples": [],
  "description": "List of ranking rules sorted by order of importance. The order is customizable.\n\n[A list of ordered built-in ranking rules](https://docs.meilisearch.com/learn/core_concepts/relevancy.html).\n"
}

Versions

Version Endpoints Schemas Ingested Status
1.7.0 73 71 2026-05-11 current
1.7.0 73 71 2026-04-16