Who leads the Premier League in expected goals, and how do I rank players in Python?
A season leaderboard on any stat we compute or ESPN keeps, with expected goals ranked by total or per 90 and a minimum number of appearances.
Code verified October 10, 2026. One call to get_leaders, 5 credits.
The call
Change stat to goals, assists, shots, cards or saves. Add per90: true to rank by the rate.
import requests
import pandas as pd
API_KEY = "YOUR_API_KEY"
resp = requests.post(
"https://mcp.strikerapi.com/v1/get_leaders",
headers={"x-api-key": API_KEY},
json={
"stat": "xg",
"season": 2025,
"min_games": 20,
"limit": 15,
},
timeout=60,
)
resp.raise_for_status()
data = resp.json()["data"]
leaders = pd.DataFrame(data["leaders"])
print(data["label"])
print(leaders[["rank", "name", "team", "games", "minutes", "value"]])
Replace YOUR_API_KEY with a key from your dashboard. Python needs requests and pandas (pip install requests pandas). JavaScript runs on Node 18 or newer, or in the browser.
What comes back
The data object of the response, trimmed to the first rows. Every field is real output from the run above.
{
"stat": "xg",
"label": "Expected goals (ours)",
"season": 2025,
"min_games": 20,
"leaders": [
{
"rank": 1,
"player_id": "253989",
"name": "Erling Haaland",
"position": "Forward",
"team": "MNC",
"games": 35,
"minutes": 2959,
"value": 23.12,
"per90": 0.7
},
{
"rank": 2,
"player_id": "301894",
"name": "Igor Thiago",
"position": "Forward",
"team": "BRE",
"games": 38,
"minutes": 3287,
"value": 19.1,
"per90": 0.52
},
"...13 more"
],
"count": 15,
"note": "xG covers located shots (from 2012-13; MLS 2008-09 and from 2012)."
}What to do next
- get_shot_map (10 credits). Pass a player id to see where that player's shots came from.
- get_player (5 credits). A player's per-season totals and per-90 rates.
More guides
Start with 500 free credits
No card. REST or MCP.