Skip to main content

Get leaderboard for a puzzle

GET 

/api/v1/leaderboard

Retrieves a list of top plays for a specific puzzle, sorted by score and time. The endpoint supports both session-based and API token authentication.

Time Range Filtering

  • Use from (inclusive) and/or to (inclusive) to filter plays by submission time (ISO 8601 format).
  • If neither is provided, all plays are considered.
  • If only from is provided, plays from that time onwards are considered.
  • If only to is provided, plays up to that time are considered.
  • If both are provided, plays between from and to (inclusive) are considered.
  • Timestamps are rounded to the nearest second (contest mode) or minute (non-contest mode).

Use Cases:

  • Daily/Weekly Leaderboard: Filter plays for a specific day or week using from and to parameters. For example, get all plays submitted on January 15th, 2024.
  • Contest Completion: When a contest ends, use to parameter to freeze the leaderboard at the contest end time, ensuring no plays submitted after the contest are included.
  • Historical Analysis: Compare performance across different time ranges by using different from/to combinations.
  • Post-Contest Analysis: After a contest ends, analyze only contest submissions by combining contestSubmissionsOnly=true with the contest time window.

Request

Responses

A JSON object containing the leaderboard data.