# Ergast — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access comprehensive Formula 1 historical data dating back to 1950, including race results, driver and constructor standings, qualifying times, lap records, and pit stop information. Track driver and constructor performance across seasons, explore circuit details, and analyze standings to dive deep into F1 history.

**Category:** Sports | **Website:** [ergast.com/](https://ergast.com/) | **Docs:** [parse.bot/marketplace/8b44fd6c-7d55-4fc6-83b4-4973dd583dc7/ergast-com-api](https://parse.bot/marketplace/8b44fd6c-7d55-4fc6-83b4-4973dd583dc7/ergast-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_circuit_info

Get info for a specific circuit by their ID. Returns circuit name, location with latitude, longitude, locality, and country.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `circuit_id` | string | No | Circuit identifier (e.g. 'monza', 'silverstone', 'spa'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_circuit_info \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"circuit_id":"<string>"}'
```

### get_circuits

Get a list of F1 circuits, optionally filtered by season.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return. |
| `offset` | integer | No | Result offset for pagination. |
| `season` | string | No | Filter by season year (e.g. '2023'). Omitting returns all circuits across all seasons. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_circuits \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","season":"<string>"}'
```

### get_constructor_info

Get info for a specific constructor by their ID. Returns name and nationality.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `constructor_id` | string | No | Constructor identifier (e.g. 'mercedes', 'red_bull', 'ferrari'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_constructor_info \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"constructor_id":"<string>"}'
```

### get_constructor_season_results

Get all race results for a specific constructor in a season. Returns every race the constructor participated in with results for both drivers.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `constructor_id` | string | No | Constructor identifier (e.g. 'mercedes', 'red_bull'). |
| `season` | string | No | Season year (e.g. '2023'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_constructor_season_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"constructor_id":"<string>","season":"<string>"}'
```

### get_constructor_standings

Get the Constructor Championship standings after a specific round or at the end of a season.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `round` | string | No | Round number for standings after that round. Omitting returns end-of-season standings. |
| `season` | string | No | Season year (e.g. '2023') or 'current' for the current season. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_constructor_standings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"round":"<string>","season":"<string>"}'
```

### get_constructors

Get a list of F1 constructors (teams), optionally filtered by season.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return. |
| `offset` | integer | No | Result offset for pagination. |
| `season` | string | No | Filter by season year (e.g. '2023'). Omitting returns all constructors across all seasons. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_constructors \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","season":"<string>"}'
```

### get_driver_info

Get biographical info for a specific driver by their ID. Returns permanent number, code, full name, date of birth, and nationality.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `driver_id` | string | No | Driver identifier (e.g. 'hamilton', 'max_verstappen', 'leclerc'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_driver_info \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"driver_id":"<string>"}'
```

### get_driver_season_results

Get all race results for a specific driver in a season. Returns every race the driver participated in with their finishing position and points.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `driver_id` | string | No | Driver identifier (e.g. 'hamilton', 'max_verstappen'). |
| `season` | string | No | Season year (e.g. '2023'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_driver_season_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"driver_id":"<string>","season":"<string>"}'
```

### get_driver_standings

Get the Driver Championship standings after a specific round or at the end of a season.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `round` | string | No | Round number for standings after that round. Omitting returns end-of-season standings. |
| `season` | string | No | Season year (e.g. '2023') or 'current' for the current season. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_driver_standings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"round":"<string>","season":"<string>"}'
```

### get_drivers

Get a list of F1 drivers, optionally filtered by season. Returns driver biographical information including name, date of birth, and nationality.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return. |
| `offset` | integer | No | Result offset for pagination. |
| `season` | string | No | Filter by season year (e.g. '2023'). Omitting returns all drivers across all seasons. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_drivers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","season":"<string>"}'
```

### get_finishing_status

Get a list of all finishing status codes and their counts, optionally filtered by season and round.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `round` | string | No | Filter by round number (e.g. '1'). Requires season to be set. |
| `season` | string | No | Filter by season year (e.g. '2023'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_finishing_status \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"round":"<string>","season":"<string>"}'
```

### get_lap_times

Get lap time data for every driver on a specific lap of a race.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `lap_number` | string | No | Lap number to get times for. |
| `round` | string | No | Round number (e.g. '1') or 'last' for the most recent race. |
| `season` | string | No | Season year (e.g. '2023') or 'current' for the current season. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_lap_times \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lap_number":"<string>","round":"<string>","season":"<string>"}'
```

### get_pit_stops

Get pit stop data for a specific race including stop times and durations.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `round` | string | No | Round number (e.g. '1') or 'last' for the most recent race. |
| `season` | string | No | Season year (e.g. '2023') or 'current' for the current season. |
| `stop_number` | string | No | Filter by specific pit stop number (e.g. '1' for first stops only). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_pit_stops \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"round":"<string>","season":"<string>","stop_number":"<string>"}'
```

### get_qualifying_results

Get qualifying session results (Q1, Q2, Q3 times) for a specific race.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `round` | string | No | Round number (e.g. '1') or 'last' for the most recent race. |
| `season` | string | No | Season year (e.g. '2023') or 'current' for the current season. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_qualifying_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"round":"<string>","season":"<string>"}'
```

### get_race_results

Get race results for a specific season and round. Returns finishing positions, points, lap times, and fastest laps for all drivers.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `round` | string | No | Round number (e.g. '1') or 'last' for the most recent race. |
| `season` | string | No | Season year (e.g. '2023') or 'current' for the current season. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_race_results \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"round":"<string>","season":"<string>"}'
```

### get_race_schedule

Get the full race schedule for a given season. Returns race dates, circuits, and session times (practice, qualifying). Can retrieve a single round's schedule when round is specified.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `round` | string | No | Specific round number to retrieve a single race's schedule. |
| `season` | string | No | Season year (e.g. '2023') or 'current' for the current season. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_race_schedule \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"round":"<string>","season":"<string>"}'
```

### get_seasons

Get a list of all F1 seasons supported by the API. Returns season years with Wikipedia links. Supports pagination via limit and offset.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return. |
| `offset` | integer | No | Result offset for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_seasons \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>"}'
```

### get_seasons_for_constructor

Get all seasons in which a specific constructor participated.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `constructor_id` | string | No | Constructor identifier (e.g. 'mercedes', 'red_bull'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_seasons_for_constructor \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"constructor_id":"<string>"}'
```

### get_seasons_for_driver

Get all seasons in which a specific driver participated.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `driver_id` | string | No | Driver identifier (e.g. 'hamilton', 'max_verstappen'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-ergast-com-api-8b44fd6c/get_seasons_for_driver \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"driver_id":"<string>"}'
```
