Standings
/
View as MarkdownTry in Playground →
League tables for a single season. With no extra parameters you get the one table marked primary for the season — the league table, or in a group stage the first group; meta.overall tells you whether it includes every team. Add group=all to get every table (conferences, divisions, groups), or type=home / type=away for a table built from home or away games alone.
Parameters
idpathrequired
league id issued by DataSportsAPI, a positive integer
seasonqueryrequired
season id, as listed by /v2/leagues/{id}/seasons
groupquery
pass all to get the season’s complete set of tables, typed StandingsGroup[]
typequery
which games count: overall (all of them; the default), home or away (only that side’s games); total, the old name for overall, keeps working for one more release
Response
- data
StandingsRow[] (default) | StandingsGroup[] (group=all)- meta
- season, type, source (upstream = taken from our data source, computed = derived by us from the fixtures), count (number of rows, or of tables with group=all); without group=all it also includes group (name of the table), groupCount (number of tables in the season), overall (true if the table includes every team), tieBreakRule, scoreUnit
- errors
- 400
bad_request— one of: season missing or invalid; a group value other than all; a type outside overall|home|away404no_data— this season lacks that table at the source (a home / away table it never publishes, say — except in basketball, ice hockey and American football, where we compute it); 404 not_found — DataSportsAPI never issued this id404not_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}/standings?season=…"{ "data": [ { "position": 1, "team": { "id": 4438, "name": "Manchester City", … },
"played": 7, "wins": 7, "draws": 0, "losses": 0, "overtimeWins": null, "overtimeLosses": null,
"scoresFor": 19, "scoresAgainst": 7, "scoreDifference": 12, "points": 21,
"winPercentage": null, "gamesBehind": null, "zone": "Champions League", "form": ["win", "win", "win", "win", "win"] }, … ],
"meta": { "season": 200386, "type": "overall", "source": "upstream", "group": "Premier League 26/27", "groupCount": 1,
"count": 20, "overall": true, "tieBreakRule": null, "scoreUnit": "goals" } }