Premier League stats in Python
Pull the Premier League table, top scorers against expected goals, a club's located shots and this week's fixtures in Python, then reuse it for MLS and the Eredivisie.
Every script run against the live API on December 4, 2026. One full run: 30 credits.
This tutorial gets the Premier League into Python without scraping: the league table, the top scorers set against our expected goals, one club's shots by zone and the fixtures for the week. The last step runs the same code on MLS and the Eredivisie by changing one argument.
The example season is 2025-26 (seasons are named by the year they start, so it is season=2025). One full run costs 30 credits: 6 for three league tables, 10 for two leaderboards, 10 for one club's shot map, and 4 for results and fixtures. The free plan's monthly credits cover it.
1. Install the client and set your key
The client has no required dependencies. This tutorial uses pandas for the tables and matplotlib for the charts. The client reads your key from STRIKERAPI_API_KEY.
pip install "strikerapi[pandas]" matplotlib
export STRIKERAPI_API_KEY=your_key_here2. Get the league table
get_standings returns the published table: rank, record, goals, official points (with any deduction) and recent form, latest result first. The Premier League is the default league, so only the season is needed.
import pandas as pd
from strikerapi import Client, to_dataframe
client = Client() # reads STRIKERAPI_API_KEY
table = to_dataframe(client.get_standings(season=2025), key="standings")
table.to_csv("premier_league_2025_table.csv", index=False)
cols = ["rank", "display_name", "played", "wins", "draws", "losses", "goals_for", "goals_against", "goal_diff", "points", "form"]
print(table[cols].head(5).to_string(index=False))
print(table[cols].tail(3).to_string(index=False))
print("credits left:", client.last_credits_remaining)Output
rank display_name played wins draws losses goals_for goals_against goal_diff points form
1 Arsenal 38 26 7 5 71 27 44 85 WWWWW
2 Manchester City 38 23 9 6 77 35 42 78 LDWWD
3 Manchester United 38 20 11 7 69 50 19 71 WWDWW
4 Aston Villa 38 19 8 11 56 49 7 65 WWDLL
5 Liverpool 38 17 9 12 63 53 10 60 DLDLW
rank display_name played wins draws losses goals_for goals_against goal_diff points form
18 West Ham United 38 10 9 19 46 65 -19 39 WLLLW
19 Burnley 38 4 10 24 38 75 -37 22 DLDLL
20 Wolverhampton Wanderers 38 3 11 24 27 68 -41 20 DDLDL
credits left: 14311The last line is the credit balance of the key that ran it; yours will differ. Arsenal won the 2025-26 table with 85 points, seven ahead of Manchester City. Wolverhampton Wanderers finished last with 20.
3. Set the top scorers against expected goals
get_leaders ranks players on a season stat: goals, assists, shots, cards, saves and xg. xG is our expected goals from where each shot was taken: the league's goal rate for shots from the same distance and angle, with penalties at the league's conversion rate. It does not see defenders or the pass. The script takes the top ten scorers and joins each to his xG by player id. min_games keeps out players with a few appearances.
import pandas as pd
from strikerapi import Client, to_dataframe
client = Client()
goals = to_dataframe(client.get_leaders(stat="goals", season=2025, min_games=10, limit=10), key="leaders")
xg = to_dataframe(client.get_leaders(stat="xg", season=2025, min_games=10, limit=40), key="leaders")
scorers = goals[["player_id", "name", "team", "games", "minutes", "value"]].rename(columns={"value": "goals"})
scorers = scorers.merge(xg[["player_id", "value"]].rename(columns={"value": "xg"}), on="player_id", how="left")
scorers["goals_minus_xg"] = scorers["goals"] - scorers["xg"]
scorers.to_csv("premier_league_2025_scorers.csv", index=False)
print(scorers[["name", "team", "games", "goals", "xg", "goals_minus_xg"]].round(1).to_string(index=False))
print("credits left:", client.last_credits_remaining)Output
name team games goals xg goals_minus_xg
Erling Haaland MNC 35 27 22.2 4.8
Igor Thiago BRE 38 22 18.4 3.6
Antoine Semenyo BOU/MNC 37 17 10.5 6.5
Ollie Watkins AVL 37 16 14.2 1.8
João Pedro CHE 35 15 11.8 3.2
Morgan Gibbs-White NFO 37 15 9.6 5.4
Viktor Gyökeres ARS 36 14 11.7 2.3
Dominic Calvert-Lewin LEE 35 14 16.5 -2.5
Junior Kroupi BOU 33 13 8.0 5.0
Danny Welbeck BHA 37 13 10.2 2.8
credits left: 14301- Goals
- Expected goals
From the table above. Players who moved clubs in the season show both clubs.
Nine of the ten scored more than their xG. Erling Haaland led with 27 goals from 22.2 xG, and Antoine Semenyo had the largest gap, 6.5 goals above his 10.5. Dominic Calvert-Lewin was the one player below: 14 goals from 16.5 xG. One season of finishing is a small sample, so a gap of a few goals is not a lasting skill on its own.
4. Look at one club's shots by zone
get_shot_map returns a club's shots for a season: totals, a zone table and every located shot with its x and y, outcome, body part and xG. Pitch coordinates run from the goal line (x, as a share of half the pitch; the penalty spot is 0.23) and across the pitch (y, 0.5 is the centre). Add against=True for the shots a club conceded. The script prints the totals and zones for Arsenal, then ranks its players by xG.
import pandas as pd
from strikerapi import Client, to_dataframe
client = Client()
shot_map = client.get_shot_map(team="ARS", season=2025)
print(shot_map["totals"])
zones = pd.DataFrame(shot_map["zones"])
print(zones[["zone", "shots", "goals", "xg", "conversion", "share"]].to_string(index=False))
shots = to_dataframe(shot_map, key="shots")
shots.to_csv("arsenal_2025_shots.csv", index=False)
by_player = shots.groupby("player").agg(
shots=("xg", "size"), goals=("outcome", lambda s: (s == "goal").sum()), xg=("xg", "sum")
)
print(by_player.sort_values("xg", ascending=False).head(4).round(1).to_string())
print("credits left:", client.last_credits_remaining)Output
{'shots': 538, 'located': 520, 'goals': 67, 'on_target': 169, 'xg': 69, 'xg_per_shot': 0.133, 'xg_point_in_time': 69.46}
zone shots goals xg conversion share
six_yard_box 83 19 24.60 0.229 0.160
penalty_area 298 34 34.05 0.114 0.573
outside_box 135 10 6.97 0.074 0.260
penalty 4 4 3.38 1.000 0.008
shots goals xg
player
Viktor Gyökeres 55 14 11.7
Bukayo Saka 70 7 6.8
Leandro Trossard 47 6 5.5
Eberechi Eze 52 7 5.2
credits left: 14291- Goals
- Expected goals
520 located shots. Penalties are their own zone: 4 taken, 4 scored.
What the zones say:
- Arsenal took 538 shots and 520 have a location. They scored 67 goals from 69 xG, 0.133 xG per shot, with 169 shots on target.
- 57.3% of the shots came from inside the penalty area outside the six-yard box, and those converted at 11.4%. The six-yard box was 16% of shots and scored 19 goals from 24.6 xG.
- Outside the box they scored 10 goals from 7 xG, on 135 shots (7.4% conversion).
- Viktor Gyökeres scored 14 goals from 11.7 xG; Bukayo Saka took the most shots (70) and scored 7 from 6.8 xG.
5. Pull results and this week's fixtures
list_games returns results for a club, date or season, newest first. get_schedule returns the next days' fixtures, each with our win probabilities for home, draw and away and the books' average implied probabilities with their margin in. Those prices are information about the market, not advice. The fixtures below are the ones listed on Dec 4 2026.
import pandas as pd
from strikerapi import Client, to_dataframe
client = Client()
games = client.list_games(team="ARS", season=2025, status="final", limit=5)["games"]
for g in games:
print(g["date"], g["home"]["abbrev"], g["home"]["score"], "-", g["away"]["score"], g["away"]["abbrev"])
week = client.get_schedule(days=7)
for g in week["games"][:4]:
p, line = g["win_prob"], g["line"]["implied"]
print(g["date"], g["home"]["abbrev"], "v", g["away"]["abbrev"],
"| our model", p["home"], p["draw"], p["away"],
"| books", line["home"], line["draw"], line["away"])
print("credits left:", client.last_credits_remaining)Output
2026-05-24 CRY 1 - 2 ARS
2026-05-18 ARS 1 - 0 BUR
2026-05-10 WHU 0 - 1 ARS
2026-05-02 ARS 3 - 0 FUL
2026-04-25 ARS 1 - 0 NEW
2026-12-05 CHE v LIV | our model 0.335 0.248 0.417 | books 0.301 0.26 0.488
2026-12-05 MAN v COV | our model 0.62 0.205 0.175 | books 0.652 0.212 0.182
2026-12-05 LEE v IPS | our model 0.683 0.189 0.128 | books 0.685 0.215 0.151
2026-12-05 AVL v CRY | our model 0.575 0.226 0.199 | books 0.593 0.238 0.21
credits left: 14287Arsenal won its last five of 2025-26. The books' three probabilities sum to more than 1 (1.049 for Chelsea v Liverpool) because the margin is in them; get_game_probabilities returns the same numbers with the margin removed. Each fixture row also has a goals block with our expected goals, the likeliest scores and over and under probabilities.
6. Run the same code on another league
Every tool takes a league argument: soccer is the Premier League, and the others include mls, laliga, seriea, bundesliga, ligue1, eredivisie and championship. MLS seasons are calendar years. Swap the argument and everything above works unchanged.
from strikerapi import Client, to_dataframe
client = Client()
for league, season in [("mls", 2026), ("eredivisie", 2025)]:
table = to_dataframe(client.get_standings(league=league, season=season), key="standings")
print(league, season, len(table), "clubs")
print(table[["rank", "display_name", "played", "points", "goal_diff"]].head(3).to_string(index=False))
print("credits left:", client.last_credits_remaining)Output
mls 2026 30 clubs
rank display_name played points goal_diff
1 Nashville SC 34 77 46
2 Inter Miami CF 34 60 21
3 New England Revolution 34 58 8
eredivisie 2025 18 clubs
rank display_name played points goal_diff
1 PSV Eindhoven 34 84 56
2 Feyenoord Rotterdam 34 65 26
3 NEC Nijmegen 34 59 24
credits left: 14283The 2026 MLS table has 30 clubs, led by Nashville SC on 77 points. PSV Eindhoven won the 2025-26 Eredivisie with 84. Located shots and xG start in 2012-13 for the Premier League, La Liga, Serie A, the Bundesliga and Ligue 1 (the Premier League is partial that first season), so the scorers and shot map steps work the same way there.
Tools and credits
- get_standings: 3 calls, 6 credits (Premier League, MLS, Eredivisie).
- get_leaders: 2 calls, 10 credits (goals and xg).
- get_shot_map: 1 call, 10 credits.
- list_games: 1 call, 2 credits.
- get_schedule: 1 call, 2 credits.
One full run: 30 credits.
What you can do with the data
You may store these rows, train models and analyze them, and build products that show your users what you derive. You may not redistribute the rows, or the odds as a raw feed, as a dataset or API of its own. xG is our model's estimate. Prices are market information, not predictions or picks.
Details: data timing and rights.
What to do next
Start with 500 free credits every month
No card. pip install strikerapi, REST or MCP.