Lap Times
Lap time data is available from the 1996 season onwards. Lap time queries require a season and a round to be specified. To request all the lap times for a race use the following URL with the required year and round number:
http://ergast.com/api/f1/2011/5/laps
If the lap times for the specified race are not yet available the RaceTable element in the response will be empty. To request the information for a specific lap add the lap number:
http://ergast.com/api/f1/2011/5/laps/1
Lap timing queries can also include the following criteria:
/drivers/<driverId>
For example, to list all the lap timing data for a specific driver and lap:
http://ergast.com/api/f1/2011/5/drivers/alonso/laps/1
XML Example Response
<?xml version="1.0" encoding="utf-8"?>
<MRData xmlns="http://ergast.com/mrd-1.0" series="f1" limit="30" offset="0" total="66">
<RaceTable season="2011" round="5">
<Race season="2011" round="5" url="http://en.wikipedia.org/wiki/...">
<RaceName>Australian Grand Prix</RaceName>
<Circuit circuitId="albert_park" url="http://en.wikipedia.org/...">
<CircuitName>Albert Park Grand Prix Circuit</CircuitName>
<Location lat="-37.8497" long="144.968">
<Locality>Melbourne</Locality>
<Country>Australia</Country>
</Location>
</Circuit>
<Date>2008-03-16</Date>
<Time>04:30:00Z</Time>
<LapsList>
<Lap number="1">
<Timing driverId="hamilton" position="1" time="1:42.758"/>
<Timing driverId="alonso" position="2" time="1:43.332"/>
</Lap>
.
.
.
</LapsList>
</Race>
</RaceTable>
</MRData>
JSON Example Response
{
"MRData": {
"xmlns": "http://ergast.com/mrd/1.0",
"series": "f1",
"limit": "30",
"offset": "0",
"total": "22",
"RaceTable": {
"season": "2008",
"round": "1",
"Races": [
{
"season": "2008",
"round": "1",
"url": "http://en.wikipedia.org/wiki/2008_Australian_Grand_Prix",
"raceName": "Australian Grand Prix",
"Circuit": {
"circuitId": "albert_park",
"url": "http://en.wikipedia.org/wiki/Melbourne_Grand_Prix_Circuit",
"circuitName": "Albert Park Grand Prix Circuit",
"Location": {
"lat": "-37.8497",
"long": "144.968",
"locality": "Melbourne",
"country": "Australia"
}
},
"date": "2008-03-16",
"time": "04:30:00Z",
"Laps": [
{
"number": "1",
"Timings": [
{
"driverId": "hamilton",
"position": "1",
"time": "1:42.678"
},
{
"driverId": "alonso",
"position": "2",
"time": "1:43.223"
},
.
.
]
.
.
]
}
]
}
}
}