Overview
The Ergast API provides comprehensive historical F1 data that complements FastF1’s detailed telemetry and timing data. Use it to:- Query historical race results and standings
- Access driver and constructor information
- Retrieve qualifying and sprint results
- Get championship standings for any season
- Query circuit information and race schedules
The original Ergast API was deprecated in 2024. FastF1 now uses the jolpica-f1 API (
https://api.jolpi.ca/ergast/f1) which maintains the same interface and data format.Getting Started
Import and initialize the Ergast interface:Configuration Options
-
result_type:'pandas': ReturnsErgastSimpleResponseorErgastMultiResponseas DataFrames (default)'raw': ReturnsErgastRawResponseas JSON-like dict/list structures
-
auto_cast: WhenTrue, automatically converts string values to appropriate types (int, float, date) -
limit: Maximum number of results per request. Default is 30, maximum is 1000.
Querying Race Data
Race Schedule
Get the race calendar for a season:Race Results
Query race results for one or multiple races:Qualifying Results
Sprint Results
Driver and Constructor Data
Driver Information
Constructor Information
Championship Standings
Driver Standings
Constructor Standings
Circuit Information
Advanced Filtering
Combine multiple filters for precise queries:Pagination
Handle large result sets with pagination:Working with Response Objects
ErgastSimpleResponse
Single DataFrame response:ErgastMultiResponse
Multiple DataFrames with description:Combining with FastF1
Use Ergast for historical context with FastF1 telemetry:Available Endpoints
The Ergast interface provides these methods:Error Handling
Best Practices
- Use appropriate limits - Default is 30, increase to 100-1000 for comprehensive queries
- Cache results - Ergast data is historical and doesn’t change frequently
- Combine filters - Use multiple parameters to reduce result set size
- Check pagination - Use
is_completeproperty to ensure you have all results - Use
auto_cast=True- Automatic type conversion makes data easier to work with
Next Steps
- Learn about data analysis techniques for processing Ergast data
- Explore visualization for creating charts with historical data
- See the API Reference for complete Ergast documentation
