Skip to content
datasportsAPI

LeaguesTop match performances

Documentation

/

Type to filter the docs by title or path.

LeaguesEndpoint 76 of 116

Top match performances

GET

/v2/leagues/{id}/top-performances

Plan
Pro + Business
Auth
Bearer dsa_live_…
Parameters
2 required · 2 optional
Returns
TopPerformancesCategory[]

Record individual match performances in a league season.

For each statistic — in football goals, assists, rating, xG, key passes, saves, top speed, distance covered, …; in basketball points, rebounds, assists, …; in ice hockey points, hits, saves, … — you get up to 10 players, each with the value and the fixture in which it was achieved. Pass category to limit the response to one statistic.

Plan access

Requires a Pro or Business plan; every other plan receives 403 endpoint_not_in_plan.

Worth knowing

  • category takes a per-match statistic key, as found in a lineup player’s statistics (goals, assists, rating, keyPass, successfulDribbles, topSpeed, kilometersCovered, …) — not a season-leaderboard key such as averageRating.
  • Entries keep our data source’s ranking with the best at the top — and for missed penalties, turnovers and errors leading to a goal, the best is the highest count.
  • fixture contains the complete Fixture (teams, score, start).
  • If type is omitted, the season’s default applies (regularSeason for the NBA, NHL, …).
  • These lists exist for football, basketball and ice hockey; a league that has none returns an empty array.
  • Updated daily.

01Parameters

  • idpathRequired

    league id issued by DataSportsAPI, a positive integer

  • seasonqueryRequired

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

  • typequeryOptional

    overall \| home \| away \| regularSeason \| playoffs. When omitted, the season’s own default applies: overall if the season has it (football), otherwise regularSeason (NBA, NHL, …); meta.type reports the value used

  • categoryqueryOptional

    restricts the response to a single statistic key from the list (e.g. topSpeed)

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/leagues/{id}/top-performances?season=…"

03Response

The top-level keys of the JSON body. Each object links to its full shape in the data reference.

data
TopPerformancesCategory[]
meta
season, type (the value actually applied), category (null when every statistic is included), count (how many categories)
Example response
{ "data": [ { "category": "rating", "performances": [
      { "player": { "id": 3802, "name": "Bruno Fernandes", "image": "…", … },
        "fixture": { "id": 701102, "home": { "name": "Manchester United", … }, "away": { "name": "Ipswich Town", … },
                     "homeScore": { "current": 5, … }, "awayScore": { "current": 2, … }, "status": { "type": "finished", … }, … },
        "value": 10 }, … ] },
    { "category": "topSpeed", "performances": [ { "player": { "name": "Harvey Barnes", … }, "fixture": { … }, "value": 36.207 }, … ] }, … ],
  "meta": { "season": 200386, "type": "overall", "category": null, "count": 21 } }

04Errors

  • 400bad_request

    one of: season missing or invalid; type outside overall, home, away, regularSeason, playoffs; category malformed

  • 404not_found

    the season id does not belong to this league

Any key can also meet401unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code