Skip to content
API v2 docs

Teams

Team statistic ranks

GET

/v2/teams/{id}/statistics/ranks

All plans

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).

The keys match those of /v2/teams/{id}/statistics (in basketball: points, rebounds, fieldGoalPercentage, netRating, …). teamCount says how many teams were ranked.

Parameters

id

pathrequired

DataSportsAPI team id, a positive integer

league

queryrequired

league id — for example, the league of one of the team’s fixtures

season

queryrequired

season id, as listed by /v2/leagues/{id}/seasons

type

query

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 ended404 no_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=…"
Example
{ "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" } }