Build a corner stats table
Corners won and conceded by every team in a league, with per-match averages and first-half splits. One API call returns the whole table.
The finished table
Sample output: the Premier League corner table as the API returned it.
| # | Team | P | For | Against | Avg for | Avg against | 1H avg for | 1H avg against |
|---|---|---|---|---|---|---|---|---|
| 1 | Tottenham | 5 | 38 | 23 |
7.6
|
4.6 | 4.0 | 2.6 |
| 2 | Man Utd | 5 | 36 | 19 |
7.2
|
3.8 | 2.2 | 1.8 |
| 3 | Chelsea | 5 | 33 | 26 |
6.6
|
5.2 | 2.8 | 2.8 |
| 4 | Man City | 5 | 31 | 21 |
6.2
|
4.2 | 3.2 | 1.8 |
| 5 | Fulham | 5 | 28 | 26 |
5.6
|
5.2 | 2.4 | 2.6 |
| 6 | Brighton | 5 | 27 | 23 |
5.4
|
4.6 | 2.6 | 2.2 |
| 7 | Arsenal | 5 | 25 | 16 |
5.0
|
3.2 | 2.2 | 1.2 |
| 8 | Everton | 5 | 25 | 22 |
5.0
|
4.4 | 1.8 | 2.0 |
| 9 | Newcastle | 5 | 22 | 30 |
4.4
|
6.0 | 2.6 | 3.4 |
| 10 | Leeds | 5 | 22 | 24 |
4.4
|
4.8 | 2.4 | 2.0 |
| 11 | Brentford | 5 | 22 | 25 |
4.4
|
5.0 | 2.2 | 1.4 |
| 12 | Bournemouth | 5 | 21 | 23 |
4.2
|
4.6 | 1.8 | 2.2 |
| 13 | Liverpool | 5 | 20 | 22 |
4.0
|
4.4 | 2.4 | 2.8 |
| 14 | Sunderland | 5 | 20 | 19 |
4.0
|
3.8 | 3.0 | 1.4 |
| 15 | Coventry | 5 | 20 | 23 |
4.0
|
4.6 | 2.0 | 3.0 |
| 16 | Ipswich | 5 | 18 | 26 |
3.6
|
5.2 | 1.6 | 3.0 |
| 17 | Hull | 5 | 17 | 30 |
3.4
|
6.0 | 1.8 | 2.8 |
| 18 | Nottm Forest | 5 | 17 | 23 |
3.4
|
4.6 | 1.6 | 2.8 |
| 19 | Aston Villa | 5 | 15 | 24 |
3.0
|
4.8 | 2.2 | 2.8 |
| 20 | Crystal Palace | 5 | 12 | 24 |
2.4
|
4.8 | 1.8 | 2.0 |
Premier League 26/27, round 5. Sample captured 8 October 2026 from
GET /v1/standings?league=4160026622&type=corner
The API calls behind it
-
1
GET /v1/leagues?search=Premier League&country=GB-ENGFind the league id. Look it up once and keep it. Reference →
-
2
GET /v1/standings?league={id}&type=cornerThe corner table for the current season: totals, per-match averages and a first_half block per team. Reference →
What it takes to run
- The Premier League is one of the top-5 leagues on the free plan — no card needed.
- Two requests per run: one to find the league, one for the table. Store the league id and it is one.
- The free plan allows 60 requests / hour.
The code
Install the client, save the script, run it with your key.
pip install fivedollarfootballimport os
from fivedollarfootball import Client
client = Client(os.environ["FIVEDOLLARFOOTBALL_API_KEY"])
# 1. Find the league. Look the id up once and keep it.
leagues = client.leagues(search="Premier League", country="GB-ENG")
league = next(l for l in leagues if l["name"] == "England Premier League")
# 2. One call returns the corner table for the current season.
table = client.standings(league["id"], type="corner")
print(f'{league["name"]} {table["season"]}, corners after round {table["round"]}')
print(f'{"#":>2} {"Team":<16}{"P":>3}{"For":>5}{"Agst":>6}'
f'{"Avg for":>9}{"Avg agst":>10}{"1H avg":>8}')
for row in table["table"]:
half = row["first_half"]
print(
f'{row["position"]:>2} {row["team"]["name"]:<16}{row["played"]:>3}'
f'{row["total_for"]:>5}{row["total_against"]:>6}'
f'{row["average_for"]:>9.1f}{row["average_against"]:>10.1f}'
f'{half["average_for"]:>8.1f}'
)
England Premier League 26/27, corners after round 5
# Team P For Agst Avg for Avg agst 1H avg
1 Tottenham 5 38 23 7.6 4.6 4.0
2 Man Utd 5 36 19 7.2 3.8 2.2
3 Chelsea 5 33 26 6.6 5.2 2.8
4 Man City 5 31 21 6.2 4.2 3.2
5 Fulham 5 28 26 5.6 5.2 2.4
6 Brighton 5 27 23 5.4 4.6 2.6
...
FIVEDOLLARFOOTBALL_API_KEY=fb_live_your_key python corner_table.pyThe full project is on GitHub: 5dollarfootball-api/football-corner-stats-table →
Take it further
- Rank by average_for + average_against to find the teams whose matches produce the most corners.
- Pass type="card" for the same table of yellow and red cards.
- Pass season="25/26" for last season's table.
- Pass lang="es" (or any of 21 languages) for localized team names.
- Pair it with the bookmaker corner line for a fixture: GET /v1/fixtures/{id}/odds?market=corner.
The data behind this example
Frequently asked questions
Yes. The Premier League is one of the top-5 leagues on the free plan, and the script makes two requests. The free plan allows 60 requests / hour and needs no card.
Yes — change the league in the lookup. The free plan covers the top-5 European leagues, Pro at $5/mo covers 130+ competitions and Ultra covers every league. Where a competition has no table, the API returns an explicit standings_not_available error rather than an empty list.
Yes. Pass type=card to the same endpoint and each row carries yellow and red card totals and per-match averages instead of corners.
Start building for free
Get a working API key in under a minute. No credit card, no sales call.