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

Group: Players

Match-by-match ratings for a player across one league season, oldest first, forming the points of a rating graph; each point gives the match, its kick-off, the player’s side and the opponent.

Plans: Requires Pro, Business or Enterprise; a Free or Starter key receives 403 endpoint_not_in_plan.

Note: Values are the source’s football match ratings on a 0–10 scale. The array is empty if none of the player’s matches that season received a rating.

## 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 |

## Response

- `data`: `PlayerRating[]`
- `meta`: league, season, count
- Objects: PlayerRating (https://datasportsapi.com/markdown/reference.md#playerrating)

## Errors

- 403 history_not_in_plan — the season finished before your plan’s history window begins
- 404 not_found — the season id does not belong to this league

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}/ratings?league=…&season=…"
```

TypeScript:

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

Python:

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

Go:

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

CLI:

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

## Example response

```json
{ "data": [
    { "fixtureId": 701120, "startTime": "2026-09-19T14:00:00.000Z", "rating": 7.3, "side": "away", "opponent": { "id": 30, "name": "Brighton & Hove Albion", … } },
    { "fixtureId": 701233, "startTime": "2026-10-11T12:30:00.000Z", "rating": 7.2, "side": "home", "opponent": { "name": "Leeds United", … } }, … ],
  "meta": { "league": 195828, "season": 200386, "count": 7 } }
```

---

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/ratings/ · All docs: https://datasportsapi.com/markdown/docs.md · Data reference: https://datasportsapi.com/markdown/reference.md
