Entity Types
The leaderboard ranks one of three entity types at a time:
| Type | Description |
|---|---|
contributor | Individual GitHub users (default) |
repository | Repositories within the org |
team | GitHub teams within the org |
Select the entity type via the toggle in the leaderboard UI or the entityType query param.
Scope Types
A leaderboard can be scoped to three levels:
| Scope | Description | Parameter |
|---|---|---|
organization | All data across the org (default) | — |
team | Filtered to a specific team | teamSlug |
repository | Filtered to a specific repo | owner/repo |
Team-scoped leaderboards show contributors/repos/sub-teams that belong to that team. Repository-scoped leaderboards show contributors to that specific repo.
Time Periods
Six built-in time periods:
| Value | Description |
|---|---|
today | Current calendar day |
week | Current calendar week |
month | Current calendar month |
quarter | Current calendar quarter |
half_year | Last 6 months |
all_time | No date filter |
Custom Date Ranges
Pass from and to as ISO 8601 date strings to score a custom window. Custom ranges are computed directly from the signals table — no GitHub API calls are made for custom date queries.
GET /api/[org]/leaderboard/score?from=2025-01-01&to=2025-03-31Scoring Presets
Scoring presets define which signals contribute to the score and at what weight. The preset editor is at /[organization]/leaderboards/scoring.
- View mode: see the active preset’s weights.
- Edit mode: adjust signal weights and save a new preset.
The active preset is applied on the next leaderboard computation. Changing a preset does not automatically recompute past scores.
Sync and Refresh
Manual Sync
Trigger a re-ingest via:
POST /api/[org]/leaderboard/syncReturns 429 if called within the 24-hour cooldown window. The cooldown is per-organization and is tracked in ingest_state.
Background Refresh
When a leaderboard request is served from cache, a background refresh may run via after(). Stale data is returned immediately while the refresh happens asynchronously. The client-side force-refresh mechanism does not bypass server-controlled cooldowns — force-refresh headers are ignored by the server.
Score and Recompute Routes
| Route | Method | Purpose |
|---|---|---|
/api/[org]/leaderboard/score | GET or POST | Serve scored leaderboard |
/api/[org]/leaderboard/recompute | POST | Wipe and recompute from scratch |
/api/[org]/leaderboard/sync | POST | Trigger ingest only |
The score and recompute routes have maxDuration = 300 and require Vercel Pro.