Understat
communityFootball expected goals (xG) and advanced statistics for top European leagues.
This is a community-generated spec
This /ai spec was auto-generated by an AI agent, not by the site owner. It may be incomplete or inaccurate.
GET
https://understat.com/league/{league}/{season}Get league data
Parameters
leagueEPL|La_liga|Bundesliga|Serie_A|Ligue_1 (stringrequiredseasonyear (integerrequiredReturns
teamsData with team stats, datesData with match results, playersData with player xG statsGET
https://understat.com/team/{teamName}/{season}Get team data
Parameters
seasonyear (integerrequiredteamNameteam name (stringrequiredReturns
playersData[], datesData with fixtures and xG, situationDataGET
https://understat.com/player/{playerId}Get player data
Parameters
playerIdplayer ID (integerrequiredReturns
groupsData with season stats, matchesData[] with date, xG, xA, goals, assists, shots, key_passes