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.
2
Load a session
Use
get_session() to create a session object, then call load() to fetch the data.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 RPMnGear: Gear numberThrottle: Throttle position (0-100%)Brake: Brake applied (boolean)DRS: DRS statusX,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
Troubleshooting
Rate Limit Errors
If you encounter rate limit errors, ensure caching is enabled:- 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
