> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List keys

> List the keys in a KMS project with the Python SDK.

`client.kms.list_keys()` lists the keys in a [KMS](https://infisical.com/docs/documentation/platform/kms/overview.md) project.

## Parameters

**project\_id** `str` *required*

The ID of the KMS project.

**search** `str`

Text to find in key names.

**order\_by** `KmsKeysOrderBy` (default: KmsKeysOrderBy.NAME)

What to sort the keys by.

**order\_direction** `OrderDirection` (default: OrderDirection.ASC)

The direction to sort in, `OrderDirection.ASC` or `OrderDirection.DESC`. Import both enums from `infisical_sdk.api_types`.

**limit** `int` (default: 100)

The maximum number of keys to return.

**offset** `int` (default: 0)

The number of keys to skip.

## Returns

**response** `ListKmsKeysResponse`

The keys in `keys`, and the total number of matching keys in `totalCount`.

```python Basic theme={"dark"}
response = client.kms.list_keys(project_id="<project-id>")

for key in response.keys:
    print(key.name, key.id)
```

```python Search theme={"dark"}
response = client.kms.list_keys(
    project_id="<project-id>",
    search="payments",
    limit=20,
)
```

```json Response theme={"dark"}
{
  "keys": [
    {
      "id": "8c9d0e1f-2a3b-4c4d-9e5f-6a7b8c9d0e1f",
      "name": "payments-data",
      "description": "",
      "projectId": "5e8d7c6b-4a3f-4e2d-9c1b-0a9f8e7d6c5b",
      "orgId": "2c1b0a9f-8e7d-4c6b-5a4f-3e2d1c0b9a8f",
      "encryptionAlgorithm": "aes-256-gcm",
      "version": 1,
      "isDisabled": false,
      "createdAt": "2026-12-02T11:20:08.774Z",
      "updatedAt": "2026-12-02T11:20:08.774Z"
    }
  ],
  "totalCount": 1
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.