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

# List Datasets

> Retrieve a list of all datasets in your account

## Request

Returns a paginated list of datasets ordered by creation date (newest first).

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication
</ParamField>

### Query Parameters

<ParamField query="limit" type="integer" default={20}>
  Number of datasets to return (max: 100)
</ParamField>

<ParamField query="offset" type="integer" default={0}>
  Number of datasets to skip
</ParamField>

<ParamField query="sort" type="string" default="-created_at">
  Sort order: `name`, `created_at`, `-name`, `-created_at`
</ParamField>

## Response

<ResponseField name="datasets" type="array">
  Array of dataset objects
</ResponseField>

<ResponseField name="total" type="integer">
  Total number of datasets
</ResponseField>

<ResponseField name="limit" type="integer">
  Limit used in request
</ResponseField>

<ResponseField name="offset" type="integer">
  Offset used in request
</ResponseField>

<ResponseField name="has_more" type="boolean">
  Whether there are more datasets to fetch
</ResponseField>

## Examples

```bash cURL theme={null}
curl https://api.fltr.com/v1/datasets?limit=10&offset=0 \
  -H "Authorization: Bearer fltr_sk_abc123..."
```

```python Python theme={null}
import requests

response = requests.get(
    "https://api.fltr.com/v1/datasets",
    headers={"Authorization": "Bearer fltr_sk_abc123..."},
    params={"limit": 10, "offset": 0}
)

data = response.json()
for dataset in data['datasets']:
    print(f"{dataset['name']} - {dataset['document_count']} documents")
```

### Response

```json theme={null}
{
  "datasets": [
    {
      "id": "ds_abc123",
      "name": "Product Documentation",
      "description": "All product docs",
      "is_public": false,
      "document_count": 42,
      "created_at": "2024-01-10T12:00:00Z",
      "updated_at": "2024-01-10T15:30:00Z"
    }
  ],
  "total": 1,
  "limit": 10,
  "offset": 0,
  "has_more": false
}
```
