# Put a league table on your site

> Standings for MPL Indonesia, Philippines, Malaysia or Cambodia, refreshed every five minutes.

5 min read · https://arena.rone.dev/guides/league-table

## 1. See it first

The Esports page shows what the data looks like.

![The MPL Indonesia page with five numbered marks](https://arena.rone.dev/images/guides/esports-page.png)

1. **League tabs.** id, ph, my and kh in the addresses.
2. **Standings table.** Rank, team, matches won and lost, net game wins and match points.
3. **Playoff line.** Teams under the heavy line miss the playoffs.
4. **Matches.** The current week, in your own time zone.
5. **As JSON.** Opens the endpoint that gives you the same table.

## 2. Ask for the standings

Change id to ph, my or kh for the other leagues.

```
curl "https://arena.fastapicloud.dev/api/esports/id/standings"
```

## 3. Draw the table

This fills an HTML table that has an id of standings. Browsers may call the API directly.

```
const res = await fetch("https://arena.fastapicloud.dev/api/esports/id/standings");
const { standings } = await res.json();
const table = document.querySelector("#standings");
for (const row of standings) {
  const line = table.insertRow();
  for (const value of [row.rank, row.team.name, row.match_point, row.net_game_win]) {
    line.insertCell().textContent = value;
  }
}
```

> **Note:** Answers are cached for five minutes, so asking more often brings nothing new. Please credit the league as the source.
