PlayersEndpoint 56 of 116
Player season statistics
https://api.datasportsapi.com/
- Plan
- All plans
- Auth
Bearer dsa_live_…- Parameters
- 3 required · 1 optional
- Returns
PlayerStatistics
Season totals and averages for a player within a single league — goals, minutes, averageRating, expected goals, passes, duels and more.
Worth knowing
Keys use the same vocabulary as match statistics: totalShots, shotsOnGoal, passes, averageRating, goalInvolvements, minutesPerGoal (omitted when the player has not scored), kilometersCovered (metersCovered / 1000) and so on.
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
typequeryOptionala type the season offers according to /seasons (overall \| home \| away \| regularSeason \| playoffs); when omitted, the season’s native type applies — overall, otherwise regularSeason
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?league=…&season=…"03Response
The top-level keys of the JSON body. Each object links to its full shape in the data reference.
dataPlayerStatisticsmeta- league, season, type (as applied)
{ "data": { "team": { "id": 4438, "name": "Manchester City", "slug": "manchester-city", "shortName": "Man City",
"code": "MCI", "image": "…" },
"statistics": { "appearances": 7, "minutesPlayed": 620, "goals": 8, "assists": 0, "averageRating": 7.93,
"totalShots": 27, "shotsOnGoal": 13, "expectedAssists": 0.91, … } },
"meta": { "league": 195828, "season": 200386, "type": "overall" } }04Errors
- 400
bad_requestleague or season is absent, or type is something other than overall, home, away, regularSeason or playoffs
- 404
no_datano statistics exist at the source for this combination of player, league, season and type (an id DataSportsAPI never assigned gives 404 not_found instead)
- 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