Public API

Read-only endpoints for the leaderboard. All public GET endpoints are cache-friendly, DB-backed, and protected by IP-based rate limits.← Back to leaderboard

Endpoints

GET/api/leaderboard?limit=50&cursor=...
Returns up to 50 public leaderboard rows, stable sorting metadata, and a cursor for the next page.Rate limit: 60/min/IP, 1000/day/IP
Parameters
  • limit (integer)Number of rows, capped at 50
  • cursor (string)Opaque base64 cursor from previous page
Response fieldsversion, generatedAt, startingRank, nextCursor, data[]
GET/api/user/{login}
Looks up a connected GitHub login, returning rank and public profile fields when found.Rate limit: 20/min/IP, 200/day/IP
Parameters
  • login (string)GitHub username, case-insensitive, leading @ ignored
Response fieldsversion, generatedAt, found, data
GET/api/rank/{n}
Returns the user currently occupying rank n using the canonical leaderboard ordering.Rate limit: 20/min/IP, 200/day/IP
Parameters
  • n (integer)Positive integer rank
Response fieldsversion, generatedAt, found, data

Example Response

GET /api/leaderboard?limit=2

{
  "version": 8,
  "generatedAt": "2026-03-02T14:00:00.000Z",
  "startingRank": 1,
  "nextCursor": "eyJjb21taXRzIjoxMjM0LCJnaXRodWJJZCI6NDJ9",
  "data": [
    {
      "githubId": 12345,
      "login": "octocat",
      "name": "The Octocat",
      "avatarUrl": "https://avatars.githubusercontent.com/u/12345",
      "profileUrl": "https://github.com/octocat",
      "githubCreatedAt": "2011-01-25T18:44:36Z",
      "allTimeCommits": 15234,
      "lastUpdatedAt": "2026-03-01T12:00:00.000Z"
    }
  ]
}

Notes

  • The leaderboard is sorted by commits descending, then by numeric GitHub user ID ascending.
  • Login lookups are case-insensitive and normalize away a leading @ symbol.
  • Public GET routes return cache headers suitable for Cloudflare edge caching.
  • OAuth and session routes are never cached.
  • Source code is available from the repository link on the homepage.