Put a league table on your site
Standings for MPL Indonesia, Philippines, Malaysia or Cambodia, refreshed every five minutes.
1 See it first
The Esports page shows what the data looks like.
- League tabs. id, ph, my and kh in the addresses.
- Standings table. Rank, team, matches won and lost, net game wins and match points.
- Playoff line. Teams under the heavy line miss the playoffs.
- Matches. The current week, in your own time zone.
- 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;
}
}
Answers are cached for five minutes, so asking more often brings nothing new. Please credit the league as the source.