# GET /v2/teams/{id}/races

Group: Teams

For race sports, how a driver or constructor finished in every race of one series season: a driver’s grid slot, position, points, race time and gap, or a constructor’s position, points and its drivers’ placings. Available since 2026-11-04.

Plans: Every plan, Free included.

Note: Races run oldest first. Each row reflects the weekend’s main race; sprint results live at /v2/races/{id}/results?session=. A driver who did not finish or start shows position null, a state such as didNotFinish / didNotStart / … and an outReason. The list is empty if the competitor took no part in that season.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | DataSportsAPI team id, a positive integer |
| `season` | query | yes | series season id, taken from /v2/teams/{id}/race-career or /v2/series/{id}/seasons |

## Response

- `data`: `TeamRaceResult[]`
- `meta`: season, count; historyFrom appears if your plan trimmed older races
- Objects: TeamRaceResult (https://datasportsapi.com/markdown/reference.md#teamraceresult)

## Errors

- 400 bad_request — the season parameter was not supplied
- 403 history_not_in_plan — all of the season’s races predate your plan’s history window
- 404 not_found — DataSportsAPI has never assigned this id

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/teams/{id}/races?season=…"
```

TypeScript:

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

Python:

```python
res = client.teams.races(id, season=season)
```

Go:

```go
res, err := client.Teams.Races(ctx, id, &datasportsapi.TeamsRacesParams{Season: season})
```

CLI:

```bash
$ dsa teams races <id> --season <season>
```

## Example response

```json
{ "data": [ { "race": { "id": 300512, "name": "USA GP", "round": 18, … }, "position": 1, "points": 25, "state": "classified", "outReason": null,
      "gridPosition": 1, "timeMs": 5716650, "gapMs": null, "drivers": [] }, … ],
  "meta": { "season": 300480, "count": 19 } }
```

---

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