# GET /v2/agencies/{id}/season-stats

Group: Managers & referees

An agency’s players this season, each with his appearances and average rating, the best rating first, counted for his club (scope=club, the default) or for his national team (scope=national). Available since 2026-11-24.

Plans: Every plan, Free included.

Note: A player without a club has team null on the club list. Ratings are the source’s match ratings, averaged over the appearances shown. Each row includes the player's position (since 2026-11-25), null when the source has none.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | DataSportsAPI agency id, a positive integer |
| `scope` | query | no | club \| national; club when omitted |

## Response

- `data`: `AgencySeasonPlayer[]`
- `meta`: count
- Objects: AgencySeasonPlayer (https://datasportsapi.com/markdown/reference.md#agencyseasonplayer)

## Errors

- 400 bad_request — scope is neither club nor national
- 404 not_found — DataSportsAPI has never assigned this id

Plus the errors every /v2 call shares (https://datasportsapi.com/markdown/docs/errors.md).

## Request

cURL:

```bash
curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/v2/agencies/{id}/season-stats"
```

TypeScript:

```ts
const { data, meta } = await client.agencies.seasonStats(id);
```

Python:

```python
res = client.agencies.season_stats(id)
```

Go:

```go
res, err := client.Agencies.SeasonStats(ctx, id, &datasportsapi.AgenciesSeasonStatsParams{})
```

CLI:

```bash
$ dsa agencies season-stats <id>
```

## Example response

```json
{ "data": [ { "player": { "id": 868812, "name": "Vinícius Júnior", … }, "team": { "id": 4748, "name": "Brazil", … },
    "appearances": 5, "rating": 8 }, … ],
  "meta": { "count": 18 } }
```

---

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/people/agencies-season-stats/ · Group: https://datasportsapi.com/markdown/docs/people.md · All docs: https://datasportsapi.com/markdown/docs.md · Data model: https://datasportsapi.com/markdown/reference.md
