Get map leaderboards

Audience: NadeoLiveServices

GET https://live-services.trackmania.nadeo.live/api/token/leaderboard/group/{groupUid}/map/{mapUid}/top?length={length}&onlyWorld={onlyWorld}&offset={offset}

Path parameters:

  • {groupUid} (string) The ID of the group/season *
  • {mapUid} (string) The UID of the map *

Query parameters:

  • {length} (integer) The number of records to retrieve
    Maximum: 100 Default: 5
  • {onlyWorld} (boolean) Whether to only retrieve records from the world leaderboard
  • {offset} (integer) The number of records to skip
    Default: 0

Gets records from a map's leaderboard.


Remarks:

  • The groupUid "Personal_Best" can be used to get the global leaderboard.
  • onlyWorld=true is required to retrieve more than the first five records. Without it, length and offset will have no effect.
  • This endpoint only allows you to read a leaderboard's first 10,000 records. The rest of the leaderboard is not available at this level of detail.
  • If a length higher than 100 is requested, the API will successfully return only the first 100 records.

Example request:

GET https://live-services.trackmania.nadeo.live/api/token/leaderboard/group/Personal_Best/map/ZJw6_4CItmVlRMPgELl4Q37Utw2/top?onlyWorld=true&length=10&offset=50

Example response:

{
  "groupUid": "Personal_Best",
  "mapUid": "ZJw6_4CItmVlRMPgELl4Q37Utw2",
  "tops": [
    {
      "zoneId": "301e1b69-7e13-11e8-8060-e284abfd2bc4",
      "zoneName": "World",
      "top": [
        {
          "accountId": "70febe5b-c279-4e1f-936f-0b02a0c6e757",
          "zoneId": "3020a27d-7e13-11e8-8060-e284abfd2bc4",
          "zoneName": "Norway",
          "position": 51,
          "score": 53156
        },
        ...
        {
          "accountId": "21029447-5895-4e1e-829c-14dedb4af788",
          "zoneId": "301f4e76-7e13-11e8-8060-e284abfd2bc4",
          "zoneName": "Olomoucký kraj",
          "position": 60,
          "score": 53181
        }
      ]
    }
  ]
}

If the groupUid is invalid, the response will be an empty object:

{}

If the map does not exist, the response will show an empty leaderboard:

{
  "groupUid": "Personal_Best",
  "mapUid": "ZJw6_4CItmVlRMPgELl4Q37Utw2_fake",
  "tops": [
    {
      "zoneId": "301e1b69-7e13-11e8-8060-e284abfd2bc4",
      "zoneName": "World",
      "top": []
    }
  ]
}