API Documentation

Read Milarki tournament, battle and player data straight out of the platform.

Base URL

https://milarki.com/api/v1

www.milarki.com serves the API too, so either host works and there is nothing to change if you are already on one of them.

The v1 in the path is the major version only — the API is currently at v1.1.0, and a 1.4.2 still lives at /v1/. New fields and endpoints bump the minor; only a change that removes or reshapes something you already read gets a /v2/.

Key Concepts

  • Read-only — All endpoints use GET requests. Nothing you do here can change data in Milarki.
  • Names, not internal ids — Anything you can go and fetch is referred to by its short address: the tournament and club slug, the battle id, the player playerId. Anything you cannot fetch — a faction, a scenario, a battle pack, the winner of a game — is simply spelled out by name. So a battle tells you its scenario in words, but points at its tournament by slug, because the tournament is somewhere you can go next.
  • One shape per thing — A tournament looks the same whether you fetched it on its own, in a list, or through a club. Same for a battle and an army list.
  • Links included — Tournaments, clubs and battles all carry a url to their page on milarki.com, so you can always send someone to the real thing.
  • Bearer Authentication — All requests require an API key passed via the Authorization header.
  • Paged lists — Long lists arrive a page at a time, and each page hands you the link to the next one.

API Key Format

API keys use the prefix mlk_v1_ followed by a unique identifier. You can generate API keys from your account settings.

mlk_v1_your_api_key_here

Quick Example

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

Response Envelope

What you asked for always sits under data:

json
{
  "data": { ... }
}

Lists add a next link — the full address of the following page, or null when there is nothing more to fetch:

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

Dates and Date Ranges

Tournament and battle dates come back as plain calendar days — 2025-01-14 — read as the local date where the event was held, so a tournament that started on the Saturday says Saturday no matter where you read it from.

The endpoints that list tournaments or battles take an optional from and to. Leave both out and you simply get the most recent results. Give one and it becomes an open-ended window. Give both and the window may not be longer than a year.