FAQ

Ask additional questions using the comments box.

How do the current, last and next shortcuts behave?

For the purposes of the API, a season is assumed to begin when results become available for the first race of the season. This transition will be seen if the <season> field in URLs is set to "current".

In a similar way, the changeover point for the "last" and "next" round shortcuts occurs when a new set of race results become available. After the last race of a season the URL:

http://ergast.com/current/next/...

will refer to the first race of the following season.

Is there any restriction on how qualifiers can be combined?

A query can include any combination of the following qualifiers unless otherwise stated:

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

For example:

/drivers/alonso/constructors/renault/results/1

The order of the qualifiers has no effect except that the last one determines the result type.

Season, Driver, Constructor and Standings queries can include the following qualifiers, subject to certain restrictions:

/constructorStandings/<position>
/driverStandings/<position>

The last qualifier in a query determines the type of data returned.

What happens if a round is not specified?

For Standings queries and queries which include a standings qualifier the round value defaults to the last round of each season (i.e. the final standings). Otherwise a query covers all rounds of a season.

What is the purpose of the attributes in the table elements?

All responses contain a table of some kind. The attributes of the table element define the scope of the table and reproduce the criteria specified in the original query. If a specific attribute is omitted the scope concerns all entities of that type e.g. if there is no driverId attribute the scope of the table is all drivers who match the specified criteria.

How soon after a race will data become available?

Usually in 2 – 6 hrs.

267 Responses to “FAQ”

  1. Fabian says:

    Hi Chris,

    pretty sure, i checked the code twice and i didn’t file for years. I only filter for statusId’s.
    I can sent you the code as an email if you want (as Markdown or HTML).

  2. Admin says:

    Hi Fabian,
    But Grosjean did not compete in Formula One in 2021.
    Chris

  3. Fabian says:

    Hi Chris,
    my bad, I meant the 2020 accident he had, mixed up the years sorry for that.
    But stillt the last time a driver suffered a injury according to the tables I get was 2011.

  4. Admin says:

    Hi Fabian,
    No worries. AFAICT a status set to “Injury” usually indicates the driver was unable to start a race due to his state of health e.g. Patrick Tambay in the 1982 Swiss Grand Prix. It is not usually used when the driver suffers an injury during a race due to a collision.
    Cheers,
    Chris

  5. Fabian says:

    Hi Chris,

    this explains a lot, I couldn’t find anything on the internet when which statusId is used, do you have any source where I can find it? Let me guess crashes with injury to the driver are only listed as accident am I right?

  6. Admin says:

    Hi Fabian,
    > Let me guess crashes with injury to the driver are only listed as accident am I right?
    Yes, or “Collision”.
    Cheers,
    Chris

  7. julesg says:

    Hello, how can I get with python, the race result (only the players and positions) in a text file ?

  8. Albe says:

    Hi,
    I think Zhou is impossible to find with the command :
    query_driver(driverid = ‘zhou’)

    Thanks

  9. Admin says:

    Hi Jules,
    There are a couple of Python wrappers for the API listed on the Development Tools page. They would be a good starting point.
    Cheers,
    Chris

  10. Admin says:

    Hi Albe,
    I don’t recogise the query – what software are you using? The API query is https://ergast.com/api/f1/drivers/zhou and that seems ok.
    Cheers,
    Chris

  11. Andy says:

    Hi,

    I’m trying to request all race entries for a particular driver: (‘http://ergast.com/api/f1/drivers/{chosen driver}/results’)

    Via the website this works fine, but when I try to make an API request for the data, I can only get the first page of results to play with. Any suggestions?

  12. Admin says:

    Hi Andy,
    Have you tried using the limit and offset query parameters?
    e.g. https://ergast.com/api/f1/drivers/alonso/results.json?limit=100&offset=100
    Details are on the main documentation page under “Response paging”.
    Cheers,
    Chris

  13. Alejandro Rodriguez says:

    Do you have plans to provide data from practices?

  14. julesg says:

    Hello,

    I’ve been trying to retrieve data in SwiftUI for several months and I can’t manage to match the structure of the results with my app. Someone can help me it would save my project !

  15. Admin says:

    Hi Alejandro,
    I’ve never covered practice data because I’m always working on practice days unfortunately.
    Cheers,
    Chris

  16. Admin says:

    Hi Jules,
    Can you dump JSON data to the console? Paste the results here.
    Chris

  17. Patrick says:

    How soon after qualifying is over does this database update? I live in the U.S. and always watch races after they’ve happened, so I’m attempting to create a sort of spoiler free stats page for myself that has info up to qually but no further.

Add a Comment: