curl \
-X GET 'MEILISEARCH_URL/stats' \
-H 'Authorization: Bearer API_KEY'client.getStats()$client->stats();client.get_all_stats(show_internal_database_sizes=True, size_format='human')client.getStats();client.statsclient.GetStats(nil)await client.GetStatsAsync();let stats: ClientStats = client
.get_stats()
.await
.unwrap();await client.getStats();client.allStats { (result) in
switch result {
case .success(let stats):
print(stats)
case .failure(let error):
print(error)
}
}{
"databaseSize": 567,
"usedDatabaseSize": 456,
"lastUpdate": "2019-11-20T09:40:33.711324Z",
"indexes": {
"movies": {
"numberOfDocuments": 10,
"indexSize": 1572864,
"usedIndexSize": 524288,
"rawDocumentDbSize": 100,
"maxDocumentSize": 16,
"avgDocumentSize": 10,
"isIndexing": true,
"fieldDistribution": {
"genre": 10,
"author": 9
}
}
}
}{
"message": "The Authorization header is missing. It must use the bearer authorization method.",
"code": "missing_authorization_header",
"type": "auth",
"link": "https://docs.meilisearch.com/errors#missing_authorization_header"
}Get stats of all indexes
Return statistics for the Meilisearch instance and for each index. Includes database size, last update time, document counts, and indexing status per index.
curl \
-X GET 'MEILISEARCH_URL/stats' \
-H 'Authorization: Bearer API_KEY'client.getStats()$client->stats();client.get_all_stats(show_internal_database_sizes=True, size_format='human')client.getStats();client.statsclient.GetStats(nil)await client.GetStatsAsync();let stats: ClientStats = client
.get_stats()
.await
.unwrap();await client.getStats();client.allStats { (result) in
switch result {
case .success(let stats):
print(stats)
case .failure(let error):
print(error)
}
}{
"databaseSize": 567,
"usedDatabaseSize": 456,
"lastUpdate": "2019-11-20T09:40:33.711324Z",
"indexes": {
"movies": {
"numberOfDocuments": 10,
"indexSize": 1572864,
"usedIndexSize": 524288,
"rawDocumentDbSize": 100,
"maxDocumentSize": 16,
"avgDocumentSize": 10,
"isIndexing": true,
"fieldDistribution": {
"genre": 10,
"author": 9
}
}
}
}{
"message": "The Authorization header is missing. It must use the bearer authorization method.",
"code": "missing_authorization_header",
"type": "auth",
"link": "https://docs.meilisearch.com/errors#missing_authorization_header"
}Authorizations
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' });
Query Parameters
If true, adds internalDatabaseSizes to the response.
Specify how to format the sizes:
"raw"(default): format sizes as a number of bytes"human": format sizes as a human-readable string with an appropriate unit.
human, raw Response
The stats of the instance.
Global statistics for the Meilisearch instance
Total disk space used by the database in bytes
x >= 0Actual size of the data in the database in bytes
x >= 0Statistics for each index
Show child attributes
Show child attributes
Date of the last update in RFC 3339 format. Null if no update has been processed
Was this page helpful?