iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://ergast.com/mrd/methods/laps
Lap Times – Ergast Developer API

Lap Times

Lap time data is available from the 1996 season onwards. Lap time queries require the season, round and lap number to be specified e.g:

http://ergast.com/api/f1/2011/5/laps/1

If the lap times for the specified race are not yet available the RaceTable element in the response will be empty.

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"
                },
                .
                .
              ]
            .
            .
          ]
        }
      ]
    }
  }
}

Back to documentation index

Comments

3 responses to “Lap Times”

  1. anuj chopra Avatar
    anuj chopra

    Hi,
    Is it possible to get the tyres data as well? Like which tyres was used in which lap? Or tyres_removed and tyres_fitted in the pitstop.
    Anuj

  2. Admin Avatar
    Admin

    Hi Anuj,
    Unfortunately, I don’t have access to that data.
    Cheers,
    Chris

  3. flavio1110@gmail.com Avatar

    Hey Chris, amazing work putting it together.
    I wonder if it’s possible to expose DNF and DNS on the race results.

    The status table gives information about why someone didn’t start or finish but doesn’t distinguish it.

    I didn’t find a way to differentiate between someone who didn’t start and someone who crashed before completing the first lap. E.g. 2023 Round 20 SAI DNS and HAM DNF crashing before finishing the fist lap.

    Also, on the pitstop data, do you have the actual time the mechanics worked? Excluding getting in and out the pitlane.

    Cheers,

Leave a Reply

Your email address will not be published. Required fields are marked *