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

# Pagination

All list endpoints return paginated results. Use the `page` and `size` parameters to navigate through results.

## Query parameters

| Parameter | Type    | Default | Description                                                      |
| --------- | ------- | ------- | ---------------------------------------------------------------- |
| `page`    | integer | `0`     | Zero-based page index                                            |
| `size`    | integer | `20`    | Number of results per page                                       |
| `sort`    | string  | varies  | Sort field and direction, e.g. `name,asc` or `modifiedDate,desc` |

## Example

```bash
GET /suppliers?page=0&size=20&sort=name,asc
```

## Response structure

Paginated responses include metadata alongside the results:

```json
{
  "content": [...],
  "page": {
    "size": 20,
    "number": 0,
    "totalElements": 150,
    "totalPages": 8
  }
}
```

| Field                | Description                           |
| -------------------- | ------------------------------------- |
| `content`            | Array of results for the current page |
| `page.size`          | Number of results returned            |
| `page.number`        | Current page index (zero-based)       |
| `page.totalElements` | Total number of matching records      |
| `page.totalPages`    | Total number of pages                 |

To retrieve the next page, increment `page` by 1. Stop when `page.number + 1 >= page.totalPages`.


---

# 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 dynamically by asking a question.

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

```
GET https://docs.unimarket.com/api-reference/getting-started/pagination.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
