Matches
Get match player stats
Returns per-player stats for a played match: rating, minutes, passing, shooting (including xG and xA), duels, defending, goalkeeping, fouls and cards. Add player_ids to get only some players. While the match is live it returns 409; use /live-player-stats instead.
Example: GET /football/matches/mt_838955483/player-stats?player_ids=pl_4089246,pl_08984824 (Virgil van Dijk and Alexis Mac Allister)
GET
/
football
/
matches
/
{match_id}
/
player-stats
Get match player stats
curl --request GET \
--url https://api.thestatsapi.com/api/football/matches/{match_id}/player-stats \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thestatsapi.com/api/football/matches/{match_id}/player-stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thestatsapi.com/api/football/matches/{match_id}/player-stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"player_id": "pl_08984824",
"player_name": "Alexis Mac Allister",
"team_id": "tm_0406",
"position": "M",
"rating": 6.09,
"minutes_played": 90,
"started": true,
"played": true,
"passing": {
"total_passes": 123,
"accurate_passes": 123,
"key_passes": 123,
"assists": 123,
"total_crosses": 123,
"accurate_crosses": 123,
"total_long_balls": 123,
"accurate_long_balls": 123
},
"shooting": {
"goals": 123,
"total_shots": 123,
"shots_on_target": 123,
"shots_off_target": 123,
"blocked_shots": 123,
"big_chances_created": 123,
"expected_goals": 123,
"expected_assists": 123,
"np_expected_goals": 123
},
"duels": {
"duel_won": 123,
"duel_lost": 123,
"aerial_won": 123,
"challenge_lost": 123,
"won_contest": 123,
"dispossessed": 123
},
"defending": {
"tackles": 123,
"interceptions": 123,
"clearances": 123,
"ball_recoveries": 123
},
"goalkeeping": {
"saves": 123
},
"general": {
"touches": 123,
"fouls": 123,
"was_fouled": 123,
"offsides": 123,
"yellow_cards": 123,
"red_cards": 123,
"possession_lost": 123,
"player_subbed_on": null,
"player_subbed_off": null
}
}
]
}During a match, use Get live match player stats. See Player and team stats.
Authorizations
Your API key, sent as Authorization: Bearer YOUR_API_KEY. Get one at https://www.thestatsapi.com/api-keys
Path Parameters
⌘I
Get match player stats
curl --request GET \
--url https://api.thestatsapi.com/api/football/matches/{match_id}/player-stats \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thestatsapi.com/api/football/matches/{match_id}/player-stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.thestatsapi.com/api/football/matches/{match_id}/player-stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"player_id": "pl_08984824",
"player_name": "Alexis Mac Allister",
"team_id": "tm_0406",
"position": "M",
"rating": 6.09,
"minutes_played": 90,
"started": true,
"played": true,
"passing": {
"total_passes": 123,
"accurate_passes": 123,
"key_passes": 123,
"assists": 123,
"total_crosses": 123,
"accurate_crosses": 123,
"total_long_balls": 123,
"accurate_long_balls": 123
},
"shooting": {
"goals": 123,
"total_shots": 123,
"shots_on_target": 123,
"shots_off_target": 123,
"blocked_shots": 123,
"big_chances_created": 123,
"expected_goals": 123,
"expected_assists": 123,
"np_expected_goals": 123
},
"duels": {
"duel_won": 123,
"duel_lost": 123,
"aerial_won": 123,
"challenge_lost": 123,
"won_contest": 123,
"dispossessed": 123
},
"defending": {
"tackles": 123,
"interceptions": 123,
"clearances": 123,
"ball_recoveries": 123
},
"goalkeeping": {
"saves": 123
},
"general": {
"touches": 123,
"fouls": 123,
"was_fouled": 123,
"offsides": 123,
"yellow_cards": 123,
"red_cards": 123,
"possession_lost": 123,
"player_subbed_on": null,
"player_subbed_off": null
}
}
]
}