> For the complete documentation index, see [llms.txt](https://docs.sportmonks.com/v3/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sportmonks.com/v3/tutorials-and-guides/guides/how-to-use-the-id-finder-and-api-tester.md).

# How to use the ID finder and API tester

> **✅ Included in All Plans**
>
> The Playground (API Tester and ID Finder) is included in all plans, including the free plan.
>
> Plans differ only in leagues and API call limits.
>
> [Compare plans →](https://www.sportmonks.com/football-api/plans-pricing/)

Most Football API endpoints require an ID (a league, team, player, or fixture) rather than a name. This guide shows you how to find those IDs and test a live request, without writing any code, using the Playground in MySportmonks.

### When to use this

Reach for the Playground whenever you:

* Need a `league_id`, `team_id`, `player_id`, or `season_id` and don't already have it
* Want to check what a response looks like before writing integration code
* Are debugging a request and want to confirm the correct endpoint, includes, or filters

### Opening the Playground

1. Log in to [MySportmonks](https://my.sportmonks.com/login).
2. In the left-hand menu, expand **API** and select **Playground**.

<figure><img src="/files/l9HydhUA4B0Oen4g82zK" alt=""><figcaption></figcaption></figure>

3. The Playground opens with five tabs across the top: **API Tester**, **Templates**, **Saved**, **History**, and **ID Finder**.

Clicking the **ID Finder** card on the Dashboard takes you straight to the ID Finder tab. Clicking **Playground** opens the API Tester tab instead.

### Finding an ID with the ID Finder

The ID Finder tab has its own set of sub-tabs: **Leagues**, **Teams**, **Players**, **Fixtures**, **Statistics**, **Bookmakers**, and **Other**.

To find a league ID:

1. Open the **Leagues** sub-tab.
2. Use **Select a country** to narrow the list to one country, or use **Search on name** to search directly (for example, "Premier League").
3. The table returns the league's `ID`, `Name`, `Country`, and `Current Season ID`.

<figure><img src="/files/ARaozEZ7EOD0m9QuVaZr" alt=""><figcaption></figcaption></figure>

For example, searching gives you the Premier League (`8`), La Liga (`564`), Bundesliga (`82`), Serie A (`384`), Ligue 1 (`301`), and the Champions League (`2`), each alongside its current season ID.

The other sub-tabs (Teams, Players, Fixtures, Statistics, Bookmakers, Other) follow the same pattern: filter or search, then read the ID off the results table.

{% hint style="info" %}
Not every field is shown by default. Apply a filter (country, name, or both) to unlock more specific columns.
{% endhint %}

### Building and running a request with the API Tester

Once you have the ID you need, switch to the **API Tester** tab to build and run a real request.

1. **Start from a template (optional).** The **Quickstart with a Template** section suggests ready-made requests, often personalised to your account (for example, "Because you live in England: Teams stats historical season England U18"). Click **Run** to execute one directly, or click **View all** to browse the full template library.
2. **Or build your own request.** Under **API Request Options**, open the **Category** dropdown and choose the data type you want. The list covers every entity in the Football API: `Livescores`, `Fixtures`, `Leagues`, `Seasons`, `Schedules`, `Predictions`, `Teams`, `Statistics`, `Topscorers`, `Standings`, `Rounds`, `Team Squads`, `Rivals`, `Players`, `Coaches`, `Stages`, `Pre-match Odds`, `In-play Odds`, `Bookmakers`, `Referees`, `Premium Odds`, `Transfers`, `Venues`, `Markets`, `Expected`, `TV Stations`, `News`, `Commentaries`, and `Other`.

<figure><img src="/files/70Nmb33Y3mTTU7SqXBnH" alt=""><figcaption></figcaption></figure>

1. **Select an endpoint.** The **Endpoint** dropdown only populates once you've chosen a category, listing the specific endpoints available for it, for example choosing `Fixtures` gives you options like **GET All Fixtures**. If you're not sure which endpoint maps to which use case, check the [Endpoints](https://docs.sportmonks.com/v3/endpoints-and-entities/endpoints) reference.
2. **Add includes.** Use the **Includes** and **Nested Includes** toggles to enrich the response with related data, the same `includes` system used in the API itself.
3. **Set optional parameters (optional).** Expand **Optional Parameters** to refine the request further:
   * **SortBy** and **Order**: sort the response by a field, ascending or descending.
   * **Locale**: return translated fields in a specific language.
   * **Filter**: add one or more filters (for example `Ids`), with **Add Another Filter** to stack multiple filters, or **Clear** to remove them.
   * **Page**: step through paginated results.
4. **Check the request URL.** The Playground builds the full request URL for you at the bottom of the panel as you make selections. For example, selecting the `Fixtures` category, the **GET All Fixtures** endpoint, and sorting by name ascending produces:

   ```http
   https://api.sportmonks.com/v3/football/fixtures
   ?api_token=YOUR_TOKEN&sortBy=name&order=asc
   ```

   Use the copy icon next to it if you want to reuse the URL elsewhere.
5. **Run it.** Click **GET request**. The response streams into the **Response** panel on the right, where you can search within the result, page through it with the arrow buttons, and copy it.
6. **Save your work.** Use **Save** to keep a request for later (accessible from the **Saved** tab), or **Reset** to start over. Every request you run is also logged in the **History** tab.

### Working with the data

Once you have an endpoint and an ID confirmed in the Playground, the same request works from your own code. For example, to fetch the Premier League by ID (`8`):

{% tabs %}
{% tab title="Javascript" %}

```javascript
const response = await fetch(
  "https://api.sportmonks.com/v3/football/leagues/8?api_token=YOUR_TOKEN"
);
const data = await response.json();
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

response = requests.get(
    "https://api.sportmonks.com/v3/football/leagues/8",
    params={"api_token": "YOUR_TOKEN"},
)
data = response.json()
```

{% endtab %}

{% tab title="PHP" %}

```php
$response = file_get_contents(
    "https://api.sportmonks.com/v3/football/leagues/8?api_token=YOUR_TOKEN"
);
$data = json_decode($response, true);
```

{% endtab %}
{% endtabs %}

### Common pitfalls

* **Filtering by country and expecting all leagues.** The ID Finder only unlocks certain columns once you've filtered; if a field looks missing, apply a country or name filter first.
* **Confusing league ID with season ID.** Most fixture, standings, and squad endpoints need the `Current Season ID` shown in the Leagues table, not the league ID itself.
* **Forgetting the endpoint depends on the category.** The **Endpoint** dropdown stays empty until you pick a **Category** first.
* **Running Playground requests against your production token.** Every request you run in the Playground counts towards your hourly rate limit, the same as a request from your own app.

### FAQ

**Do I need a subscription to use the Playground?** No. It's available on the free plan and every paid plan.

**Does using the API Tester use up my API calls?** Yes. Requests run from the Playground count against your plan's hourly call limit, the same as requests from your own application.

**Can I reuse a request I built in the Playground?** Yes. Click **Save** to store it in the **Saved** tab, or copy the generated request URL directly into your code.

**What's the difference between the ID Finder and the search endpoints (like GET Leagues Search by Name)?** They return the same underlying data. The ID Finder is a visual, no-code way to browse it inside MySportmonks; the search endpoints let you do the same lookup programmatically from your own application.

### See also

**Request options**

* [Includes](https://docs.sportmonks.com/v3/api/request-options/includes)
* [Nested includes](https://docs.sportmonks.com/v3/api/request-options/includes/nested-includes)
* [Filtering](https://docs.sportmonks.com/v3/api/request-options/filtering)

**Getting started**

* [Authentication](https://docs.sportmonks.com/v3/welcome/authentication)
* [Making your first request](https://docs.sportmonks.com/v3/welcome/making-your-first-request)
* [Best practices](https://docs.sportmonks.com/v3/welcome/best-practices)
* [Rate limit](https://docs.sportmonks.com/v3/api/rate-limit)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.sportmonks.com/v3/tutorials-and-guides/guides/how-to-use-the-id-finder-and-api-tester.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
