# Pagination

Some resources return collections of data and hence support pagination to chunk these results as they are returned. These results follow a standard approach.

For pagination-enabled endpoints, collections will be returned within a `data` property. This is a JSON array of results that can be iterated through. A `meta` property holds pagination information such as `nextPageUrl`, `previousPageUrl`, and `limit`.

```json
{
  "data": [
    {
      ...
    }
    ...
  ],
  "meta": {
    "limit": 50,
    "nextPageUrl": "/api/v1/identify?limit=50...", // or null
    "previousPageUrl": "/api/v1/identify?limit=50...", // or null
    "url": "/api/v1/identifiy?limit=50"
  }
}
```

### Parameters

| Name        | Type   | Description                                                                                               |
| ----------- | ------ | --------------------------------------------------------------------------------------------------------- |
| `limit`     | number | Maximum number of results to return between `1` & `100`. Defaults to `50`                                 |
| `pageToken` | string | Token for the page to retrieve. Available on requests with multiple pages of results. Starts with `ey...` |

### Response

| Name                   | Type             | Description                                                                |
| ---------------------- | ---------------- | -------------------------------------------------------------------------- |
| `data`                 | array            | Collection of results which varies depending on the resource               |
| `meta`                 | object           | Pagination related details                                                 |
| `meta.limit`           | string           | Number of results requested                                                |
| `meta.nextPageUrl`     | string (or null) | URL to the next page of results or `null` if there is no next page         |
| `meta.previousPageUrl` | string (or null) | URL to the previous page of results or `null` if there is no previous page |
| `meta.url`             | string (or null) | URL to the current page of results.                                        |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tristans-organization-4.gitbook.io/attuitive/api-reference/pagination.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
