PlayersEndpoint 57 of 116
Season rankings
https://api.datasportsapi.com/
- 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
idpathRequiredDataSportsAPI player id, a positive integer
leaguequeryRequiredleague id, as listed by /v2/players/{id}/seasons
seasonqueryRequiredseason id, as listed by /v2/leagues/{id}/seasons
typequeryOptionalstatistics 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.
dataPlayerStatRanking[]meta- league, season, type, count
{ "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
- 403
history_not_in_planthe season finished before your plan’s history window begins
- 404
not_foundthe season id does not belong to this league
unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code