Team statistic ranks
/
Markdown copyOpen in the playground →
How a team’s season statistics compare with the rest of its league: for every statistic, the value plus the team’s rank on the season total and on the per-game figure (NBA, NFL and other leagues our data source ranks).
Parameters
idpathrequired
DataSportsAPI team id, a positive integer
leaguequeryrequired
league id — for example, the league of one of the team’s fixtures
seasonqueryrequired
season id, as listed by /v2/leagues/{id}/seasons
typequery
overall | home | away | regularSeason | playoffs | mainDraw (a tennis tournament’s main draw). When omitted, the season’s native type applies: overall if the season has one (football), otherwise regularSeason (NBA, NHL, …); meta.type reports the one applied
Response
- meta
- league, season, type (as applied)
- errors
- 403
history_not_in_plan— your plan’s history window begins after this season ended404no_data— our data source has no ranking of this team’s statistics for that league and season
The errors every /v2 call shares (key, plan, quota, rate) are listed under error codes.
curl -H "Authorization: Bearer sk_live_…" \
"https://api.datasportsapi.com/v2/teams/{id}/statistics/ranks?league=…&season=…"{ "data": { "teamCount": 30, "matches": 15, "ranks": { "points": { "value": 1642, "rank": 21, "rankPerGame": 25 }, "rebounds": { "value": 705, "rank": 9, "rankPerGame": 3 }, … } },
"meta": { "league": 132, "season": 100772, "type": "regularSeason" } }