# Leagues

> **🏎️ Motorsport API Required**
>
> All Leagues endpoints require an active Motorsport API subscription (€79/mo, 3,000 API calls/hr).
>
> [View pricing →](https://www.sportmonks.com/formula-one-api/)

A **league** represents a motorsport championship - the top-level entity in the API hierarchy. The Motorsport API currently contains one league: **Formula 1** (ID: `3468`). The API is structured to support additional championships in future, such as Formula 2, Formula 3, and NASCAR, which will each appear as a separate league.

Use the Leagues endpoints to retrieve championship details, get the current season, check for live activity, or find leagues associated with a specific team.

#### **Available endpoints**

* [**GET All Leagues**](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/leagues/get-all-leagues): returns all leagues available in the Motorsport API.
* [**GET League by ID**](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/leagues/get-league-by-id): returns a single league by its ID.
* [**GET Leagues by LIVE**](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/leagues/get-leagues-by-live): returns leagues that currently have live fixtures.
* [**GET Leagues by Search**](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/leagues/get-leagues-by-search): returns leagues matching a provided search query.
* [**GET Leagues by Fixture Date**](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/leagues/get-leagues-by-fixture-date): returns leagues with fixtures scheduled on a given date.
* [**GET Leagues by Country ID**](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/leagues/get-leagues-by-country-id): returns leagues for a provided country ID.
* [**GET Leagues by Team ID**](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/leagues/get-leagues-by-team-id): returns all leagues a provided team has participated in.
* [**GET Current Leagues by Team ID**](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/leagues/get-current-leagues-by-team-id): returns leagues where a provided team is currently active.

#### **Include options**

You can enrich league responses using `include`:

[`sport`](https://docs.sportmonks.com/v3/core-api/entities/core#sport), [`country`](https://docs.sportmonks.com/v3/core-api/entities/core#country), [`stages`](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/entities/stage), [`latest`](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/entities/fixture), [`upcoming`](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/entities/fixture), [`inplay`](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/entities/fixture), [`today`](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/entities/fixture), [`currentSeason`](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/entities/season), [`seasons`](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/entities/season)

{% hint style="info" %}
Want to keep responses lighter and faster? Use `select` to request only the fields you need. See: [Request options](https://docs.sportmonks.com/v3/motorsport-api/welcome/request-options)
{% endhint %}

#### **`currentSeason` vs `seasons`**

These two includes serve different purposes. Use `currentSeason` when you need only the active season's ID to pass to downstream endpoints - it returns a single season object. Use `seasons` when you need a full history of all seasons in the league.

For most integrations, `currentSeason` is the right choice:

```http
GET /v3/motorsport/leagues/3468?api_token=YOUR_TOKEN&include=currentSeason
```

This gives you the current season ID in one call, which you can then use with the [Stages](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/stages), [Standings](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/standings), and [Schedules](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/schedules) endpoints.

#### **Fixture shortcut includes**

The `latest`, `upcoming`, `inplay`, and `today` includes return fixture subsets directly on the league response - useful for dashboard widgets that need a quick snapshot without traversing the full hierarchy:

* **`latest`** - most recently completed fixtures
* **`upcoming`** - next scheduled fixtures
* **`inplay`** - fixtures currently live
* **`today`** - fixtures scheduled for today

> **Include depth:** Leagues endpoints support a maximum of **2** nested includes.

#### **Working with league fields**

* **`id`** - the unique league ID. The Formula 1 league ID is `3468`. Hardcode this in your application if you are building exclusively for F1 - there is no need to look it up on every request.
* **`active`** - `true` for championships currently running or with upcoming fixtures. When additional series are added to the API, use this field to filter for active championships only.
* **`short_code`** - the championship abbreviation, e.g. `"F1"`. Suitable for compact UI labels.
* **`sub_type`** - `"international"` for Formula 1, reflecting that it is a global championship rather than a country-specific competition.
* **`last_played_at`** - the datetime of the most recently completed fixture in the league. Useful for checking whether the championship is in-season.
* **`category`** - an internal classification value. Not meaningful for application development.
* **`has_jerseys`** - not used in the Motorsport API. Inherited from the shared v3 response structure and can be safely ignored.

#### **Common requests**

**Get the Formula 1 league with current season:**

```http
GET /v3/motorsport/leagues/3468?api_token=YOUR_TOKEN&include=currentSeason
```

**Check if any league is currently live:**

```http
GET /v3/motorsport/leagues/live?api_token=YOUR_TOKEN
```

**Get all leagues with fixtures today:**

```http
GET /v3/motorsport/leagues/fixture-date/TODAY_DATE?api_token=YOUR_TOKEN
```

**Get all leagues a team has competed in:**

```http
GET /v3/motorsport/leagues/teams/TEAM_ID?api_token=YOUR_TOKEN
```

**Get the league a team is currently active in:**

```http
GET /v3/motorsport/leagues/teams/TEAM_ID/current?api_token=YOUR_TOKEN
```

{% hint style="info" %}
Since the Motorsport API currently contains only the Formula 1 league (ID: `3468`), the GET All Leagues endpoint will return a single record. You can safely hardcode the league ID and the all-leagues endpoint is primarily useful for future-proofing your integration when additional championships are added.
{% endhint %}

#### **Related entities**

Get an overview and explanation of all the fields returned in the API response:

* [League](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/entities/league)

#### **Related pages**

* [Seasons](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/seasons) - All seasons within a league
* [Stages](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/stages) - Race weekends within a league's seasons
* [Standings](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/standings) - Championship standings by season
* [Teams](https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/teams) - Constructors competing in a league
* [Data Model](https://docs.sportmonks.com/v3/motorsport-api/welcome/data-model) - How leagues sit at the top of the hierarchy


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sportmonks.com/v3/motorsport-api/endpoints-and-entities/endpoints/leagues.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
