# Pagination
Child route of the settings route.
This route allows you to configure the pagination settings for an index.
Pagination settings can also be updated directly through the global settings route along with the other settings.
To learn more about paginating search results with Meilisearch, refer to our dedicated guide.
WARNING
Updating the settings means overwriting the default settings of Meilisearch. You can reset to default values using the DELETE routes.
# Get pagination settings
/indexes/{index_uid}/settings/paginationGet the pagination settings of an index. The index uid is required.
# Example
curl \
-X GET 'http://localhost:7700/indexes/books/settings/pagination'
# Response: 200 OK
{
"maxTotalHits": 1000
}
# Returned fields
# maxTotalHits
The maximum number of results Meilisearch can return.
# Update pagination settings
/indexes/{index_uid}/settings/paginationPartially update the pagination settings for an index. The index uid is required.
# Body
# maxTotalHits
Type: integer
Default value: 1000
An integer indicating the maximum number of search results Meilisearch can return. maxTotalHits takes priority over search parameters such as limit and offset.
For example, if you set maxTotalHits to 100, you will not be able to access search results beyond 100 no matter the value configured for offset.
NOTE
Setting maxTotalHits to a high value might negatively impact performance and expose instance data to malicious scraping.
# Example
curl \
-X PATCH 'http://localhost:7700/indexes/books/settings/pagination' \
-H 'Content-Type: application/json' \
--data-binary '{
"maxTotalHits": 100
}'
# Response: 200 OK
{
"taskUid": 1,
"indexUid": "books",
"status": "enqueued",
"type": "settingsUpdate",
"enqueuedAt": "2022-04-14T20:56:44.991039Z"
}
You can use the returned taskUid to get more details on the status of the task.
# Reset pagination settings
Reset an index's pagination settings to their default value. The index uid is required.
# Example
curl \
-X DELETE 'http://localhost:7700/indexes/books/settings/pagination'
# Response: 200 OK
{
"taskUid": 1,
"indexUid": "books",
"status": "enqueued",
"type": "settingsUpdate",
"enqueuedAt": "2022-04-14T20:53:32.863107Z"
}
You can use the returned taskUid to get more details on the status of the task.