# Pagination

{% hint style="info" %}
Most collection endpoints in the Dashdoc API are **paginated**. By default, results are returned in pages of **20 or 100 items**, depending on the endpoint.
{% endhint %}

### Requesting Pages

To navigate through paginated data, use the `page` query parameter:

```url
GET /api/v4/transports/?page=2
```

If the `page` parameter is not specified, the API will return the **first page** (`?page=1` by default).

{% hint style="danger" %}
If your integration processes large datasets, make sure to iterate over pages using the `next` URL until it returns `null`.
{% endhint %}

***

### Response Format

Paginated responses follow a consistent schema:

{% hint style="warning" %}
The maximum number of items per page varies depending on the endpoint (usually 20 or 100).
{% endhint %}

{% code lineNumbers="true" %}

```json
{
  "count": 100,
  "next": "https://api.dashdoc.com/api/v4/transports/?page=3",
  "previous": "https://api.dashdoc.com/api/v4/transports/?page=1",
  "results": [
    ...
  ]
}
```

{% endcode %}

**Fields**

* **`count`**:\
  Total number of items matching your request, across all pages.
* **`next`**:\
  URL to retrieve the next page of results (or `null` if you are on the last page).
* **`previous`**:\
  URL to retrieve the previous page of results (or `null` if you are on the first page).
* **`results`**:\
  The list of objects contained in the current page.
