> For the complete documentation index, see [llms.txt](https://developers.gurupay.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.gurupay.eu/getting-started/api-concepts/pagination.md).

# Pagination

Guru Pay API endpoints that return lists of resources (e.g., transactions) support **pagination** to efficiently deliver large datasets in manageable chunks.

{% hint style="info" %}
Pagination metadata is included via **custom HTTP response headers**, not in the response body.
{% endhint %}

## Headers

| Header               | Type    | Description                                                                  |
| -------------------- | ------- | ---------------------------------------------------------------------------- |
| X-Api-Total          | integer | Total number of records.                                                     |
| X-Api-Per-Page       | integer | Number of records returned on the current page.                              |
| X-Api-Has-More-Pages | integer | Returns `1` when additional pages are available. Otherwise, returns nothing. |
| X-Api-Has-Has-Pages  | integer | Returns last page number.                                                    |
| X-Api-Page           | integer | Current page number (starts from 1).                                         |

## Example Response Headers

```http
X-Api-Total: 60
X-Api-Per-Page: 20
X-Api-Has-More-Pages: 1
X-Api-Current-Page: 1
```

## Example Usage

```http
GET /api/v1/transactions?page=1

Authorization: Bearer YOUR_API_TOKEN
```

## Best Practices

* Always check `X-Api-Has-More-Pages` before making another request.
* Avoid hardcoding limits - respect the `X-Api-Per-Page` value in case the backend changes.

{% hint style="warning" %}
Please note that paginated results are limited to the first 10,000 matching records. If you reach this limit, refine your filters to narrow the result set.
{% endhint %}


---

# 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://developers.gurupay.eu/getting-started/api-concepts/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.
