Skip to main content
GET
/
keys
cURL
curl \
  -X GET 'MEILISEARCH_URL/keys?limit=3' \
  -H 'Authorization: Bearer MASTER_KEY'
{
  "results": [
    {
      "uid": "01b4bc42-eb33-4041-b481-254d00cce834",
      "key": "d0552b41536279a0ad88bd595327b96f01176a60c2243e906c52ac02375f9bc4",
      "name": "An API Key",
      "description": null,
      "actions": [
        "documents.add"
      ],
      "indexes": [
        "movies"
      ],
      "expiresAt": "2022-11-12T10:00:00Z",
      "createdAt": "2021-11-12T10:00:00Z",
      "updatedAt": "2021-11-12T10:00:00Z"
    }
  ],
  "limit": 20,
  "offset": 0,
  "total": 1
}

Authorizations

Authorization
string
header
required

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

offset
integer
default:0

Number of keys to skip. Use with limit for pagination. Defaults to 0.

Required range: x >= 0
limit
integer
default:20

Maximum number of keys to return. Use with offset for pagination. Defaults to 20.

Required range: x >= 0

Response

List of keys.

results
object[]
required

Items for the current page.

offset
integer
required

Number of items skipped.

Required range: x >= 0
limit
integer
required

Maximum number of items returned.

Required range: x >= 0
total
integer
required

Total number of items matching the query.

Required range: x >= 0