# GET /v2/players/{id}/statistics

Group: Players

Season totals and averages for a player within a single league — goals, minutes, averageRating, expected goals, passes, duels and more.

Plans: Every plan, Free included.

Note: Keys use the same vocabulary as match statistics: totalShots, shotsOnGoal, passes, averageRating, goalInvolvements, minutesPerGoal (omitted when the player has not scored), kilometersCovered (metersCovered / 1000) and so on. The data reference lists every football key with what it measures (season statistic keys). For football, ratingBreakdown shows how much shooting, passing, dribbling, defending and (goalkeepers only) goalkeeping added to the season rating; it is null when the source provides none.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | DataSportsAPI player id, a positive integer |
| `league` | query | yes | league id, as listed by /v2/players/{id}/seasons |
| `season` | query | yes | season id, as listed by /v2/leagues/{id}/seasons |
| `type` | query | no | a type the season offers according to /seasons (overall \| home \| away \| regularSeason \| playoffs); when omitted, the season’s native type applies — overall, otherwise regularSeason |

## Response

- `data`: `PlayerStatistics`
- `meta`: league, season, type (as applied)
- Objects: PlayerStatistics (https://datasportsapi.com/markdown/reference.md#playerstatistics)

## Errors

- 400 bad_request — league or season is absent, or type is something other than overall, home, away, regularSeason or playoffs
- 404 no_data — no statistics exist at the source for this combination of player, league, season and type (an id DataSportsAPI never assigned gives 404 not_found instead)
- 404 not_found — the season id does not belong to this league; the error message names the offending parameter, and /v2/leagues/{id}/seasons lists the valid ones

Plus the common errors (https://datasportsapi.com/markdown/docs.md#errors).

## Request

cURL:

```bash
curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/v2/players/{id}/statistics?league=…&season=…"
```

TypeScript:

```ts
const { data, meta } = await client.players.statistics(id, { league, season });
```

Python:

```python
res = client.players.statistics(id, league=league, season=season)
```

Go:

```go
res, err := client.Players.Statistics(ctx, id, &datasportsapi.PlayersStatisticsParams{League: league, Season: season})
```

CLI:

```bash
$ dsa players statistics <id> --league <league> --season <season>
```

## Example response

```json
{ "data": { "team": { "id": 4438, "name": "Manchester City", "slug": "manchester-city", "shortName": "Man City",
             "code": "MCI", "image": "…" },
    "statistics": { "appearances": 7, "minutesPlayed": 620, "goals": 8, "assists": 0, "averageRating": 7.93,
                    "totalShots": 27, "shotsOnGoal": 13, "expectedAssists": 0.91, … },
    "ratingBreakdown": { "shotValue": 0.46, "passValue": 0.12, "dribbleValue": 0.05, "defensiveValue": 0.02,
                         "goalkeeperValue": null } },
  "meta": { "league": 195828, "season": 200386, "type": "overall" } }
```

---

Base URL: https://api.datasportsapi.com. Authenticate each /v2 call with the header `Authorization: Bearer <key>` (secret keys begin with `sk_live_`).
HTML: https://datasportsapi.com/docs/players/statistics/ · All docs: https://datasportsapi.com/markdown/docs.md · Data reference: https://datasportsapi.com/markdown/reference.md
