Skip to content

rodas96/racinghub-api

Repository files navigation

racinghub-api

Formula 1 api. Historical and up to date data

curl https://racinghub.net/api/v1/drivers/max-verstappen
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())
npm install @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",
});

MCP Support

All API endpoints are exposed as MCP tools at: https://racinghub.net/api/v1/mcp

You can inspect the available tools using the MCP Inspector: https://modelcontextprotocol.io/docs/tools/inspector

Example of an agent using it: image image

Developer Documentation

Comprehensive developer documentation is available in docs/dev/ covering testing, configuration, deployment, and all project features.

Quick Start for Developers

# Install development environment
make install

# Start services with Docker
docker compose up -d

# Run tests
make tests

# Auto-fix formatting
make chores

See the developer documentation for complete guides and reference.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors