# GET /v2/leagues/{id}/groups

Group: Leagues

A league season’s groups of its group stage — tennis round robins such as the ATP and WTA Finals (Group A, Group B …). Each group’s matches: /v2/leagues/{id}/groups/{groupId}/fixtures; every match also names its group in Fixture.group.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | our numeric id (positive integer) |
| `season` | query | yes | a season id from /v2/leagues/{id}/seasons |

## Response

- `data`: `LeagueGroup[]`
- `meta`: season, count
- Objects: LeagueGroup (https://sportsapi.app/markdown/en/reference.md#leaguegroup)

## Errors

- 403 history_not_in_plan — a season before your plan’s history
- 404 no_data — the season has no group stage

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

TypeScript:

```ts
const { data, meta } = await client.leagues.groups(id, { season });
```

Python:

```python
res = client.leagues.groups(id, season=season)
```

Go:

```go
res, err := client.Leagues.Groups(ctx, id, &sportsapi.LeaguesGroupsParams{Season: season})
```

CLI:

```bash
$ sportsapi leagues groups <id> --season <season>
```

## Example response

```json
{ "data": [ { "id": 1190101, "name": "Group A" }, { "id": 1190102, "name": "Group B" } ], "meta": { "season": 1184480, "count": 2 } }
```

---

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