Skip to content
datasportsAPI

Race sportsRace results

Documentation

/

Type to filter the docs by title or path.

Race sportsEndpoint 93 of 116

Race results

GET

/v2/races/{id}/results

Plan
All plans
Auth
Bearer dsa_live_…
Parameters
1 required · 1 optional
Returns
RaceResult[]

Classification of a race.

In motorsport it is the main race session’s result — the last session of type race, named in meta.session — with grid positions, pit stops, tyre stints, the tyre set currently fitted (currentTyre: compound, new or used), inPit (true while the car sits in the pit lane during a running session), best laps and points.

For a cycling stage race it is the general classification, with every rider’s secondary classifications (points, mountains, young rider, jersey). Pass session= to get a single session instead (a practice, a qualifying, a stage) or a single qualifying part (Q1, Q2…).

Where our data source stores a knock-out qualifying only part by part (MotoGP), we merge the parts into the series’ own ranking: the Q2 riders first in their Q2 order, then the Q1 riders who did not advance in their Q1 order, with the places counting on; every line states which part it comes from.

Worth knowing

  • state is one of classified, didNotFinish, didNotStart, disqualified or notClassified.
  • Anyone outside the classification has position null, and our data source may also skip a place.
  • timeMs holds the total time for a race or stage, or the best lap for practice and qualifying.
  • For lapped competitors (see lapsBehind), for those who are out and for classified riders whose time the source did not record (cycling), timeMs, gapMs and intervalMs are null.
  • tyreStints is filled for Formula 1 races only; cycling is null except on the overall result of a stage race.
  • Only a qualifying merged from its parts has part ("Q2", "Q1").
  • In that case timeMs / gapMs / intervalMs refer to that part (best lap, gap to the part’s fastest), lines without a time get position null, and until a part has finished its participants occupy its places (during Q2, riders eliminated in Q1 are ranked from 13th down).
  • Formula 1 qualifying comes as a table of its own, with part null.

01Parameters

  • idpathRequired

    race id issued by DataSportsAPI, a positive integer

  • sessionqueryOptional

    id of one of the race’s sessions (see /v2/races/{id}) or of a qualifying part listed under sessions[].parts

02Request

The same call from the command line and each SDK. The SDK lines assume a client created with your key; left out, it is read from DATASPORTSAPI_API_KEY. Installing a client: SDKs & CLI.

curl -H "Authorization: Bearer dsa_live_…" \
    "https://api.datasportsapi.com/v2/races/{id}/results"

03Response

The top-level keys of the JSON body. Each object links to its full shape in the data reference.

data
RaceResult[]
meta
race, session (the session returned — in motorsport the main race session if none was requested; null means the race’s own table), count
ObjectsRaceResult
Example response
{ "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 } ],
      "currentTyre": { "compound": "soft", "isNew": false }, "inPit": null,
      "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": [], "currentTyre": null, "inPit": null,
      "cycling": { "jersey": "general", "pointsPosition": 2, "points": 289, "mountainsPosition": 1, "mountainsPoints": 154,
                   "youngRiderPosition": null, "youngRiderTimeMs": null } }

04Errors

  • 400bad_request

    session is invalid

  • 403history_not_in_plan

    your plan’s history does not reach back to the race’s start

  • 404not_found

    the id is not a race id, or the session belongs to a different race

  • 404no_data

    this race is the duplicate entry kept under a second series (same behaviour as /v2/races/{id}); the genuine series and race are given in error.series / error.race

Any key can also meet401unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code