Skip to main content
Use this page to show league tables, including past seasons and tournament groups.
Fastest way: ask your AI. Set up your coding tool once with Build with AI, then paste:
Prompt

How it fits together

Standings belong to a season of a competition, so you need two IDs: competition_id and season_id.
1

Find the competition

GET /football/competitions?search=Premier returns comp_3039. See Find IDs.
2

Pick the season

Use current_season_id from GET /football/competitions/comp_3039, or pick an older one from GET /football/competitions/comp_3039/seasons.
3

Get the table

GET /football/competitions/comp_3039/seasons/{season_id}/standings
The JavaScript examples run on your server and read your key from the THESTATSAPI_API_KEY environment variable.

Current league table

Response (first two rows of 20):
Response
Rows are sorted by position. The table isn’t paginated, so one call returns every team.

A past season

Swap in an older season_id from the seasons list. Premier League 25/26 is sn_6125938:
The first row is Arsenal: 38 played, 26 wins, 85 points. How far back tables go depends on the competition. Check Coverage before you promise a season to your users. If the season_id belongs to a different competition, you get a 400 error: “season_id does not belong to competition_id”.

Tournament groups

For tournaments with a group stage (World Cup, EURO, AFCON and so on), list the groups first, then fetch one group’s table.
Group A response (first row of 4):
Response
Without group, you get every group’s table, sorted by group_label and then position.
Some competitions have no table. Knockout-only cups (such as the FA Cup) return an empty list, and /groups returns an empty list for leagues without groups.

A team’s standings history

To build a “season by season” view for one team, list the competitions and seasons where it has a table entry. Then fetch each table you need.
Response (trimmed):
Response
This endpoint lists where the team has standings, not its positions. For the position, fetch the full table, using group_label as the group filter when it isn’t null. For one season’s record, Get a team’s season stats returns position, points and form in one call.

API reference