Skip to content
datasportsAPI

PlayersSeason rankings

Documentation

/

Type to filter the docs by title or path.

PlayersEndpoint 57 of 116

Season rankings

GET

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

Plan
Pro + Business
Auth
Bearer dsa_live_…
Parameters
3 required · 1 optional
Returns
PlayerStatRanking[]

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 and Business plans.

Plan access

Requires a Pro or Business plan; every other plan receives 403 endpoint_not_in_plan.

Worth knowing

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.

01Parameters

  • 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

  • typequeryOptional

    statistics type; overall when omitted

02Request

The same call from the command line and each SDK. The SDK lines assume a client created with your key; left out, it is read from DATASPORTSAPI_API_KEY. Installing a client: SDKs & CLI.

curl -H "Authorization: Bearer dsa_live_…" \
    "https://api.datasportsapi.com/v2/players/{id}/statistics/rankings?league=…&season=…"

03Response

The top-level keys of the JSON body. Each object links to its full shape in the data reference.

data
PlayerStatRanking[]
meta
league, season, type, count
Example response
{ "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 } }

04Errors

  • 403history_not_in_plan

    the season finished before your plan’s history window begins

  • 404not_found

    the season id does not belong to this league

Any key can also meet401unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code