Skip to content

Livematches in play

Demo: Matchboard, opens in a new tab
Docs v2

Teams

Team top players

GET

/v2/teams/{id}/top-players

Pro and up

View as MarkdownTry in Playground →

Season leaderboards limited to one team’s players within a league — highest-rated players, leading scorers, top assisters and so on — paginated like the league-wide leaderboards.

Response shape and pagination match /v2/leagues/{id}/top-players, filtered to this team’s players. An empty array means the source holds nothing for this team in that league season.

Parameters

id

pathrequired

DataSportsAPI team id, a positive integer

league

queryrequired

id of a league the team competes in (see /v2/teams/{id}/leagues)

season

queryrequired

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

type

query

overall | home | away | regularSeason | playoffs. 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

category

query

restricts the response to a single leaderboard, named by one of this season’s categories such as goals; an unrecognised value returns 400 listing the season’s categories

limit

query

number of entries in each leaderboard, 1–50 (defaults to 10)

page

query

which block of limit entries to return, 0–49; the default 0 shows the leaders

Response

meta
season, type (as applied), category (null means every category), limit, page, count (number of categories), hasNextPage
errors
400 bad_request — league or season is absent, or paging, type or category is invalid (the rules of /v2/leagues/{id}/top-players apply)403 history_not_in_plan — the season finished before your plan’s history window begins404 not_found — the season id does not belong to this league

Any /v2 call can also come back with one of the common errors.

curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/v2/teams/{id}/top-players?league=…&season=…"
Example
{ "data": [ { "category": "goals", "statistic": "goals", "players": [
      { "player": { "id": 3759, "name": "Bukayo Saka", … }, "team": { "id": 18, "name": "Arsenal", … }, "value": 3, "appearances": 7,
        "playedEnough": true, "statistics": { "goals": 3, "appearances": 7 } }, … ] }, … ],
  "meta": { "season": 200386, "type": "overall", "category": null, "limit": 10, "page": 0, "count": 26, "hasNextPage": true } }