# GET /v2/leagues/{id}/team-of-the-week/periods

Group: Leagues

Every period in the season for which a team of the week exists, newest first — rounds in football and other round-based leagues, weeks in the NBA.

Plans: Every plan, Free included.

Note: An empty array means our data source picked no team of the week in that league and season. Any period id from this list works with /v2/leagues/{id}/team-of-the-week.

## 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`: `TeamOfTheWeekPeriod[]`
- `meta`: season, count
- Objects: TeamOfTheWeekPeriod (https://datasportsapi.com/markdown/reference.md#teamoftheweekperiod)

## Errors

- 403 history_not_in_plan — your plan’s history window begins after this season ended
- 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/leagues/{id}/team-of-the-week/periods?season=…"
```

TypeScript:

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

Python:

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

Go:

```go
res, err := client.Leagues.TeamOfTheWeekPeriods(ctx, id, &datasportsapi.LeaguesTeamOfTheWeekPeriodsParams{Season: season})
```

CLI:

```bash
$ dsa leagues team-of-the-week-periods <id> --season <season>
```

## Example response

```json
{ "data": [ { "id": 812604, "kind": "round", "sequence": 9, "round": 9, "roundName": "9", "from": null, "to": null,
      "publishedAt": "2026-11-03T08:32:39.000Z" },
    { "id": 812281, "kind": "round", "sequence": 8, "round": 8, … }, … ],
  "meta": { "season": 200386, "count": 9 } }

// NBA: weeks
{ "data": [ { "id": 812590, "kind": "week", "sequence": 2, "round": null, "roundName": null,
      "from": "2026-10-26T07:00:00.000Z", "to": "2026-11-02T07:00:00.000Z", "publishedAt": "2026-11-02T07:28:22.000Z" }, … ] }
```

---

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/team-of-the-week-periods/ · All docs: https://datasportsapi.com/markdown/docs.md · Data reference: https://datasportsapi.com/markdown/reference.md
