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

Group: Leagues

The best single-match figures of a league season: per statistic (football rating, goals, assists, xG, top speed, distance covered, key passes, saves, …; basketball points, rebounds, assists, …; ice hockey points, hits, saves, …) up to 10 players, each with the fixture it happened in and the figure. category narrows it to one statistic.

Plans: Pro and up (other plans get 403 endpoint_not_in_plan).

Note: category is the per-match statistic key — the one a lineup player’s statistics use (rating, goals, assists, kilometersCovered, topSpeed, keyPass, successfulDribbles, …), not the season leaderboards’ (averageRating, …). The order is the source’s, best first; for turnovers, errors leading to a goal and penalty misses that means the most. fixture is the whole Fixture (teams, score, start). Without type the season’s default is used (regularSeason in the NBA, NHL, …). Football, basketball and ice hockey have these lists; a league without them returns an empty array. Refreshed daily.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | our numeric id (positive integer) |
| `season` | query | yes | a season id from /v2/leagues/{id}/seasons |
| `type` | query | no | overall \| home \| away \| regularSeason \| playoffs. Default: the season’s own — overall where it has one (football), else regularSeason (NBA, NHL, …); meta.type says which was used |
| `category` | query | no | one statistic only, a key from the list (e.g. topSpeed) |

## Response

- `data`: `TopPerformancesCategory[]`
- `meta`: season, type (the one used), category (null = all), count (categories)
- Objects: TopPerformancesCategory (https://sportsapi.app/markdown/en/reference.md#topperformancescategory)

## Errors

- 400 bad_request — missing or invalid season, type not one of overall, home, away, regularSeason, playoffs, or a malformed category
- 404 not_found — season is not one of this league’s seasons

Plus the common errors (https://sportsapi.app/markdown/en/docs.md#errors).

## Request

cURL:

```bash
curl -H "Authorization: Bearer sk_live_…" \
    "https://api.sportsapi.app/v2/leagues/{id}/top-performances?season=…"
```

TypeScript:

```ts
const { data, meta } = await client.leagues.topPerformances(id, { season });
```

Python:

```python
res = client.leagues.top_performances(id, season=season)
```

Go:

```go
res, err := client.Leagues.TopPerformances(ctx, id, &sportsapi.LeaguesTopPerformancesParams{Season: season})
```

CLI:

```bash
$ sportsapi leagues top-performances <id> --season <season>
```

## Example response

```json
{ "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 } }
```

---

Base URL: https://api.sportsapi.app. Send your API key as `Authorization: Bearer <key>` on every /v2 request; keys are created in the dashboard (https://sportsapi.app/dashboard).
HTML: https://sportsapi.app/docs/leagues/top-performances · All docs: https://sportsapi.app/markdown/en/docs.md
