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.

283 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.

  18. Admin says:

    Hi Patrick,
    Usually within 2 – 6 hrs, depending on the time zone and my availability.
    Cheers,
    Chris

  19. Luca says:

    Hello,
    Thanks for these awesome APIs!

    I have 2 questions:
    -I’m trying to get drivers and constructors for 2023, usually when they’re available?
    -Is it possible to have the drivers->constructors association before the start of the race?

    thanks in advance

  20. Admin says:

    Hi Luca,
    I’ve added provisional drivers and constructors – see here for details: http://ergast.com/mrd/drivers-and-constructors-for-2023/
    Unfortunately, there isn’t an easy way to associate drivers with constructors until after the first race due to the structure of the database (the driver/constructor relationships are established by entries in the results table)
    Cheers,
    Chris

  21. Davide says:

    Hi, is it possible to integrate this api in an android free app with ads?
    I dont know if is a commercial use.
    Thanks

  22. Admin says:

    Hi Davide,
    That’s fine – add funded websites are permitted so I guess apps are too – I’ll clarify the Terms & Conditions.
    Cheers,
    Chris

  23. Kimbo says:

    Does anyone know where i can see the specific driverIds? Seems to be the last name, however in case of “Mick Schumacher” i dont get a result.

  24. Admin says:

    Hi Kimbo,
    One way to find driver IDs is to make a query using the Query Database page. For Mick Schumacher the ID is: mick_schumacher
    Cheers,
    Chris

  25. ixtrunai says:

    Hi, I´m not sure if time schedules for 2023 calendar are OK.

    Checking with the official F1 site, seems to be different.
    https://www.formula1.com/en/racing/2023/Bahrain.html

  26. Admin says:

    Hi ixtrunai,
    Thanks for the warning. I updated the schedule but further changes may be required in the future as the official schedule is often amended.
    Cheers,
    Chris

  27. eug8 says:

    Hello,

    just curious, what is the source of truth of the ergast data?

    Cheers,
    Eug8.

  28. Admin says:

    Hi Eug8,
    Historical data came from helpful contributors and sites such as Wikipedia. More recent data comes from wherever I can find it at the time.
    Cheers,
    Chris

  29. Cyril says:

    Hello Chris,

    I really like the Laps timetable. I did not check during the last grand-prix but was it updated in some sort of real-time during the race?
    I doubt but just asking. If so, what would be the best call to get current race leaders?

    Or maybe it’s just not doable with Ergast API.

    Thanks again for all this data, really appreciated it, just donated!
    Cheers,
    Cyril

  30. Andrew says:

    Hello Chris,

    I am building an API and need to know every track that has ever been raced on. Is there a way I can see all the circuit ids? The only one I know right now is Monza.

    To sum it up I need to know all the circuit ids.

    Thanks,
    Andrew

  31. Savannah says:

    @Andrew, you should be able to find all the IDs and tags on the database images page: http://ergast.com/mrd/db/. I downloaded the CSV files and they’re all available in there.

    Thanks for your work on this API!

  32. Admin says:

    Hi Cyril,
    Unfortunately the API does not provide live data. All the lap data is usually uploaded 2-6 hours after the race.
    Cheers,
    Chris

  33. Admin says:

    Hi Andrew,
    You can see them all listed here: https://ergast.com/api/f1/circuits.json?limit=100
    Cheers,
    Chris

Add a Comment: