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?

Data is usually available 2 – 6 hours after the race, sprint or qualifying session.

Comments

344 responses to “FAQ”

  1. Admin Avatar
    Admin

    Hi Vishu,
    Unfortunately not. I don’t think the FIA publish it.
    Chris

  2. jose Avatar
    jose

    hello, great work done here.
    I am ussing this to test some python ADE machine learning.

    how is the pitstop time measured exactly? I don’t find it in the documentation.

    The shortest time I found is around 12000milliseconds, so I guess it takes not only the proper mechanic time (change of tyres, or pieces), but since the moment the car enters the boxes and it leaves?
    I guess there is no more accurate data.

    Also, when the times exceed the 20000 or 30000 ms, is it because of the red flags in that race?

    thanks a lot

  3. Mike Avatar
    Mike

    Hi there – love this API. Not able to find any information on things like safety cars, i.e. how many safety car periods per race. Does the API provide this?

    Thanks

  4. Jeffrey Avatar
    Jeffrey

    Im not that experienced in getting data with an API. I know how to request the data with Python, but I’m not sure if its the right way to do it. I saw that there we’re no laptimes for the race per driver in the CSV files. Whats the best way to request the laptimes data.

    I was thinking about this: https://ergast.com/api/f1/2023/5/laps?limit=1000

  5. Admin Avatar
    Admin

    Hi Jose,
    The pit stop timings are as published by the FIA and is the time in the pit lane. The long stops may be under red flags.
    Cheers,
    Chris

  6. Admin Avatar
    Admin

    Hi Mike,
    The database does not provide information about safety cars. I don’t think this is published by the FIA.
    Cheers,
    Chris

  7. Admin Avatar
    Admin

    Hi Jeffrey,
    That should be fine.
    Cheers,
    Chris

  8. Luc Avatar
    Luc

    Is it possible to get the lap times of each lap of sprint races? Can you share an example link?

  9. Elahe Avatar
    Elahe

    I only can get the response in xml format, is there any way to get json format instead?

  10. Nico Avatar
    Nico

    Hi Elahe, just add .json at the end of the url (but before any other parameters) as mentioned in the documentation.

    Examples:
    http://ergast.com/api/f1/constructors.json
    http://ergast.com/api/f1/constructors.json?limit=10&offset=0

  11. Disa Avatar
    Disa

    Hi, i was looking to the season list API and i was wandering what timezone is used for each race. it’s the same for each race or it change avery time?
    Thanks

  12. Admin Avatar
    Admin

    Hi Luc,
    Unfortunately we don’t support lap times in the sprint races.
    Cheers,
    Chris

  13. Admin Avatar
    Admin

    Hi Disa,
    The schedule uses UTC. This is indicated by the “Z” suffix.
    Cheers,
    Chris

  14. Jackson Avatar
    Jackson

    Hi admin,
    I use your API to run a small fantasy tracker for my friends and me. Do you track and record Driver of the Day, and if so where? I’d love to use it as a metric for score keeping.

    Thank you for upkeeping this resource. I’m a very amateur coder, and I never anticipated creating code around API to be this easy and seamless. I’ve learned a lot thanks to you, so thank you.

  15. Admin Avatar
    Admin

    Hi Jackson,
    Unfortunately I don’t record the Driver of the Day. Where is that reported?
    Cheers,
    Chris

  16. Jaco Avatar
    Jaco

    Good Day,

    Thank you for the awesome API’s. If i run the API in the following format it doesn’t filter https://ergast.com/api/f1/drivers.json?alonso

    What is the correct format to filter specific data with the .json extension.

    Regards
    Jaco

  17. Admin Avatar
    Admin

    Hi Jaco,
    The .json always goes afterwards (followed by paging parameters if required)
    http://ergast.com/api/f1/drivers/alonso.json
    Cheers,
    Chris

  18. Jeff Avatar
    Jeff

    Good Day,

    First I want to thank you for making this data available to work and “play” with. I’m working from the .csv bundle and working in R.

    In review of the data, I’m trying to correspond the starting position of a particular driver in a particular race. I believe I’m going to join qualifying and results and lap_times at different times depending on what questions I want to answer and display.

    There are some instances where the result in “qualifying->position” and the result in “results->grid” are not a match. In my cursory inspection, so far those that do not match differ by 5 or 10 places (race IDs 19 and 25 for example).

    Would these be grid penalties? Would there be any indication in one of the tables that a grid penalty was applied?

    Again, thank you for making this data available.

  19. Flavio Avatar
    Flavio

    Hello Admin,
    very good job. Well done!
    I found the query limit is 1000, isn’t it? Is it possible to exceed that limit?
    Thanks!

    Regards,
    Flavio

  20. Admin Avatar
    Admin

    Hi Jeff,
    If the qualifying positions and grid positions are different then it’s usually a penalty.
    Chris

  21. Admin Avatar
    Admin

    Hi Flavio,
    No, you cannot exceed the limit. Ideally you should use much smaller limit values because large values are likely to be slow and use a lot of server memory.
    Cheers,
    Chris

  22. Pablo Avatar
    Pablo

    I’ve noticed that there are some qualys (2001 season) with no data. Is there another way to get this data?

  23. Admin Avatar
    Admin

    Hi Pablo,
    If you check the documentation page you’ll see that Qualifying results are only fully supported from the 2003 season onwards.
    Cheers,
    Chris

  24. Eric Fiselier Avatar
    Eric Fiselier

    The race times for the Qatar grand prix are off. What’s the best way to get those corrected?

  25. Rubén Avatar
    Rubén

    Hi,
    I am doing my final Bootcamp project with your API.
    I see you’ve deposed her and I wanted to know if the 2024 season data will be updated, at least.
    Do you know any other APIs so you can pull similar data from F1?
    Thanks!

  26. Admin Avatar
    Admin

    Hi Ruben,
    The data will be updated until the end of the 2024 season.
    I don’t know of any other free APIs but there are some commercial ones.
    Cheers,
    Chris

  27. Ewald Avatar

    Dear Ergast API Support Team

    I hope this message finds you well. I am writing to request the reinstatement of our access to your API services. It has come to our attention that our IP address seems to have been blocked, which has impeded our ability to utilize the API as part of our operational processes.

    Upon discovery of this issue, we conducted a thorough review of our usage patterns and have since implemented necessary adjustments to our software.

    These modifications are specifically designed to minimize the frequency of our API calls and to adhere strictly to the usage guidelines provided in your documentation.

    We understand the importance of maintaining system integrity and the measures that are in place to protect the services from excessive use. We are committed to ensuring that our future use of the API will be in compliance with your policies to prevent any undue strain on the system.

    To facilitate the resolution of this situation, we are ready to provide any additional information that you may require about the changes we have made or the nature of our API usage. We appreciate your assistance in this matter and are hopeful for a prompt response that will allow us to resume our services without further delay.

    Thank you for your time and understanding.
    Best regards,

  28. Admin Avatar
    Admin

    Hi Ewald,
    You should be unblocked – if not email me your IP address and I will investigate further.
    Cheers,
    Chris

  29. ewald Avatar

    Hi Chris,

    If I do a wget https://ergast.com/api/f1/current/constructorStandings.json then I get no response from my site. If I do it from my development environment, it works. It appears that the IP address is blocked. I placed the IP address in the website field.

    Regards,
    Ewald

  30. Leonardo Avatar
    Leonardo

    Hi Chris,
    first of all, thanks for this amazing API! This is exactly what I was looking for.
    I have only one question: will the data still be available after 2024 (despite being updated only until 2024)? I haven’t understood if after the next season you will only stop updating data or if the entire API will be no longer available.
    Thanks in advance

  31. Admin Avatar
    Admin

    Hi Leonardo,
    The API and website will be shutdown after the 2024 season.
    Cheers,
    Chris

  32. Danny Avatar
    Danny

    Sad to hear about the shutdown, this is a great source of data. May I ask if this is because of legal issues or you simply won’t have time to maintain it anymore?

  33. Admin Avatar
    Admin

    Hi Danny,
    The API has become technically harder to maintain following a upgrade of the server plus I’m frequently unavailable on race weekends due to other commitments. There have never been any legal issues.
    Cheers,
    Chris

  34. Bastien Avatar
    Bastien

    Hey mate, im actually using your API in a datavisualization project with university, can u give us an estimation of many data you have ?

  35. Isaac Avatar
    Isaac

    Hey just stumbled on your API to then find out it is shutting down. Would you consider having someone take over maintaining the API or releasing the code so someone can keep it going? Best of luck with everything! Isaac

  36. Admin Avatar
    Admin

    Hi Bastien,
    Sorry, I don’t understand the question.
    Cheers,
    Chris

  37. Admin Avatar
    Admin

    Hi Isaac,
    A number of people have expressed an interest but no news yet. The runtime is available here: https://github.com/jcnewell/ergast-f1-api/tree/master/webroot/php/api
    Cheers,
    Chris

  38. Lynn Avatar
    Lynn

    Hi,
    I’m using your database for a project at university. I was unsure what the collum “fastestLapSpeed” in “races” stands for. Is it the top speed or the average during that lap?

    Best,
    Lynn

  39. Alex South Avatar
    Alex South

    Hi Ergast team!

    I’ve used your API for numerous personal projects over the last year or so, and it’s awesome!

    I’ve since started a Masters Degree dissertation and have chosen to utilise this API to show the comparisons of various Machine Learning methods on predictions.

    However, the ethics committee of my Uni have rejected my initial proposal on the grounds that I have not provided an official source of FIA data. They are satisfied that your T&Cs allow me to use the API for this kind of project, but they require to know where the data is sourced from originally. This, I can only assume, is coming from the FIA published timings, data presented during the race and other such official FIA data.

    Explicitly stated in the FIAs T&Cs – Section 3.2 and 3.9 specifically:

    3.2. Unless otherwise indicated, all of the content featured or displayed on the Website,
    including, but not limited to, text, graphics, data, photographic images, moving
    images, sound, illustrations, software, and the selection and arrangement thereof, is
    owned by the FIA, its licensors, its affilitates, or its third—party image partners and all
    rights in and to such content are reserved

    3.9. Any and all rights in relation to FIA championships are the sole and exclusive property
    of FIA. No information or data may be reproduced in any format or used in any way
    without the prior written consent of FIA or its licensees. FIA or its licensees shall be
    entitled to withhold consent at theirsole discretion

    Please can you confirm, and provide if true, an official license from the FIA that you are allowed to be using their data for this API. If this could be provided to the email I have filled in on the form.

    If you don’t have this, I sadly have no choice but to consider a new Masters Project title 🙁 which is utterly devastating.

    I would have liked to email you Devs directly, but there was no other way to get in touch that I saw rather than this FAQs page.

    I hope you can get back to me asap!!!

  40. Thomas Avatar
    Thomas

    Really disappointed to hear you’re depreciating the API. Is there a legal reason for it? If not, is there anyway you could make the source code available so the community can carry on your great work? This API has been such a useful resource and I’d hate to see it disappear

  41. Will Avatar
    Will

    Hi!

    I note the front page says this is deprecated and will only be updated until end of 2024 (it will never publish a result of Hamilton in a Ferrari?!).

    It is a really helpful service and I am just getting to use it more this season so it makes me sad.

    Is there anything similar you know of (I am basically only really using it for results of each race)?

    Also, why is it being stopped? Lastly is the historic data still going to be hosted post the end of 2024.

    Cheers!

  42. Djordje Avatar
    Djordje

    Hi,

    I saw that API will be shut down at the end of the 2024 season. Are you going to stop refreshing DB also?

    If so, I would like to keep maintaining the db and running API. Feel free to contact me by email if that is ok for you.

  43. PJs Avatar
    PJs

    Race times are not updated yet, will they be updated closer to the start of the start of the season?

  44. Admin Avatar
    Admin

    Hi Alex,
    It is not legally possible to copyright data in the UK – it is not a creative work.
    Cheers,
    Chris