Season rankings
GET
/
View as MarkdownTry in Playground →
For every statistic, shows how the player compares with the rest of the league in one season: their value, their place (tied values share a place), how many players are tied there and how many are ranked in total. Available on Pro, Business and Enterprise plans.
statistic takes its keys from /v2/players/{id}/statistics. Returns an empty list when the source ranks nobody, as in minor leagues and other sports.
Parameters
idpathrequired
DataSportsAPI player id, a positive integer
leaguequeryrequired
league id, as listed by /v2/players/{id}/seasons
seasonqueryrequired
season id, as listed by /v2/leagues/{id}/seasons
typequery
statistics type; overall when omitted
Response
- data
PlayerStatRanking[]- meta
- league, season, type, count
- errors
- 403
history_not_in_plan— the season finished before your plan’s history window begins404not_found— the season id does not belong to this league
Any /v2 call can also come back with one of the common errors.
curl -H "Authorization: Bearer sk_live_…" \
"https://api.datasportsapi.com/v2/players/{id}/statistics/rankings?league=…&season=…"Example
{ "data": [ { "statistic": "goals", "value": 3, "rank": 12, "tiedCount": 13, "playerCount": 454 },
{ "statistic": "expectedGoals", "value": 3.619, "rank": 9, "tiedCount": 1, "playerCount": 364 }, … ],
"meta": { "league": 200001, "season": 200386, "type": "overall", "count": 79 } }