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

# Pagination et filtres

> Paramètres de requête partagés : pagination, recherche, tri et filtres datetime.

La plupart des endpoints de liste acceptent les mêmes paramètres de pagination et de filtre.

| Paramètre          | Type    | Requis | Description                                                 |
| ------------------ | ------- | ------ | ----------------------------------------------------------- |
| `page`             | integer | non    | Défaut `1`                                                  |
| `results_per_page` | integer | non    | `10`, `25`, `50`, `100`, `250`, `500`, `1000` (défaut `25`) |
| `search`           | string  | non    | Texte de recherche                                          |
| `search_by`        | string  | non    | Champ de recherche                                          |
| `order_by`         | string  | non    | Champ de tri                                                |
| `order_type`       | string  | non    | `ASC` ou `DESC`                                             |
| `datetime_field`   | string  | non    | Champ datetime à filtrer                                    |
| `datetime_start`   | string  | non    | Depuis **`Y-m-d H:i:s`**                                    |
| `datetime_end`     | string  | non    | Jusqu’à **`Y-m-d H:i:s`**                                   |

<Note>
  Les endpoints de statistiques utilisent le format date **`Y-m-d`** pour `start_date` et `end_date` (pas datetime).
</Note>

## Exemple

```bash theme={null}
curl --request GET \
  --url 'https://api.kloo.li/v1/links/?page=1&results_per_page=25&order_by=datetime&order_type=DESC' \
  --header 'Authorization: Bearer {api_key}'
```
