Getting around ergast.get_race_results() result value limits #640
-
Hi! I wanted to get all the race results for a season in one ErgastMultiResponse object instead of specifying the "round" parameter. However, as it is noted in the ErgastMultiResponse section of the documentation, I am only able to get 30 entries, as opposed to the approximately 480 that I want. I noticed that the documentation specifies, "This is because by default, every query on Ergast is limited to 30 result values. You can manually change this limit for each request though.". My question is, how can I manually change the limit for each request as mentioned? I am also open to suggestions for just better ways of getting the season race results. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
https://docs.fastf1.dev/ergast.html#fastf1.ergast.Ergast.get_race_results Note that the ergast server accepts a maximum limit of 100, though. So you will still need to make multiple requests. The ErgastMultiResponse inherits from ErgastResponseMixin, so you can call https://docs.fastf1.dev/ergast.html#fastf1.ergast.interface.ErgastResponseMixin You will need to merge the data manually though. Auto-merging is not implemented. |
Beta Was this translation helpful? Give feedback.
ergast.get_race_results
takes an optionallimit
parameter that you can set to any value you want.https://docs.fastf1.dev/ergast.html#fastf1.ergast.Ergast.get_race_results
Note that the ergast server accepts a maximum limit of 100, though. So you will still need to make multiple requests.
The ErgastMultiResponse inherits from ErgastResponseMixin, so you can call
.get_next_result_page()
on each returned result object to get the next results.https://docs.fastf1.dev/ergast.html#fastf1.ergast.interface.ErgastResponseMixin
You will need to merge the data manually though. Auto-merging is not implemented.