# Formula 1 API

> Returns a season's grands prix with winners, race and qualifying classifications of each round, and the drivers' and constructors' championship standings.

Category: Sports & Gaming. Region: global. 5 endpoints at `https://api.hoshime.com/v1/f1/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/f1
## GET /v1/f1/races

Grands prix of one Formula 1 season with date, winner, team, laps and time.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `season` | integer | yes | Championship year, such as 2024. (e.g. 2024) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `date` (string), `id` (string), `laps` (any), `name` (string), `round` (any), `team` (string), `time` (string), `url` (string), `winner` (Driver), `winner.code` (string), `winner.name` (string), `winner.url` (string)

```bash
curl "https://api.hoshime.com/v1/f1/races?season=2024" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/f1/raceResult

Race classification of one Formula 1 grand prix: positions, drivers, teams, laps, times and points.

Scope: `social:read` · Units: 2 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `season` | integer | yes | Championship year, such as 2024. (e.g. 2024) |
| `round` | integer | yes | Round of the season, from 1, in calendar order (see races). (e.g. 1) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `name` (string), `results` (Result[]), `results[].driver` (Driver), `results[].laps` (any), `results[].number` (string), `results[].points` (number (double)), `results[].position` (string), `results[].team` (string), `results[].time` (string), `round` (any), `season` (any), `url` (string)

```bash
curl "https://api.hoshime.com/v1/f1/raceResult?season=2024&round=1" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/f1/qualifying

Qualifying classification of one Formula 1 grand prix with the Q1, Q2 and Q3 lap times.

Scope: `social:read` · Units: 2 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `season` | integer | yes | Championship year, such as 2024. (e.g. 2024) |
| `round` | integer | yes | Round of the season, from 1, in calendar order (see races). (e.g. 1) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `name` (string), `results` (QualifyingResult[]), `results[].driver` (Driver), `results[].laps` (any), `results[].number` (string), `results[].position` (string), `results[].q1` (string), `results[].q2` (string), `results[].q3` (string), `results[].team` (string), `round` (any), `season` (any), `url` (string)

```bash
curl "https://api.hoshime.com/v1/f1/qualifying?season=2024&round=1" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/f1/driverStandings

Drivers' championship standings of one Formula 1 season.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `season` | integer | yes | Championship year, such as 2024. (e.g. 2024) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `driver` (Driver), `driver.code` (string), `driver.name` (string), `driver.url` (string), `nationality` (string), `points` (number (double)), `position` (any), `team` (string)

```bash
curl "https://api.hoshime.com/v1/f1/driverStandings?season=2024" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/f1/teamStandings

Constructors' championship standings of one Formula 1 season.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `season` | integer | yes | Championship year, such as 2024. (e.g. 2024) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `points` (number (double)), `position` (any), `team` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/f1/teamStandings?season=2024" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
