LeaguesEndpoint 79 of 116
Player statistics explorer
https://api.datasportsapi.com/
- Plan
- Pro + Business
- Auth
Bearer dsa_live_…- Parameters
- 2 required · 6 optional
- Returns
PlayerStatisticsRow[]
A sortable player-statistics table for a football season: every player in the league, 20 per page, ordered by any statistic and returned with one column set — summary, attack, defense, passing, goalkeeping or other — with optional position and team filters.
Only football leagues are covered, because our data source offers no equivalent for other sports (checked against the NBA, NHL and EuroLeague on 2026-10-28); those leagues return 404 not_supported, and /v2/leagues/{id}/top-players serves their season leaders instead.
Plan access
Requires a Pro or Business plan; every other plan receives 403 endpoint_not_in_plan.
Worth knowing
Statistic keys follow the season-statistics naming of /v2/players/{id}/statistics. Every row always includes appearances and minutesPlayed, plus the sort key when the chosen group does not contain it. Page through until hasNextPage turns false; there are never more than 50 pages (1,000 players). For just the leaders in one statistic, /top-players is cheaper.
01Parameters
idpathRequiredleague id issued by DataSportsAPI, a positive integer
seasonqueryRequiredseason id, as listed by /v2/leagues/{id}/seasons
groupqueryOptionalsummary (default) \| attack \| defense \| passing \| goalkeeping \| other — selects the set of statistics returned on each row
orderqueryOptionalseason-statistic key used for sorting; defaults to averageRating, and an invalid key returns a 400 listing the accepted ones
directionqueryOptionaldesc (default) \| asc
pagequeryOptionalzero-based page number, an integer from 0 to 49 (0 if omitted)
positionqueryOptionalone or more of goalkeeper, defender, midfielder, forward, separated by commas
teamqueryOptionalteam id; restricts the rows to that team’s players
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/leagues/{id}/player-statistics?season=…"03Response
The top-level keys of the JSON body. Each object links to its full shape in the data reference.
dataPlayerStatisticsRow[]meta- season, group, order, direction, page, position (null, or the requested positions sorted), team, count, pageCount, hasNextPage
{ "data": [ { "player": { "id": 1, "name": "Jack Hinshelwood", "slug": "jack-hinshelwood", "shortName": null, "image": "…" },
"team": { "id": 2, "name": "Brighton & Hove Albion", "slug": "brighton-and-hove-albion", "shortName": "Brighton", "code": "BHA", "image": "…" },
"statistics": { "goals": 3, "expectedGoals": 2.33, "successfulDribbles": 1, "tackles": 2, "assists": 0,
"accuratePassesPercentage": 85, "averageRating": 8.05, "appearances": 9, "minutesPlayed": 750 } }, … ],
"meta": { "season": 200386, "group": "summary", "order": "averageRating", "direction": "desc", "page": 0, "position": null, "team": null,
"count": 20, "pageCount": 23, "hasNextPage": true } }04Errors
- 400
bad_requestseason is absent; group, order, direction or position is unrecognised; page is not 0–49; or team is not an id. The message lists every offending parameter with its accepted values, e.g. “invalid order (one of …)”, so all of them can be fixed in one go
- 403
history_not_in_planyour plan’s history window begins after this season ended
- 404
not_supportedonly football leagues are supported
- 404
no_dataour data source holds no player statistics for this league and season (or for the requested team)
- 404
not_foundthe season id does not belong to this league; the error message names the offending parameter, and /v2/leagues/{id}/seasons lists the valid ones
unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code