Skip to main content
This guide walks you through loading a Formula 1 session and accessing timing data, telemetry, and lap information.

Prerequisites

Ensure FastF1 is installed and the cache is configured:

Basic Workflow

1

Import and configure cache

Always enable the cache before loading any data to improve performance and avoid rate limits.
Call Cache.enable_cache() immediately after imports and before any other FastF1 functionality.
2

Load a session

Use get_session() to create a session object, then call load() to fetch the data.
Session identifiers can be: 'FP1', 'FP2', 'FP3', 'Q' (Qualifying), 'S' (Sprint), 'SQ' (Sprint Qualifying), or 'R' (Race).
3

Access lap data

The session.laps DataFrame contains all lap information for all drivers.
4

Access telemetry data

Retrieve high-frequency telemetry data for individual laps.
Available telemetry channels:
  • Speed: Car speed (km/h)
  • RPM: Engine RPM
  • nGear: Gear number
  • Throttle: Throttle position (0-100%)
  • Brake: Brake applied (boolean)
  • DRS: DRS status
  • X, Y, Z: GPS position coordinates

Complete Example: Lap Time Analysis

Here’s a complete example that loads a session and analyzes driver lap times:

Common Data Access Patterns

Get Session Information

Filter and Select Laps

Access Results and Classification

Understanding Session Identifiers

FastF1 accepts multiple formats for identifying sessions: You can also use:
  • Session number (integer): Sessions are numbered in chronological order
  • Full session name (string): e.g., 'Qualifying', 'Race'

Performance Tips

Always enable caching - The first load will download data, but subsequent loads will be nearly instantaneous.
Use pick methods - Methods like pick_drivers(), pick_fastest(), and pick_quicklaps() are optimized for filtering lap data.
Load only what you need - If you only need timing data, you can skip telemetry by using session.load(telemetry=False, weather=False) for faster loading.

Troubleshooting

Rate Limit Errors

If you encounter rate limit errors, ensure caching is enabled:
FastF1 enforces rate limits:
  • 4 requests/second (minimum 0.25s between requests)
  • 200 requests/hour for Ergast API
  • 500 requests/hour for other APIs

No Data Available

Some sessions may have incomplete data, especially for older seasons (pre-2018) or testing sessions. Check the session’s available data:

Next Steps

API Reference

Explore detailed API documentation for all classes and methods

Examples

Browse more examples including advanced visualizations and analysis techniques