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

# Pagination

> limit, offset, page, random, and seed headers.

Every list is capped at `limit` 1–5 (default 5). There is no `/v1/all` endpoint.

## GET /v1 and GET /v1/list

| Mode | Query | Behavior |
| - | - | - |
| Offset | `?offset=0&limit=5` | Default. Skip N countries in dataset order. |
| Numbered page | `?page=0` | Zero-based pages. Response header X-List-Page and X-List-Pages. |
| Randomized sample | `?page=randomized` | Up to limit random countries. Not a walk through the full set. |
| Seeded shuffle | `?page=random&index=0` | Stable random order. Reuse seed until the set is covered. |

For `page=random`, omit `seed` on the first request and read `X-List-Seed`. Pass the same seed with `index=1`, `index=2`, … Headers: `X-List-Seed`, `X-List-Index`, `X-List-Pages`.

```bash theme={null}
curl -D - "https://flags.robskan.nl/v1?page=random&limit=5&fields=cca2"
```

## Filtered routes

Alpha, name, capital, region, language, currency, independent, and random use `offset` + `limit` only (no `page` modes).

<Warning>
  **Invalid params**

  Non-integer `limit`, `offset`, `index`, or an unknown `page` value returns HTTP 400 with a JSON error body.
</Warning>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.