Race sports
Race results
GET/v2/races/{id}/resultsAll plans
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.
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
id
our numeric id (positive integer)
session
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
- errors
- 400 bad_request — invalid session403 history_not_in_plan — the race started before your plan’s history404 not_found — not a race id, or a session of another race404 no_data — a duplicate copy under a second series (as /v2/races/{id}; error.series / error.race point to the real ones)
Every /v2 call can also answer the common errors.
$ curl -H "Authorization: Bearer sk_live_…" \ "https://api.sportsapi.app/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 } ], "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 } }