# GET /v2/leagues/{id}/player-statistics

Group: Leagues

The season’s player-statistics explorer (football): every player of the league, 20 a page, sorted by any statistic, with a group of columns — summary, attack, defense, passing, goalkeeping or other — and filters by position and team. Football leagues only: the source has no such explorer for other sports (checked 2026-10-28 on the NBA, NHL and EuroLeague), so their leagues answer 404 not_supported — use /v2/leagues/{id}/top-players for their season leaders.

Plans: Pro + Business only (other plans get 403 endpoint_not_in_plan).

Note: Keys are the season-statistic vocabulary (as in /v2/players/{id}/statistics); every row also carries appearances and minutesPlayed, and the order key when its group lacks it. Walk pages until hasNextPage is false (at most 50 pages = 1,000 players). For the top N of one statistic, /top-players is cheaper.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | our numeric id (positive integer) |
| `season` | query | yes | a season id from /v2/leagues/{id}/seasons |
| `group` | query | no | summary (default) \| attack \| defense \| passing \| goalkeeping \| other — which statistics each row carries |
| `order` | query | no | a season-statistic key to sort by (default averageRating; a 400 lists the allowed keys) |
| `direction` | query | no | desc (default) \| asc |
| `page` | query | no | page index, an integer 0–49 (default 0) |
| `position` | query | no | a comma list of goalkeeper, defender, midfielder, forward |
| `team` | query | no | a team id: only that team’s players |

## Response

- `data`: `PlayerStatisticsRow[]`
- `meta`: season, group, order, direction, page, position (the sorted list, or null), team, count, pageCount, hasNextPage
- Objects: PlayerStatisticsRow (https://sportsapi.app/markdown/en/reference.md#playerstatisticsrow)

## Errors

- 400 bad_request — missing season, unknown group, order, direction or position, page not 0–49, team not an id (the message names each offending parameter and what it takes: “invalid order (one of …)”)
- 403 history_not_in_plan — the season ended before your plan’s history
- 404 not_supported — not a football league
- 404 no_data — the source has no player statistics for that league, season (and team)
- 404 not_found — season is not one of this league’s seasons (the message names the parameter; list them with /v2/leagues/{id}/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}/player-statistics?season=…"
```

TypeScript:

```ts
const { data, meta } = await client.leagues.playerStatistics(id, { season });
for await (const page of client.leagues.playerStatisticsPages(id, { season })) { … }
```

Python:

```python
res = client.leagues.player_statistics(id, season=season)
for page in client.leagues.player_statistics_pages(id, season=season): ...
```

Go:

```go
res, err := client.Leagues.PlayerStatistics(ctx, id, &sportsapi.LeaguesPlayerStatisticsParams{Season: season})
for page, err := range client.Leagues.PlayerStatisticsPages(ctx, id, &sportsapi.LeaguesPlayerStatisticsParams{Season: season}) { … }
```

CLI:

```bash
$ sportsapi leagues player-statistics <id> --season <season>
$ sportsapi leagues player-statistics <id> --season <season> --all -o csv
```

## Example response

```json
{ "data": [ { "player": { "id": 1, "name": "Jack Hinshelwood", "slug": "jack-hinshelwood", "shortName": null, "image": "…" },
    "team": { "id": 2, "name": "Brighton & Hove Albion", "slug": "brighton-and-hove-albion", "shortName": "Brighton", "code": "BHA", "image": "…" },
    "statistics": { "goals": 3, "expectedGoals": 2.33, "successfulDribbles": 1, "tackles": 2, "assists": 0,
                    "accuratePassesPercentage": 85, "averageRating": 8.05, "appearances": 9, "minutesPlayed": 750 } }, … ],
  "meta": { "season": 200386, "group": "summary", "order": "averageRating", "direction": "desc", "page": 0, "position": null, "team": null,
            "count": 20, "pageCount": 23, "hasNextPage": true } }
```

---

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/player-statistics · All docs: https://sportsapi.app/markdown/en/docs.md
