SpoakSpoak
API Reference

Backend API Docs

Complete reference for the Spoak backend REST API. Base URL: http://localhost:4000/api

Base URL:https://backend-production-aa67.up.railway.app/api/v2

Tech Stack

The backend is built with Rust using Axum, Tokio and Reqwest. It proxies requests to Mojang, PaperMC and Leaf APIs.

RustAxum 0.7Tokio 1Reqwest 0.12Serde 1Tower-HTTP 0.5Moka 0.12dotenvy 0.15

Environment Variables

VariableDefaultDescription
PORT4000Port the server listens on

Server Jars

GET/api/serverjars/versions

Get all Minecraft release versions

Returns a list of stable Minecraft Java Edition release versions sourced from the Mojang version manifest. Sorted newest first.

{ "versions": ["1.21.4", "1.21.3", ...] }

GET/api/serverjars/paper/:version/builds

Get Paper builds for a version

Returns all available Paper server builds for the given Minecraft version. Sorted newest first.

:versionstringMinecraft version (e.g. 1.21.4)

{ "builds": [{ "version": "1.21.4", "build": "232", "channel": "stable", "download_url": "..." }] }

GET/api/serverjars/paper/:version/latest

Get latest stable Paper build

Returns the latest stable Paper build for the given version.

:versionstringMinecraft version (e.g. 1.21.4)

{ "version": "1.21.4", "build": "232", "channel": "stable", "download_url": "..." }

GET/api/serverjars/leaf/:version/builds

Get Leaf builds for a version

Returns all available Leaf server builds for the given Minecraft version, sourced from the Leaf API.

:versionstringMinecraft version (e.g. 1.21.4)

{ "builds": [{ "version": "1.21.4", "build": "525", "channel": "default", "download_url": "..." }] }

Server Ping

GET/api/mcping?host=&port=

Ping a Minecraft server

Pings a Java Edition server using the Server List Ping protocol. Works without query protocol enabled. Returns version, player count, MOTD, favicon and latency.

hoststringServer hostname or IP
portu16optionalServer port (default: 25565)

{ "online": true, "host": "play.example.com", "port": 25565, "version": "Paper 1.21.4", "protocol": 769, "software": "Paper", "description": "A Minecraft Server", "players_online": 12, "players_max": 100, "players": ["Steve", "Alex"], "favicon": "data:image/png;base64,...", "latency_ms": 42 }

Player Profile

GET/api/player/:username

Look up a player profile

Fetches a player's UUID, username, skin URL, cape URL and skin model from the Mojang API.

:usernamestringMinecraft username

{ "uuid": "069a79f444e94726a5befca90e38aaf5", "uuid_formatted": "069a79f4-44e9-4726-a5be-fca90e38aaf5", "username": "Notch", "skin_url": "http://textures.minecraft.net/texture/...", "cape_url": null, "skin_model": "classic", "avatar_url": "https://crafatar.com/avatars/...", "body_url": "https://crafatar.com/renders/body/..." }

Seed Map

GET/api/seedmap/versions

Get supported seed map versions

Returns the list of Minecraft versions supported by the biome generator.

{ "versions": ["1.21", "1.20", "1.19", ...] }

GET/api/seedmap/tile?seed=&x=&z=&size=&version=

Generate a biome tile

Returns raw biome data as a binary octet-stream. Each biome ID is encoded as a signed 16-bit little-endian integer. Tile is size×size biome IDs sampled at scale 4 (1 sample per 4 blocks).

seedstringNumeric seed or string (auto-hashed)
xi32optionalCenter X coordinate (block)
zi32optionalCenter Z coordinate (block)
sizeu32optionalTile size in biome samples (32–256, default: 128)
versionstringoptionalMinecraft version (e.g. 1.21.4)

<binary> — size×size × 2 bytes (i16 LE per biome ID)

GET/api/seedmap/structures?seed=&x=&z=&radius=&version=

Find structures near a position

Returns a list of structure markers (village, monument, mansion, etc.) within the given radius around the specified coordinates.

seedstringNumeric seed or string (auto-hashed)
xi32optionalCenter X coordinate (block)
zi32optionalCenter Z coordinate (block)
radiusi32optionalSearch radius in blocks (256–4096, default: 1024)
versionstringoptionalMinecraft version (e.g. 1.21.4)

[ { "kind": "village", "label": "Village", "color": "#4ade80", "x": 128, "z": -256 }, { "kind": "monument", "label": "Monument", "color": "#38bdf8", "x": 512, "z": 768 }, { "kind": "mansion", "label": "Mansion", "color": "#f87171", "x": -1024, "z": 320 } ]