Pagination

Long lists come back a page at a time, and each page hands you the link to the next one.

How It Works

  1. Ask for the list. You get the first page.
  2. Look at next at the bottom of the response. It is a complete web address — paste it straight into your browser, your script or your spreadsheet tool.
  3. Fetch that address to get the following page, and keep going until next comes back as null. That means you have reached the end.

You never have to build the link yourself. It already carries your filters, your page size and the marker for where the next page starts.

Response Format

json
{
  "data": [ ... ],
  "next": "https://milarki.com/api/v1/tournaments?cursor=eyJpZCI6Im5leHRfZG9jX2lkIn0&limit=10"
}

On the last page — and on any list that fits in one page — next is null:

json
{
  "data": [ ... ],
  "next": null
}

Endpoints that return a single thing rather than a list have no next at all — just data.

Query Parameters

ParameterTypeRequiredDescription
limitintegerOptionalHow many results you want per page. Default: 20, max: 100.
cursorstringOptionalMarks where the next page starts. It is already inside the "next" link, so you should never need to set it by hand.

Example Request

First page:

bash
curl -H "Authorization: Bearer mlk_v1_your_api_key" \
  "https://milarki.com/api/v1/tournaments?limit=10"

Next page — the address is the one the first response gave you:

bash
curl -H "Authorization: Bearer mlk_v1_your_api_key" \
  "https://milarki.com/api/v1/tournaments?cursor=eyJpZCI6ImFiYzEyMyJ9&limit=10"

Validation Errors

  • limit must be a positive integer — Invalid limit value
  • limit must not exceed 100 — Limit too large
  • Invalid cursor — Malformed or expired cursor