Team top players
/
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.
Parameters
idpathrequired
DataSportsAPI team id, a positive integer
leaguequeryrequired
id of a league the team competes in (see /v2/teams/{id}/leagues)
seasonqueryrequired
season id, as listed by /v2/leagues/{id}/seasons
typequery
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
categoryquery
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
limitquery
number of entries in each leaderboard, 1–50 (defaults to 10)
pagequery
which block of limit entries to return, 0–49; the default 0 shows the leaders
Response
- data
TopPlayersCategory[]- 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)403history_not_in_plan— the season finished before your plan’s history window begins404not_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=…"{ "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 } }