Matches
Get live match player stats
Returns per-player stats while a match is in play, with meta.match_status = "live". Poll it during the match. Returns 409 when the match is not live; use /player-stats after full-time.
Example: GET /football/matches/mt_838955483/live-player-stats
GET
/
football
/
matches
/
{match_id}
/
live-player-stats
Get live match player stats
curl --request GET \
--url https://api.thestatsapi.com/api/football/matches/{match_id}/live-player-stats \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thestatsapi.com/api/football/matches/{match_id}/live-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}/live-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
}
}
],
"meta": {
"match_status": "live"
}
}
After full-time, use Get match player stats. How to poll during a match: Live matches.
Authorizations
Your API key, sent as Authorization: Bearer YOUR_API_KEY. Get one at https://www.thestatsapi.com/api-keys
Path Parameters
Match ID of a live match. Find live matches with GET /football/matches?status=live
Query Parameters
Comma-separated player IDs. Returns only these players
⌘I
Get live match player stats
curl --request GET \
--url https://api.thestatsapi.com/api/football/matches/{match_id}/live-player-stats \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.thestatsapi.com/api/football/matches/{match_id}/live-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}/live-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
}
}
],
"meta": {
"match_status": "live"
}
}