Skip to content

Livematches in play

Demo: Matchboard, opens in a new tab
Docs v2

Players

Season rankings

GET

/v2/players/{id}/statistics/rankings

Pro and up

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

id

pathrequired

DataSportsAPI player id, a positive integer

league

queryrequired

league id, as listed by /v2/players/{id}/seasons

season

queryrequired

season id, as listed by /v2/leagues/{id}/seasons

type

query

statistics type; overall when omitted

Response

meta
league, season, type, count
errors
403 history_not_in_plan — the season finished before your plan’s history window begins404 not_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 } }