Race sportsEndpoint 94 of 116
Race laps
https://api.datasportsapi.com/
- Plan
- Pro + Business
- Auth
Bearer dsa_live_…- Parameters
- 1 required · 1 optional
- Returns
RaceCompetitorLaps[]
Lap-by-lap progress of a race session: every driver’s position at the end of each lap (lap 0 is the starting grid), his tyre compound, his pit stops (recorded on the in-lap) and the lap on which he retired. Available on Pro and Business plans.
Plan access
Requires a Pro or Business plan; every other plan receives 403 endpoint_not_in_plan.
Worth knowing
Covers Formula 1 race sessions (verified on the 2026 Mexico GP). Sessions and series for which our data source has no lap chart — qualifying, practice, MotoGP — return an empty list. Lap times and gaps are not included; use /results for the timed classification.
01Parameters
idpathRequiredrace id issued by DataSportsAPI, a positive integer
sessionqueryOptionalwhich session to chart, by id from /v2/races/{id}; without it the main race session is used
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}/laps"03Response
The top-level keys of the JSON body. Each object links to its full shape in the data reference.
dataRaceCompetitorLaps[]meta- race, session (the session whose laps are shown), count
{ "data": [ { "competitor": { "id": 700001, "name": "Max Verstappen", "code": "VER", … }, "team": { "id": 700010, "name": "Red Bull Racing", … }, "number": 3,
"laps": [ { "lap": 0, "position": 5, "tyre": "medium", "pitStop": false, "retired": false },
{ "lap": 27, "position": 2, "tyre": "medium", "pitStop": true, "retired": false },
{ "lap": 28, "position": 5, "tyre": "soft", "pitStop": false, "retired": false }, …,
{ "lap": 71, "position": 1, "tyre": "soft", "pitStop": false, "retired": false } ] },
{ "competitor": { "name": "Fernando Alonso", … }, …, "laps": [ …, { "lap": 6, "position": null, "tyre": "soft", "pitStop": false, "retired": true } ] }, … ],
"meta": { "race": 812345, "session": 812350, "count": 22 } }04Errors
- 403
history_not_in_planyour plan’s history does not reach back to the race’s start
- 404
not_foundthe id is not a race id, or the session belongs to a different race
unauthorized429rate_limited429quota_exceeded500internal_errorEvery error code