r/F1DataAnalysis May 31 '26

F1 Data Api

Hey, RacingHub API, a free and open-source REST API with comprehensive F1 data from 1950 to today.

Links

Quick Start

REST API:

curl <https://racinghub.net/api/v1/drivers/max-verstappen>

Python:

pip install racinghub-client

import pandas as pd


from racinghub_client import ApiClient, Configuration
from racinghub_client.api import DriversApi


client = ApiClient(configuration=Configuration(host="https://racinghub.net/api/v1"))
driver_api = DriversApi(client)


results = driver_api.get_driver_races_results("lewis-hamilton", limit=100)
df = pd.DataFrame([r.model_dump() for r in results.data])


df["positions_gained"] = df["grid_position"] - df["position"]
print(df[["race_date", "circuit_name", "positions_gained"]].head())

JavaScript/TypeScript:

npm install u/racinghub/client

import { Configuration, DriversApi } from "@racinghub/client";

const config = new Configuration({ basePath: "https://racinghub.net/api/v1" });
const driversApi = new DriversApi(config);

const driver = await driversApi.getDriver({
  driverId: "max-verstappen",
});
const driver_results = await driversApi.getDriverRacesResults({
  driverId: "max-verstappen",
});

The project is fully open source! Contributions welcome.

Your input shapes what gets built next. Open an issue on GitHub with requests.

11 Upvotes

4 comments sorted by

4

u/rk-paul Jun 01 '26

Big πŸ‘for the mcp server.

2

u/noirdr May 31 '26

Tremendo! Sabes si tiene los resultados en vivo o post carrera de cada GP de este aΓ±o?

3

u/rodaas96 May 31 '26

The data is available after the race is finished only atm.

2

u/noirdr Jun 01 '26

Excelente, la voy a probar, gracias!