OpenF1 API - Real-time and historical Formula 1 data
Python
1,800
147 commits
updated Sep 18, 2026
OpenF1 is a free and open-source API that offers real-time and historical Formula 1 data.
Whether you're a developer, data analyst, or F1 enthusiast, OpenF1 provides comprehensive
access to lap timings, car telemetry, driver information, race control messages, and more.
Explore the data through JSON or CSV formats to build dashboards, analyze races, or integrate F1 data into your projects.
For full API documentation, visit openf1.org.
Here’s a quick example of how to fetch lap data for a specific driver using the API:
curl "https://api.openf1.org/v1/laps?session_key=9161&driver_number=63&lap_number=8"
For more detailed examples and documentation, visit the API Documentation.
Install and start MongoDB Community Server v7 or v8
Install pip>=23 and python>=3.10
Install the OpenF1 python package
git clone [email protected]:br-g/openf1.git
pip install -e openf1
Set the MONGO_CONNECTION_STRING environment variable to connect to your local MongoDB instance:
export MONGO_CONNECTION_STRING="mongodb://localhost:27017"
If you find this project useful, consider supporting its long-term sustainability:
OpenF1 is an unofficial project and is not affiliated with Formula 1 companies. All F1-related trademarks are owned by Formula One Licensing B.V.
10,747 followers · starred Mar 2025
141 followers · starred Mar 2026
25 followers · starred May 2026
21 followers · starred Mar 2026
OpenF1 API - Real-time and historical Formula 1 data
Python
1,800
147 commits
updated Sep 18, 2026
OpenF1 is a free and open-source API that offers real-time and historical Formula 1 data.
Whether you're a developer, data analyst, or F1 enthusiast, OpenF1 provides comprehensive
access to lap timings, car telemetry, driver information, race control messages, and more.
Explore the data through JSON or CSV formats to build dashboards, analyze races, or integrate F1 data into your projects.
For full API documentation, visit openf1.org.
Here’s a quick example of how to fetch lap data for a specific driver using the API:
curl "https://api.openf1.org/v1/laps?session_key=9161&driver_number=63&lap_number=8"
For more detailed examples and documentation, visit the API Documentation.
Install and start MongoDB Community Server v7 or v8
Install pip>=23 and python>=3.10
Install the OpenF1 python package
git clone [email protected]:br-g/openf1.git
pip install -e openf1
Set the MONGO_CONNECTION_STRING environment variable to connect to your local MongoDB instance:
export MONGO_CONNECTION_STRING="mongodb://localhost:27017"
If you find this project useful, consider supporting its long-term sustainability:
OpenF1 is an unofficial project and is not affiliated with Formula 1 companies. All F1-related trademarks are owned by Formula One Licensing B.V.
10,747 followers · starred Mar 2025
141 followers · starred Mar 2026
25 followers · starred May 2026
21 followers · starred Mar 2026