Skip to main content
FastF1 includes powerful integration with the Ergast API (now hosted at jolpica-f1) for accessing historical F1 data from 1950 onwards. This includes race results, qualifying data, driver standings, constructor information, and more.

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': Returns ErgastSimpleResponse or ErgastMultiResponse as DataFrames (default)
    • 'raw': Returns ErgastRawResponse as JSON-like dict/list structures
  • auto_cast: When True, 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

  1. Use appropriate limits - Default is 30, increase to 100-1000 for comprehensive queries
  2. Cache results - Ergast data is historical and doesn’t change frequently
  3. Combine filters - Use multiple parameters to reduce result set size
  4. Check pagination - Use is_complete property to ensure you have all results
  5. Use auto_cast=True - Automatic type conversion makes data easier to work with

Next Steps