Player statistics explorer
/
View as MarkdownTry in Playground →
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.
Parameters
idpathrequired
league id issued by DataSportsAPI, a positive integer
seasonqueryrequired
season id, as listed by /v2/leagues/{id}/seasons
groupquery
summary (default) | attack | defense | passing | goalkeeping | other — selects the set of statistics returned on each row
orderquery
season-statistic key used for sorting; defaults to averageRating, and an invalid key returns a 400 listing the accepted ones
directionquery
desc (default) | asc
pagequery
zero-based page number, an integer from 0 to 49 (0 if omitted)
positionquery
one or more of goalkeeper, defender, midfielder, forward, separated by commas
teamquery
team id; restricts the rows to that team’s players
Response
- data
PlayerStatisticsRow[]- meta
- season, group, order, direction, page, position (null, or the requested positions sorted), team, count, pageCount, hasNextPage
- errors
- 400
bad_request— season 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 go403history_not_in_plan— your plan’s history window begins after this season ended404not_supported— only football leagues are supported404no_data— our data source holds no player statistics for this league and season (or for the requested team)404not_found— the season id does not belong to this league; the error message names the offending parameter, and /v2/leagues/{id}/seasons lists the valid ones
Any /v2 call can also come back with one of the common errors.
curl -H "Authorization: Bearer sk_live_…" \
"https://api.datasportsapi.com/v2/leagues/{id}/player-statistics?season=…"{ "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 } }