SportAPIPremier LeagueGet SportAPI Key

James Trafford

Position
Goalkeeper
Shirt
1
Country
England
Born
10 October 2002 (24)
11Premier League games (11 started)
0Goals
0Assists
990Minutes

This season, club and country

Games21
Started17
Minutes1350
Goals0
Assists0
Goals and assists per 90 min0
Saves55
Shots0
Shots on target0
Chances created0
Passes617
Pass accuracy, %65.7
Tackles0
Fouls0
Fouled2
Yellow cards0
Red cards0

All competitions, national team games included.

Since 2019/20, all clubs

Games100
Started36
Goals0
Assists0
Minutes3060
Pass accuracy, %73

Matches covered by SportAPI from the 2019/20 season on.

Get this player's data from the API

Every player in a club squad has a slug. The squad comes from /api/teams/slug/{club}, and the player profile from /api/players/{slug}. The profile has this season's numbers, the numbers since 2019/20 and every match the player played, in all competitions.

player.py
import requests

API_KEY = "YOUR_API_KEY"
player = requests.get(
    "https://sportapi.ai/api/players/james-trafford-2002-24365",
    headers={"X-API-Key": API_KEY},
    timeout=20,
).json()

print(player["player"]["full_name"], "-", player["team"]["full_name"])
season = player["season"]
print("Games:", season["appearances"], "Goals:", season["goals"], "Assists:", season["assists"])
for m in player["matches"][:5]:
    print(m["date"], m["home_team"], m["home_score"], "-", m["away_score"], m["away_team"], m["mins_played"], "min")

The API documentation lists every endpoint.

Updated 5 Dec, 07:34 UK time