How do I get a Premier League player's match stats in Python?
A player's Premier League match log with minutes, goals, shots and xG. Erling Haaland had 5 goals from 6.36 xG in his last ten matches of 2025-26.
Code verified November 18, 2026. One call to get_player_games, 5 credits.
The call
player_id comes from search_players. season is the year it starts. Matches come back newest first. Pass league for a competition other than the Premier League.
import requests
import pandas as pd
API_KEY = "YOUR_API_KEY"
resp = requests.post(
"https://mcp.strikerapi.com/v1/get_player_games",
headers={"x-api-key": API_KEY},
json={
"player_id": "253989",
"season": 2025,
"limit": 10,
},
timeout=60,
)
resp.raise_for_status()
data = resp.json()["data"]
log = pd.DataFrame(data["games"]).sort_values("game_date")
cols = ["game_date", "opponent", "minutes", "goals", "assists", "shots", "shots_on_target", "xg"]
print(log[cols].to_string(index=False))
total = log[["minutes", "goals", "assists", "shots", "xg"]].sum()
print(total.to_dict())
print("goals per 90:", round(total["goals"] / total["minutes"] * 90, 2), "xG per 90:", round(total["xg"] / total["minutes"] * 90, 2))
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.
Or use the official client: pip install strikerapi
What comes back
The data object of the response, trimmed to the first rows. Every field is real output from the run above.
{
"player_id": "253989",
"games": [
{
"game_id": "740958",
"game_date": "2026-05-19",
"season": 2025,
"stage": "Regular Season",
"team_id": "382",
"team": "MNC",
"opponent": "BOU",
"home": false,
"goals_for": 1,
"goals_against": 1,
"starter": true,
"position": "Forward",
"minute_on": 0,
"minute_off": null,
"minutes": 90,
"goals": 1,
"assists": 0,
"shots": 2,
"shots_on_target": 1,
"xg": 0.34,
"fouls_committed": 1,
"fouls_suffered": 0,
"offsides": 1,
"yellow_cards": 0,
"red_cards": 0,
"own_goals": 0,
"saves": null,
"goals_conceded": 1,
"shots_faced": null
},
{
"game_id": "740902",
"game_date": "2026-05-13",
"season": 2025,
"stage": "Regular Season",
"team_id": "382",
"team": "MNC",
"opponent": "CRY",
"home": true,
"goals_for": 3,
"goals_against": 0,
"starter": false,
"position": null,
"minute_on": null,
"minute_off": null,
"minutes": 0,
"goals": 0,
"assists": 0,
"shots": 0,
"shots_on_target": 0,
"xg": null,
"fouls_committed": 0,
"fouls_suffered": 0,
"offsides": 0,
"yellow_cards": 0,
"red_cards": 0,
"own_goals": 0,
"saves": null,
"goals_conceded": 0,
"shots_faced": null
},
"...3 more"
],
"count": 10,
"next_offset": 10
}The example player is Erling Haaland. The record against the line, market by market, is on the Erling Haaland prop history page.
What to do next
- get_leaders (5 credits). Rank every player on goals, assists or xG, per 90 or in total.
- search_players (1 credit). Find a player_id by name.
More guides
The same guide for other sports
Rather ask Claude? 21 free Claude skills call these endpoints for you.
Start with 500 free credits every month
No card. REST or MCP.