To obtain a list of all drivers within a series, year or round use the following URLs:
http://ergast.com/api/f1/drivers
http://ergast.com/api/f1/2010/drivers
http://ergast.com/api/f1/2010/2/drivers
Each driver listed in the response is identified by a unique driverId which is used to identify the driver throughout the API. To obtain information about a particular driver append the driverId e.g:
http://ergast.com/api/f1/drivers/alonso
Driver lists can be refined by adding one or more of the following criteria:
/circuits/<circuitId>
/constructors/<constructorId>
/drivers/<driverId>
/grid/<position>
/results/<position>
/fastest/<rank>
/status/<statusId>
For example, to list all drivers who have driven for a specific constructor at a particular circuit:
http://ergast.com/api/f1/constructors/mclaren/circuits/monza/drivers
Alternatively, to list the drivers who have achieved a particular final position in the championship:
http://ergast.com/api/f1/driverStandings/1/drivers
Drivers who participated in the 2014 season onwards have a 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="8"> <DriverTable constructorId="mclaren" circuitId="monza"> <Driver driverId="alonso" code="ALO" url="http://en.wikipedia.org/wiki/Fernando_Alonso"> <PermanentNumber>14</PermanentNumber> <GivenName>Fernando</GivenName> <FamilyName>Alonso</FamilyName> <DateOfBirth>1981-07-29</DateOfBirth> <Nationality>Spanish</Nationality> </Driver> <Driver driverId="coulthard" code="COU" url="http://en.wikipedia.org/wiki/David_Coulthard"> <GivenName>David</GivenName> <FamilyName>Coulthard</FamilyName> <DateOfBirth>1971-03-27</DateOfBirth> <Nationality>British</Nationality> </Driver> <Driver driverId="rosa" code="DLR" url="http://en.wikipedia.org/wiki/Pedro_de_la_Rosa"> <GivenName>Pedro</GivenName> <FamilyName>de la Rosa</FamilyName> <DateOfBirth>1971-02-24</DateOfBirth> <Nationality>Spanish</Nationality> </Driver> . . . </DriverTable> </MRData>
JSON Example Response
{ "MRData": { "xmlns": "http://ergast.com/mrd/1.0", "series": "f1", "limit": "30", "offset": "0", "total": "8", "DriverTable": { "circuitId": "monza", "constructorId": "mclaren", "Drivers": [ { "driverId": "alonso", "permanentNumber": "14", "code": "ALO", "url": "http://en.wikipedia.org/wiki/Fernando_Alonso", "givenName": "Fernando", "familyName": "Alonso", "dateOfBirth": "1981-07-29", "nationality": "Spanish" }, { "driverId": "coulthard", "code": "COU", "url": "http://en.wikipedia.org/wiki/David_Coulthard", "givenName": "David", "familyName": "Coulthard", "dateOfBirth": "1971-03-27", "nationality": "British" }, { "driverId": "rosa", "code": "DLR", "url": "http://en.wikipedia.org/wiki/Pedro_de_la_Rosa", "givenName": "Pedro", "familyName": "de la Rosa", "dateOfBirth": "1971-02-24", "nationality": "Spanish" }, . . . ] } } }