> ## 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 folders

> List the subfolders of a folder with the Python SDK.

`client.folders.list_folders()` lists the subfolders of a [folder](https://infisical.com/docs/documentation/platform/folder.md) in an environment of a project.

## Parameters

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

The ID of the project.

**environment\_slug** `str` *required*

The slug of the environment, such as `dev`.

**path** `str` *required*

The path of the folder whose subfolders to list, such as `/`.

**recursive** `bool` (default: False)

Whether to also list the subfolders of every subfolder.

**last\_secret\_modified** `datetime`

A time, to list only the folders with secrets that changed after it.

## Returns

**response** `ListFoldersResponse`

**properties**

**folders** `List[ListFoldersResponseItem]`

The folders, each with its `id`, `name`, and `description`. With `recursive=True`, each folder's `relativePath` holds its path from `path`.

```python Basic theme={"dark"}
response = client.folders.list_folders(
    project_id="<project-id>",
    environment_slug="dev",
    path="/",
)

for folder in response.folders:
    print(folder.name)
```

```python Recursive theme={"dark"}
response = client.folders.list_folders(
    project_id="<project-id>",
    environment_slug="dev",
    path="/backend",
    recursive=True,
)
```

```json Response theme={"dark"}
{
  "folders": [
    {
      "id": "3a1f6c2e-9b4d-4e7a-8c5f-2d1e0b9a8c7f",
      "name": "backend",
      "description": "Secrets for the backend service",
      "envId": "c4e2a1b9-7d3f-4a6e-9b8c-5f0e1d2c3b4a",
      "parentId": "8b7a6c5d-4e3f-4a2b-9c1d-0e9f8a7b6c5d",
      "version": 1,
      "createdAt": "2026-11-02T09:10:05.220Z",
      "updatedAt": "2026-11-02T09:10:05.220Z"
    }
  ]
}
```


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