API Documentation

All paths below are relative to https://paceman.gg/stats/api/. Responses are JSON. Existing endpoints preserve their legacy response shapes; the cursor endpoints are additive.

Rate limiting: Every API route is limited per client IP in a fixed 60-second window. Large pace and AA exports allow 6 requests; global 10,000-row pagination allows 12; deletion allows 30; combined analytics allow 60; the all-users export allows 90; submission, search, and cursor histories allow 120; cached leaderboards, fastest runs, and live-run reads allow 240; other player-stat routes allow 180. A breach returns HTTP 429 with { error: "Too many requests" } and Retry-After. Limits are in-process, so deployment-level limits may also apply.

Player lookup parameters accept either a Minecraft nickname or Twitch name where stated. Invalid player lookups return { error: "Unknown user" } with HTTP 404 unless noted otherwise.

Endpoints

GET /getLeaderboard

Pace leaderboard slice.

Parameters: days: 1, 7, 30, or 9999 (30); category (nether); type: count, average, fastest, or conversion (count); limit (10, max 999999).

Response: Array of leaderboard entries.

GET /getFastest

Fastest runs for one pace category.

Parameters: days: 1, 7, 30, or 9999 (30); category (nether); limit (10, max 999999).

Response: Array of fastest-run entries.

GET /getWorld

One run, by numeric stats ID or PaceMan world hash.

Parameters: worldId (required).

Response: { data, time, isLive } or null.

GET /getRecentRuns

Recent pace runs for a player.

Parameters: name; hours (lifetime by default); hoursBetween (lifetime by default); limit (10).

Response: Array of pace runs.

GET /getRecentTimestamps

Timestamped split data for recent pace runs.

Parameters: name; limit (20, max 50); onlyFort (false).

Response: Array of timestamp/split records.

GET /getLatestRun

Latest pace run for a player.

Parameters: name; forceName (false).

Response: One run object, [] when none, or { error: "Unknown user" }.

GET /getLatestCompletion

Latest completed pace run for a player.

Parameters: name.

Response: One completion object or { error: "Unknown user" }.

GET /getPBs

Personal-best completions.

Parameters: names: comma-separated names; uuids: comma-separated UUIDs. Either may be omitted.

Response: Array of PB records.

GET /getNickAlways

Resolve the current nickname for a UUID.

Parameters: uuid.

Response: { name }.

GET /getAllUsers

All known player names and Twitch aliases.

Response: Array of user records.

GET /getRunsPaginated

Legacy global pace-run pagination.

Parameters: page (1). Pages contain up to 10,000 ID-range rows.

Response: { pageCount, runs }, or { error, pageCount, runs }.

GET /getSessionStats

Session counts and averages for every split.

Parameters: name; hours (24); hoursBetween (6).

Response: Object keyed by nether, bastion, fortress, first_structure, second_structure, first_portal, stronghold, end, and finish.

GET /getSessionNethers

Session nether count, average, and RNPH.

Parameters: name; hours (24); hoursBetween (6); liveOnly (false); dp (0–3).

Response: { count, avg, rnph, uuid }.

GET /getSplitStats

Session count and average for one split.

Parameters: name; hours (24); hoursBetween (6); split (nether); maxTime (99999999).

Response: { count, avg, ms }.

GET /getCombinedStats

Combined session stats for several players.

Parameters: names: comma-separated; hours (24); hoursBetween (6); start (0).

Response: Object keyed by split, each containing count and avg.

GET /getCombinedNethers

Combined session nether count and average.

Parameters: names: comma-separated; hours (24); hoursBetween (6); start (0); maxTime (99999999).

Response: { count, avg }.

GET /getNPH

ResetTracker nether-per-hour statistics.

Parameters: name; hours (24); hoursBetween (2); liveOnly (false).

Response: NPH statistics object.

GET /deleteRun

Protected deletion of a pace run.

Parameters: runId; key: required query-string API key.

Response: { success: boolean }.

Note: GET endpoint retained for legacy clients.

POST /submitStats

Submit ResetTracker statistics for a run.

Parameters: JSON body: accessKey, gameData (JSON string), wallTime, playTime, seedsPlayed, resets, totalResets, netherTime.

Response: { status: "success" } or { status: "error", message }.

GET /searchPlayers

Search player nicknames and Twitch aliases.

Parameters: q: at least 2 characters; limit (8, max 20).

Response: Array of { id, name, displayName, color, bgColor }.

Rate limit: 120 requests per 60 seconds per client IP.

GET /getPlayerRuns

Paginated pace history for one UUID.

Parameters: uuid; beforeId + limit for cursor pagination, or page + pageSize (10, 25, 50, 100) + optional JSON filters for offset pagination.

Response: Cursor mode: { rows, nextCursor, hasMore, loadedCount }. Page mode: { rows, rowCount }.

Rate limit: 120 requests per 60 seconds per client IP.

GET /getAAPlayerRuns

Cursor-paginated All Advancements history for one UUID.

Parameters: uuid; beforeId: exclusive cursor; limit (25, max 100).

Response: { rows, nextCursor, hasMore, loadedCount }.

Rate limit: 120 requests per 60 seconds per client IP.

GET /../aa/api/getAllData

All Advancements export.

Parameters: days: 1, 7, 30, or 9999 (30).

Response: { data: [...] }.

Note: This route is prefixed with /stats/aa/api/, not /stats/api/.