Leagues
Top players
GET/v2/leagues/{id}/top-playersPro + Business
Season leaderboards: the top players per statistic (rating, goals, xG, assists, tackles, saves, … — up to 50 each at the source), paged: limit players per leaderboard (default 10), or one leaderboard with category.
Every leaderboard is cut to the same places: page 1 with limit 10 is places 11–20 in each. For the full top 50 of one statistic ask category=goals&limit=50 (one leaderboard, ~20 KB) instead of every leaderboard at once (football: 32 leaderboards, ~550 KB at 50 each). Categories vary by sport (football ~30; basketball points, rebounds, assists, …) and are named with the statistic keys (averageRating, goals, cleanSheets, goalInvolvements, …); statistic is the key in each entry’s statistics the board ranks (football mostConceded / leastConceded rank goalsConceded). Without type the season’s default is used (regularSeason in the NBA, NHL, …). A league, season or type without leaderboards returns an empty array.
Parameters
id
our numeric id (positive integer)
season
a season id from /v2/leagues/{id}/seasons
type
overall | home | away | regularSeason | playoffs. Default: the season’s own — overall where it has one (football), else regularSeason (NBA, NHL, …); meta.type says which was used
category
one leaderboard only (a category of this season, e.g. goals); unknown → 400 listing the season’s categories
limit
entries per leaderboard, 1–50 (default 10)
page
page of limit entries, 0–49 (default 0 = the leaders)
Response
- data
TopPlayersCategory[]- meta
- season, type (the one used), category (null = all), limit, page, count (categories), hasNextPage (some leaderboard has more after this page)
- errors
- 400 bad_request — missing or invalid season, type not one of overall, home, away, regularSeason, playoffs, limit outside 1–50, page outside 0–49, or an unknown category (the message lists the season’s categories)404 not_found — season is not one of this league’s seasons (the message names the parameter; list them with /v2/leagues/{id}/seasons)
Every /v2 call can also answer the common errors.
$ curl -H "Authorization: Bearer sk_live_…" \ "https://api.sportsapi.app/v2/leagues/{id}/top-players?season=…"
Example
{ "data": [ { "category": "goals", "statistic": "goals", "players": [ { "player": { "id": 3801, "name": "Erling Haaland", "image": "…", … }, "team": { "id": 4438, "name": "Manchester City", "code": "MCI", "image": "…", … }, "value": 8, "appearances": 7, "playedEnough": true, "statistics": { "goals": 8, "appearances": 7 } }, … ] }, { "category": "averageRating", "statistic": "averageRating", "players": [ … ] }, … ], "meta": { "season": 200386, "type": "overall", "category": null, "limit": 10, "page": 0, "count": 32, "hasNextPage": true } }