Skip to main content

Get Leaderboard

This endpoint returns the user’s leaderboard ordered by total score.

The leaderboard aggregates all score history entries and calculates the total score for each user.

info

This endpoint is public.

HTTP Request

GET /api/v2/score/leaderboard/

Parameters

NameInTypeRequiredDescription
limitqueryintegerfalseNumber of results to return per page
offsetqueryintegerfalseThe initial index from which to return the results
searchquerystringfalseSearch by username, comment or reputation_context
user_idqueryintegerfalseFilter score entries by user id before aggregation
reputation_typequeryintegerfalseFilter score entries by reputation type
reputed_at_fromquerystring(datetime)falseFilter entries with reputed_at greater than or equal to this datetime
reputed_at_toquerystring(datetime)falseFilter entries with reputed_at lower than or equal to this datetime
exclude_manualquerybooleanfalseExclude manual reputation entries
exclude_resetquerybooleanfalseExclude reset reputation entries
orderingquerystringfalseOrdering field

Notes

  • The leaderboard is calculated using the sum of variation_points.
  • Filters are applied before aggregation.
  • Results are ordered by total_score descending by default.
  • search also supports filtering by reputation_context.

Example Request

curl -X GET "/api/v2/score/leaderboard/?reputation_type=10&reputed_at_from=2026-05-01T00:00:00Z&exclude_reset=true" \
-H "Accept: application/json"

Responses

StatusMeaningDescription
200OKSuccessful response

Response Schema

NameTypeDescription
countintegerTotal results count
nextstring(uri) or nullNext page url
previousstring(uri) or nullPrevious page url
resultsarrayLeaderboard results

Example Response

{
"count": 3,
"next": null,
"previous": null,
"results": [
{
"user_id": 123,
"user__username": "mario.rossi",
"user__real_name": "Mario Rossi",
"total_score": 150
},
{
"user_id": 124,
"user__username": "anna.bianchi",
"user__real_name": "Anna Bianchi",
"total_score": 120
},
{
"user_id": 125,
"user__username": "luca.verdi",
"user__real_name": "Luca Verdi",
"total_score": 95
}
]
}

Example Use Cases

Monthly leaderboard

GET /api/v2/score/leaderboard/?reputed_at_from=2026-05-01T00:00:00Z&reputed_at_to=2026-05-31T23:59:59Z

Contest leaderboard

GET /api/v2/score/leaderboard/?search=contest

Excluding manual adjustments

GET /api/v2/score/leaderboard/?exclude_manual=true