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

Group: Players

Where the player ranks among the league’s players in one season, for every statistic: his figure, his place (players with the same figure share it), how many share it and how many are ranked. Pro and Business plans.

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

Note: statistic uses the keys of /v2/players/{id}/statistics. An empty list where the source ranks none (minor leagues, other sports).

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | our numeric id (positive integer) |
| `league` | query | yes | a league id from /v2/players/{id}/seasons |
| `season` | query | yes | a season id from /v2/leagues/{id}/seasons |
| `type` | query | no | statistics type, default overall |

## Response

- `data`: `PlayerStatRanking[]`
- `meta`: league, season, type, count
- Objects: PlayerStatRanking (https://sportsapi.app/markdown/en/reference.md#playerstatranking)

## Errors

- 403 history_not_in_plan — the season ended before your plan’s history
- 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/players/{id}/statistics/rankings?league=…&season=…"
```

TypeScript:

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

Python:

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

Go:

```go
res, err := client.Players.StatisticsRankings(ctx, id, &sportsapi.PlayersStatisticsRankingsParams{League: league, Season: season})
```

CLI:

```bash
$ sportsapi players statistics-rankings <id> --league <league> --season <season>
```

## Example response

```json
{ "data": [ { "statistic": "goals", "value": 3, "rank": 12, "tiedCount": 13, "playerCount": 454 },
    { "statistic": "expectedGoals", "value": 3.619, "rank": 9, "tiedCount": 1, "playerCount": 364 }, … ],
  "meta": { "league": 200001, "season": 200386, "type": "overall", "count": 79 } }
```

---

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