Skip to content
datasportsAPI

TeamsTeam top players

Documentation

/

Type to filter the docs by title or path.

TeamsEndpoint 49 of 116

Team top players

GET

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

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

  • 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

  • typequeryOptional

    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

  • categoryqueryOptional

    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

  • limitqueryOptional

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

  • pagequeryOptional

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

data
TopPlayersCategory[]
meta
season, type (as applied), category (null means every category), limit, page, count (number of categories), hasNextPage
Example response
{ "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

  • 400bad_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 begins

  • 404not_found

    the season id does not belong to this league

Any key can also meet401unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code