> For the complete documentation index, see [llms.txt](https://docs.lsports.eu/u/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lsports.eu/u/trade/integration/apis/api-pagination.md).

# API Pagination

Some endpoints in the TRADE API support **page-based pagination**, allowing you to retrieve large datasets in smaller, more manageable chunks.\
This helps optimize performance and reduce the load on both client and server sides.

> ⚠️ **Important:**\
> Pagination is only available for endpoints that are explicitly defined with pagination in the API specification.\
> Currently, this applies to:\
> [**`POST /Participants/Get`**](/u/trade/integration/apis/metadata.md#post-participants-get)

### **Pagination Parameters**

#### **1. Page**

Specifies **which page of results** to retrieve.

* The count starts at **1**.
* Each page contains a defined number of participants according to the `PageSize` value.
* If the page number exceeds the total number of pages, an empty result set will be returned.

**Limits:**

* **Minimum:** 1
* **Maximum:** 2147483647
* **Default:** 1

#### **2. PageSize**

Defines **how many participants** are returned per page.\
Choosing the right page size helps you balance between data load and performance.

**Limits:**

* **Minimum:** 1
* **Maximum:** 1000
* **Default:** 100

### **Example Usage**

| Use Case                                    | Parameters                 | Description                                       |
| ------------------------------------------- | -------------------------- | ------------------------------------------------- |
| Retrieve the first 100 participants         | `Page = 1, PageSize = 100` | Gets the first set of results                     |
| Retrieve the next 100 participants          | `Page = 2, PageSize = 100` | Gets the second batch of results                  |
| Retrieve a smaller batch of 50 participants | `Page = 1, PageSize = 50`  | Useful for quick testing or partial data requests |

### **How to Retrieve All Results**

If you need to retrieve all participants:

1. Start with `Page = 1`.
2. Check the number of records returned.
3. If it equals your `PageSize`, increment the `Page` value and send another request.
4. Continue until the returned dataset is empty or smaller than your `PageSize`.

This ensures you systematically retrieve all available data without overloading your system.

### **Best Practices**

* Always specify both `Page` and `PageSize` in your request body.
* Use moderate `PageSize` values for better response times.
* Avoid requesting extremely large pages to prevent timeouts.


---

# 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://docs.lsports.eu/u/trade/integration/apis/api-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.
