> ## Documentation Index
> Fetch the complete documentation index at: https://slovakapi.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Pagination

> Page through list results from RÚZ identifier list endpoints.

***

## List page IDs

All [Identifier list](/ruz/api-reference/identifier-lists/list-accounting-units) endpoints return **paged lists of IDs** rather than full records. The response includes the IDs for the current page and a flag that tells you whether more results exist.

```json Example response theme={null}
{
  "id": [336953, 412071, 598204],
  "existujeDalsieId": true
}
```

* `id` — array of entity IDs for the current page.
* `existujeDalsieId` — when true, more results exist.

***

## Get the next page

If `existujeDalsieId` is `true`, more IDs are available.

To fetch the next page, send the same request again and set `pokracovat-za-id` to the last ID from the current response. Because results are ordered by id, the next page starts after that value.

```bash Example request theme={null}
# First page
curl "https://www.registeruz.sk/cruz-public/api/uctovne-jednotky?zmenene-od=2000-01-01&max-zaznamov=100"

# Next page — use the last id from the previous response
curl "https://www.registeruz.sk/cruz-public/api/uctovne-jednotky?zmenene-od=2000-01-01&max-zaznamov=100&pokracovat-za-id=598204"
```

```json Example response theme={null}
{
  "id": [635005, 635006, 635007],
  "existujeDalsieId": true
}
```

Continue until `existujeDalsieId` is `false` or the `id` array is empty.

***

## Choose a page size

Use `max-zaznamov` to control how many IDs are returned per page.

| Setting | Value |
| ------- | ----- |
| Default | 1000  |
| Maximum | 10000 |

During development, a smaller page size such as 100 is often easier to work with.

***

## Count remaining records

Before paginating through a large result set, you can check how many records remain using the count endpoints. They accept the same parameters as the list endpoints and return a single number.

```bash Example request theme={null}
curl "https://www.registeruz.sk/cruz-public/api/zostavajuce-id/uctovne-jednotky?zmenene-od=2000-01-01&pokracovat-za-id=598204"
```

```json Example response theme={null}
{
  "pocetZostavajucichId": 142
}
```

<Tip>This is not required for pagination but often used to display progress bars, build logs, or decide whether to continue a sync. For more information, see [Remaining counts](/ruz/api-reference/remaining-counts/count-accounting-units).</Tip>
