Skip to content

Livematches in play

Demo: Matchboard, opens in a new tab
Docs v2

Race sports

Race results

GET

/v2/races/{id}/results

All plans

View as MarkdownTry in Playground →

A race’s classification — in motorsport the main race session (the last of type race) with grid, pit stops, tyre stints, the set now fitted (currentTyre: compound, new or used), inPit, best laps and points. That session is named in meta.session, and inPit is true while the car sits in the pit lane during a running session. 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.

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.

Parameters

id

pathrequired

race id issued by DataSportsAPI, a positive integer

session

query

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

Response

meta
race, session (the session returned — in motorsport the main race session if none was requested; null means the race’s own table), count
errors
400 bad_request — session is invalid403 history_not_in_plan — your plan’s history does not reach back to the race’s start404 not_found — the id is not a race id, or the session belongs to a different race404 no_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 /v2 call can also come back with one of the common errors.

curl -H "Authorization: Bearer sk_live_…" \
    "https://api.datasportsapi.com/v2/races/{id}/results"
Example
{ "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 } }