Race Results

To list the results for a specific race use the following URL with the required year and round number:

http://ergast.com/api/f1/2008/5/results

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

Results from the most recent race can always be obtained using the following static URL:

http://ergast.com/api/f1/current/last/results

Results can be filtered using one or more of the following criteria:

/circuits/<circuitId>
/constructors/<constructorId>
/drivers/<driverId>
/grid/<position>
/fastest/<rank>
/status/<statusId>

For example, to list all the results for a specific driver in a particular season:

http://ergast.com/api/f1/2008/drivers/alonso/results

Or to list all the results for a specific driver when driving for a particular constructor:

http://ergast.com/api/f1/drivers/alonso/constructors/renault/results

If you are only interested in results in a specific finishing position you can add a qualifier:

http://ergast.com/api/f1/2008/drivers/alonso/results/2

So to list all drivers and constructors winning races in a season:

http://ergast.com/api/f1/2008/results/1

The value of the position attribute in the Result element is always an integer, giving the finishing order of all drivers. The value of the positionText attribute is either an integer (finishing position), “R” (retired), “D” (disqualified), “E” (excluded), “W” (withdrawn), “F” (failed to qualify) or “N” (not classified). Further information is given by the status element. A grid position value of ‘0’ indicates the driver started from the pit lane.

Fastest Lap Times

Fastest lap times are included from the 2004 season onwards. To obtain the results for the driver who achieves the fastest lap in a race use:

http://ergast.com/api/f1/2010/1/fastest/1/results

The <rank> value refers to how the fastest lap for each driver is ranked in relation to those of other drivers.

Driver Numbers

Drivers who participated in the 2014 season onwards have a permanent driver number. For these drivers there is a corresponding field in the Driver element. However, this may differ from the value of the number attribute of the Result element in earlier seasons or where the reigning champion has chosen to use “1” rather than his permanent driver number.

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="22">
    <RaceTable season="2008" round="1">
        <Race season="2008" round="1" 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>
            <ResultsList>
                <Result number="22" position="1" positionText="1" points="10">
                    <Driver driverId="hamilton" code="HAM" url="http://...">
                        <PermanentNumber>44</PermanentNumber>
                        <GivenName>Lewis</GivenName>
                        <FamilyName>Hamilton</FamilyName>
                        <DateOfBirth>1985-01-07</DateOfBirth>
                        <DriverNationality>British</DriverNationality>
                    </Driver>
                    <Constructor constructorId="mclaren" url="http://...">
                        <Name>McLaren</Name>
                        <Nationality>British</Nationality>
                    </Constructor>
                    <Grid>1</Grid>
                    <Laps>58</Laps>
                    <Status statusId="1">Finished</Status>
                    <Time millis="5690616">1:34:50.61</Time>
                    <FastestLap rank="2" lap="39">
                        <Time>1:27.452</Time>
                        <AverageSpeed units="kph">218.300</AverageSpeed>
                    </FastestLap>
                </Result>
                <Result number="3" position="2" positionText="2" points="8">
                    <Driver driverId="heidfeld" code="HEI" url="http://...">
                        <GivenName>Nick</GivenName>
                        <FamilyName>Heidfeld</FamilyName>
                        <DateOfBirth>1977-05-10</DateOfBirth>
                        <Nationality>German</Nationality>
                    </Driver>
                    <Constructor constructorId="bmw_sauber" url="http://...">
                        <Name>BMW Sauber</Name>
                        <Nationality>German</Nationality>
                    </Constructor>
                    <Grid>5</Grid>
                    <Laps>58</Laps>
                    <Status statusId="1">Finished</Status>
                    <Time millis="5696094">+5.478</Time>
                    <FastestLap rank="3" lap="41">
                        <Time>1:27.739</Time>
                        <AverageSpeed units="kph">217.586</AverageSpeed>
                    </FastestLap>
                </Result>
                .
                .
                .
            </ResultsList>
        </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",
          "Results": [
            {
              "number": "22",
              "position": "1",
              "positionText": "1",
              "points": "10",
              "Driver": {
                "driverId": "hamilton",
                "permanentNumber": "44",
                "code": "HAM",
                "url": "http://en.wikipedia.org/wiki/Lewis_Hamilton",
                "givenName": "Lewis",
                "familyName": "Hamilton",
                "dateOfBirth": "1985-01-07",
                "nationality": "British"
              },
              "Constructor": {
                "constructorId": "mclaren",
                "url": "http://en.wikipedia.org/wiki/McLaren",
                "name": "McLaren",
                "nationality": "British"
              },
              "grid": "1",
              "laps": "58",
              "status": "Finished",
              "Time": {
                "millis": "5690616",
                "time": "1:34:50.616"
              },
              "FastestLap": {
                "rank": "2",
                "lap": "39",
                Time: {
                  "time": "1:27.452"
                },
                "AverageSpeed": {
                  "units": "kph"
                  "speed": "218.300"
                }
              }
            },
            .
            .
            .
          ]
        }
      ]
    }
  }
}

Back to documentation index