TeamsEndpoint 49 of 116
Team top players
https://api.datasportsapi.com/
- Plan
- Pro + Business
- Auth
Bearer dsa_live_…- Parameters
- 3 required · 4 optional
- Returns
TopPlayersCategory[]
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.
Plan access
Requires a Pro or Business plan; every other plan receives 403 endpoint_not_in_plan.
Worth knowing
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.
01Parameters
idpathRequiredDataSportsAPI team id, a positive integer
leaguequeryRequiredid of a league the team competes in (see /v2/teams/{id}/leagues)
seasonqueryRequiredseason id, as listed by /v2/leagues/{id}/seasons
typequeryOptionaloverall \| 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
categoryqueryOptionalrestricts 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
limitqueryOptionalnumber of entries in each leaderboard, 1–50 (defaults to 10)
pagequeryOptionalwhich block of limit entries to return, 0–49; the default 0 shows the leaders
02Request
The same call from the command line and each SDK. The SDK lines assume a client created with your key; left out, it is read from DATASPORTSAPI_API_KEY. Installing a client: SDKs & CLI.
curl -H "Authorization: Bearer dsa_live_…" \
"https://api.datasportsapi.com/v2/teams/{id}/top-players?league=…&season=…"03Response
The top-level keys of the JSON body. Each object links to its full shape in the data reference.
dataTopPlayersCategory[]meta- season, type (as applied), category (null means every category), limit, page, count (number of categories), hasNextPage
{ "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 } }04Errors
- 400
bad_requestleague or season is absent, or paging, type or category is invalid (the rules of /v2/leagues/{id}/top-players apply)
- 403
history_not_in_planthe season finished before your plan’s history window begins
- 404
not_foundthe season id does not belong to this league
unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code