Features

Developer API Access

Programmatic access to your server data via a REST API. Build custom integrations, bots, and dashboards.

Network plan required

What it does

Developer API Access gives you a REST API to query your server data programmatically. Use it to build custom Discord bots, overlay widgets, external dashboards, or any integration you can imagine.

Generating API Keys

API keys are managed from your Rankly dashboard.

  1. Navigate to Dashboard → API Keys
  2. Click “Generate New Key” and give it a label
  3. Copy the key immediately — it will not be shown again
  4. Keys can be revoked at any time from the same page

Authentication

Include your API key in the Authorization header as a Bearer token.

Authorization: Bearer rkly_your_api_key_here

Requests without a valid key will receive a 401 Unauthorized response. Revoked keys are rejected immediately.

Rate Limits

API requests are rate limited to 100 requests per minute per API key using a sliding window. Rate limit headers are included in every response.

X-RateLimit-RemainingNumber of requests remaining in the current window

When the limit is exceeded, you will receive a 429 Too Many Requests response with a retry_after_ms field indicating when to retry.

Available Endpoints

All endpoints are served under the /api/v1/ namespace and return JSON. CORS is enabled for all origins, so you can call these endpoints from browser-based applications.

GET/api/v1/leaderboard

Ranked player list with full stats. Supports sorting, pagination, and order.

sortkills | deaths | kdr | longest_shot | total_time | distance (default: kills)
orderasc | desc (default: desc)
pagePage number (default: 1)
per_pageResults per page, max 100 (default: 25)
curl -H "Authorization: Bearer rkly_..." \
  "https://rankly.gg/api/v1/leaderboard?sort=kdr&per_page=10"

{
  "data": [
    {
      "steamId": "76561198...",
      "displayName": "PlayerOne",
      "kills": 142,
      "deaths": 31,
      "kdr": 4.58,
      "favouriteWeapon": "M4A1",
      "longestShotM": 812,
      ...
    }
  ],
  "meta": { "serverId": "..." },
  "pagination": { "page": 1, "perPage": 10, "total": 384 }
}

GET/api/v1/kill-feed

Recent kill events with killer/victim details, weapon, distance, and bodypart data.

limitNumber of events, max 100 (default: 50)
curl -H "Authorization: Bearer rkly_..." \
  "https://rankly.gg/api/v1/kill-feed?limit=5"

{
  "data": [
    {
      "eventId": "evt_...",
      "killer": { "steamId": "76561198...", "name": "Sniper" },
      "victim": { "steamId": "76561198...", "name": "Target", "type": "player", "className": null },
      "weapon": "Mosin9130",
      "distanceMetres": 423,
      "isPvp": true,
      "bodypartHit": "head",
      "timestamp": "2026-04-01T14:30:00.000Z"
    }
  ],
  "meta": { "serverId": "..." }
}

GET/api/v1/players/:steamId

Full stats for an individual player by Steam ID. Returns all-time computed stats including combat, survival, social, and crafting metrics.

curl -H "Authorization: Bearer rkly_..." \
  "https://rankly.gg/api/v1/players/76561198012345678"

{
  "data": {
    "steamId": "76561198012345678",
    "displayName": "PlayerOne",
    "firstSeen": "2026-01-15T10:00:00.000Z",
    "lastSeen": "2026-04-01T18:45:00.000Z",
    "totalSessions": 87,
    "stats": {
      "kills": 142, "deaths": 31, "kdr": 4.58,
      "pvpKills": 98, "zombieKills": 312, "animalKills": 44,
      "favouriteWeapon": "M4A1", "longestShotM": 812,
      "totalTimeMins": 12480, "revivesPerformed": 15,
      ...
    }
  },
  "meta": { "serverId": "..." }
}

GET/api/v1/server/stats

Server-level aggregate statistics including total players, kills, deaths, sessions, and averages.

curl -H "Authorization: Bearer rkly_..." \
  "https://rankly.gg/api/v1/server/stats"

{
  "data": {
    "totalPlayers": 384,
    "totalKills": 12847,
    "totalDeaths": 9231,
    "totalSessions": 4562,
    "totalTimeMins": 892340,
    "totalDistanceKm": 45231,
    "totalStructuresPlaced": 2841,
    "avgKdr": "1.392",
    "avgSurvivalMins": "48.21"
  },
  "meta": { "serverId": "..." }
}

GET/api/v1/records

Server records (longest shot, highest KDR, most kills, etc.) with current and previous holders.

curl -H "Authorization: Bearer rkly_..." \
  "https://rankly.gg/api/v1/records"

{
  "data": [
    {
      "recordType": "longest_shot",
      "holderSteamId": "76561198...",
      "holderName": "Sniper",
      "value": 812,
      "achievedAt": "2026-03-20T16:30:00.000Z",
      "previousValue": 745,
      "previousHolder": "OldSniper"
    }
  ],
  "meta": { "serverId": "..." }
}

GET/api/v1/wipes

List of all wipe cycles for the server, ordered by most recent first.

curl -H "Authorization: Bearer rkly_..." \
  "https://rankly.gg/api/v1/wipes"

{
  "data": [
    {
      "id": "...",
      "wipeNumber": 3,
      "label": "Season 3",
      "startedAt": "2026-03-01T00:00:00.000Z",
      "endedAt": null
    },
    {
      "id": "...",
      "wipeNumber": 2,
      "label": "Season 2",
      "startedAt": "2026-01-15T00:00:00.000Z",
      "endedAt": "2026-02-28T23:59:59.000Z"
    }
  ],
  "meta": { "serverId": "..." }
}

Usage Logging

All API calls are logged and visible in your dashboard. Monitor which endpoints are being hit, track response times, and identify any unexpected access patterns. Each log entry records the endpoint, status code, and response time.

CORS Support

All v1 endpoints include CORS headers with Access-Control-Allow-Origin: *, so you can call them directly from browser-based JavaScript applications. OPTIONS preflight requests are handled automatically.

Availability

Developer API Access requires the Network plan. If your server is on a different plan, API requests will return 401 Unauthorized.