Pit Stops

Pit stop data is available from the 2012 season onwards. Pit stop queries require a season and a round to be specified. To request all the pit stop data for a race use the following URL with the required year and round number:

http://ergast.com/api/f1/2011/5/pitstops

If the pit stop data for the specified race is not yet available the RaceTable element will be empty. To request the information for a specific stop add the stop number:

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

Pit stop queries can also include any of the following criteria:

/drivers/<driverId>
/laps/<lap number>

For example, to list all the pit stop data for a specific driver:

http://ergast.com/api/f1/2011/5/drivers/alonso/pitstops

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>
            <PitStopsList>
                <PitStop driverId="hamilton" stop="1" lap="1" time="12:42:02" duration="21.234"/>
                <PitStop driverId="alonso" stop="1" lap="1" time="12:42:02" duration="21.234"/>
                .
                .
                .
            </PitStopsList>
        </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",
          "PitStops": [
            {
              "driverId": "hamilton",
              "stop": "1",
              "lap":"1",
              "time": "1:42.678",
              "duration": "1:42.678"
            },
            {
              "driverId": "alonso",
              "stop": "1",
              "lap":"1",
              "time": "1:42.678",
              "duration": "1:42.678"
            },
            .
            .
            .          
          ]
        }
      ]
    }
  }
}

Back to documentation index

Comments

Leave a Reply

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