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

Group: Leagues

Lists the groups of a league season’s group stage, such as the round-robin groups of the ATP and WTA Finals in tennis (Group A, Group B, …). Available since 2026-11-20.

Plans: Every plan, Free included.

Note: Take a group’s id to /v2/leagues/{id}/groups/{groupId}/fixtures for its matches. You rarely need this call to label a match: every fixture of a group stage already names its group in Fixture.group.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | league id issued by DataSportsAPI, a positive integer |
| `season` | query | yes | season id, as listed by /v2/leagues/{id}/seasons |

## Response

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

## Errors

- 403 history_not_in_plan — your plan’s history window begins after this season ended
- 404 no_data — the season is played without a group stage

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/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, &datasportsapi.LeaguesGroupsParams{Season: season})
```

CLI:

```bash
$ dsa 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.datasportsapi.com. Authenticate each /v2 call with the header `Authorization: Bearer <key>` (secret keys begin with `sk_live_`).
HTML: https://datasportsapi.com/docs/leagues/groups/ · Group: https://datasportsapi.com/markdown/docs/leagues.md · All docs: https://datasportsapi.com/markdown/docs.md · Data model: https://datasportsapi.com/markdown/reference.md
