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

Group: Race sports

The race’s classification — motorsport: the main race session’s (the last session of type race: grid, pit stops, tyres, best laps, points; meta.session names it); a cycling stage race: the general classification, with each rider’s side classifications (points, mountains, young rider, jersey) — or, with session=, one session’s (a practice, qualifying, a stage) or one qualifying part’s (Q1, Q2…). A knock-out qualifying the source keeps only per part (MotoGP) is assembled from its parts the way the series ranks it: the Q2 riders first in Q2 order, then the Q1 riders not promoted, in Q1 order, places continuing; each line names its part.

Note: state is classified, didNotFinish, didNotStart, disqualified or notClassified; position is null for a competitor out of the classification (the source can also leave a place out). timeMs is the total time (race, stage) or the best lap (practice, qualifying); timeMs, gapMs and intervalMs are null for the lapped (see lapsBehind) and the out, and for a classified rider the source recorded no time for (cycling). tyreStints: Formula 1 races only; cycling is null outside a stage race’s overall result. part ("Q2", "Q1") is set only on a qualifying assembled from its parts: timeMs / gapMs / intervalMs are then that part’s (best lap, gap to that part’s fastest); a line without a time has position null; while a part is not finished its entrants hold its places (during Q2 the riders out in Q1 rank 13th onwards). Formula 1 qualifying has its own table and part null.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | our numeric id (positive integer) |
| `session` | query | no | a session id from /v2/races/{id}, or a qualifying part id from its sessions[].parts |

## Response

- `data`: `RaceResult[]`
- `meta`: race, session (the one read — the main race session in motorsport when none is asked for; null = the race’s own table), count
- Objects: RaceResult (https://sportsapi.app/markdown/en/reference.md#raceresult)

## Errors

- 400 bad_request — invalid session
- 403 history_not_in_plan — the race started before your plan’s history
- 404 not_found — not a race id, or a session of another race
- 404 no_data — a duplicate copy under a second series (as /v2/races/{id}; error.series / error.race point to the real ones)

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/races/{id}/results"
```

TypeScript:

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

Python:

```python
res = client.races.results(id)
```

Go:

```go
res, err := client.Races.Results(ctx, id, &sportsapi.RacesResultsParams{})
```

CLI:

```bash
$ sportsapi races results <id>
```

## Example response

```json
{ "data": [ …,
    { "position": 2, "competitor": { "id": 700002, "name": "Charles Leclerc", … }, "team": { "id": 700010, "name": "Ferrari", … },
      "state": "classified", "outReason": null, "carNumber": 16, "gridPosition": 2, "startedFromPitLane": false,
      "laps": 62, "lapsBehind": null, "lapsLed": null, "pitStops": 2, "timeMs": 6128120, "gapMs": 7335, "intervalMs": 7335,
      "bestLapMs": 95202, "bestLapNumber": 41, "fastestLap": true, "points": 18,
      "tyreStints": [ { "compound": "soft", "laps": 24 }, { "compound": "medium", "laps": 15 }, { "compound": "soft", "laps": 23 } ],
      "cycling": null }, … ],
  "meta": { "race": 812345, "session": null, "count": 20 } }

// Cycling stage race (general classification):
    { "position": 1, "competitor": { "name": "Tadej Pogačar", … }, "team": { "name": "UAE Team Emirates", … }, "state": "classified",
      "timeMs": 266186000, "gapMs": null, …, "tyreStints": [],
      "cycling": { "jersey": "general", "pointsPosition": 2, "points": 289, "mountainsPosition": 1, "mountainsPoints": 154,
                   "youngRiderPosition": null, "youngRiderTimeMs": null } }
```

---

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