> For the complete documentation index, see [llms.txt](https://integrations.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.impact.com/agency-v3/agency-v2/readme/pagination.md).

# Pagination

All top-level API resources have support for bulk fetches via "list" API methods. For example, you can list `Actions`, `Partners`, and `Contracts`, among others. As these requests typically generate large result sets, these results are paginated and share a common structure detailing how the pages are structured. By default, requests return page 1 (the first page) and 1,000 results per page (though this may differ by resource). You can override these defaults by using the parameters below:

### Request Parameters <a href="#request-parameters" id="request-parameters"></a>

***

| Name       | Description                                                                                                               |
| ---------- | ------------------------------------------------------------------------------------------------------------------------- |
| *Page*     | The page you are requesting be returned. Page choice starts at 1. Page `1` will be returned if no `Page` is specified.    |
| *PageSize* | Specify how many objects should be returned on each page. If not specified, the resource default amount will be returned. |

To make the pages easy to traverse, impact.com list APIs also preconfigure URIs that point to other pages of interest within the result set. See the full set of pagination response parameters below.

### Response Attributes <a href="#response-attributes" id="response-attributes"></a>

| Name               | Description                                                                                      |
| ------------------ | ------------------------------------------------------------------------------------------------ |
| *@page*            | Current page number. Pages start at 1.                                                           |
| *@numpages*        | Total number of pages.                                                                           |
| *@pagesize*        | How many entities are in each page.                                                              |
| *@total*           | Total number of entities in the list.                                                            |
| *@start*           | Position in the overall list of the first item in this page. Zero indexed (first position is 0). |
| *@end*             | Position in the overall list of the first item in this page. Zero indexed (first position is 0). |
| *@uri*             | URI of the current page.                                                                         |
| *@firstpageuri*    | URI for the first page of this result set.                                                       |
| *@nextpageuri*     | URI for the next page in this result set.                                                        |
| *@previouspageuri* | URI for the previous page in this result set.                                                    |
| *@lastpageuri*     | URI for the last page of this result set.                                                        |

#### Example Pagination Request

{% tabs %}
{% tab title="JSON" %}

```json
curl 'https://api.impact.com/Agencies/<AccountSID>/Advertisers' \
  -X GET \
  -u '<AccountSID>:<AuthToken>' \
  -H 'Accept: application/json' \
  -d 'CampaignId=1017' \
  -d 'PageSize=2000' \
  -d 'Page=2' \
  -G
```

{% endtab %}
{% endtabs %}

#### Example Pagination Response

{% tabs %}
{% tab title="JSON" %}

<pre class="language-json"><code class="lang-json">{
<strong>  "@page": "1",
</strong>  "@numpages": "1",
  "@pagesize": "100",
  "@total": "62",
  "@start": "0",
  "@end": "61",
  "@uri": "/Agencies/...",
  "@firstpageuri": "/Agencies/...",
  "@previouspageuri": "/Agencies/...",
  "@nextpageuri": "/Agencies/...",
  "@lastpageuri": "/Agencies/...",
  "Advertisers": [
    {...},
    {...}
  ]
}
</code></pre>

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://integrations.impact.com/agency-v3/agency-v2/readme/pagination.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
