Get match player stats
Get every player's stats from a played match: rating, minutes, passing, shooting, duels, defending, goalkeeping and discipline. Use it for player ratings, a man-of-the-match pick or fantasy points. Pass player_ids to get only the players you care about.
https://api.soccer-data.co/v1/matches/{match_id}/player-stats
- Returns 409 MATCH_IS_LIVE while the match is in play. Use the live player stats endpoint until full-time.
- Returns 404 STATS_NOT_AVAILABLE when detailed stats were never collected for the match, and 404 NOT_FOUND when the match is unknown or its stats aren't in yet.
- rating, the xG fields and ball_recoveries can be null. Treat null as 'not recorded', not as zero.
- Stat depth varies by competition. See the coverage docs before you rely on a stat.
The match's id, like match_…. Find one with the ID guide.
Comma-separated player ids. Only these players are returned. Leave it out to get every player.
Player's id.
Player's name.
Id of the team the player played for.
G, D, M or F. An empty string when unknown.
Match rating.
Minutes on the pitch.
Whether the player was in the starting XI.
Whether the player got any minutes. False for unused substitutes.
Passing counts. Stats: total_passes, accurate_passes, key_passes, assists, total_crosses, accurate_crosses, total_long_balls, accurate_long_balls.
Shooting counts. Stats: goals, total_shots, shots_on_target, shots_off_target, blocked_shots, big_chances_created.
Expected goals (xG) from the player's shots.
Expected assists (xA) from the player's passes.
xG without penalties.
Duel counts. Stats: duel_won, duel_lost, aerial_won, challenge_lost, won_contest (take-ons won), dispossessed.
Defensive counts. Stats: tackles, interceptions, clearances.
Times the player won the ball back. Null for older matches where it wasn't recorded; 0 means none. The players' values add up to the team's defending.ball_recoveries in the match stats endpoint.
Saves made.
General counts. Stats: touches, fouls (committed), was_fouled, offsides, yellow_cards, red_cards, possession_lost.
Id of the player who came on to replace this player. Null if this player wasn't taken off.
Id of the player this player replaced when coming on. Null if this player didn't come off the bench.
curl "https://api.soccer-data.co/v1/matches/{match_id}/player-stats" \
-H "X-Api-Key: $SOCCER_DATA_KEY"
const res = await fetch("https://api.soccer-data.co/v1/matches/{match_id}/player-stats", {
headers: { "X-Api-Key": process.env.SOCCER_DATA_KEY },
});
const { data } = await res.json();
import os, requests
res = requests.get(
"https://api.soccer-data.co/v1/matches/{match_id}/player-stats",
headers={"X-Api-Key": os.environ["SOCCER_DATA_KEY"]},
)
data = res.json()["data"]
$data = Http::withHeaders(['X-Api-Key' => env('SOCCER_DATA_KEY')])
->get('https://api.soccer-data.co/v1/matches/{match_id}/player-stats')
->json('data');
{
"data": [
{
"player_id": "player_lmlngjs41xni",
"player_name": "Alexis Mac Allister",
"team_id": "team_74p8tg2k93z4",
"position": "M",
"rating": 6.09,
"minutes_played": 90,
"started": true,
"played": true,
"passing": {
"total_passes": 58,
"accurate_passes": 51,
"key_passes": 1,
"assists": 0,
"total_crosses": 2,
"accurate_crosses": 0,
"total_long_balls": 5,
"accurate_long_balls": 3
},
"shooting": {
"goals": 0,
"total_shots": 1,
"shots_on_target": 0,
"shots_off_target": 1,
"blocked_shots": 0,
"big_chances_created": 0,
"expected_goals": 0.04,
"expected_assists": 0.08,
"np_expected_goals": 0.04
},
"duels": {
"duel_won": 5,
"duel_lost": 6,
"aerial_won": 1,
"challenge_lost": 1,
"won_contest": 0,
"dispossessed": 1
},
"defending": {
"tackles": 2,
"interceptions": 1,
"clearances": 1,
"ball_recoveries": 6
},
"goalkeeping": {
"saves": 0
},
"general": {
"touches": 71,
"fouls": 2,
"was_fouled": 1,
"offsides": 0,
"yellow_cards": 0,
"red_cards": 0,
"possession_lost": 9,
"player_subbed_on": null,
"player_subbed_off": null
}
}
]
}
### GET /matches/{match_id}/player-stats
Get match player stats
Get every player's stats from a played match: rating, minutes, passing, shooting, duels, defending, goalkeeping and discipline. Use it for player ratings, a man-of-the-match pick or fantasy points. Pass player_ids to get only the players you care about.
- Returns 409 MATCH_IS_LIVE while the match is in play. Use the live player stats endpoint until full-time.
- Returns 404 STATS_NOT_AVAILABLE when detailed stats were never collected for the match, and 404 NOT_FOUND when the match is unknown or its stats aren't in yet.
- rating, the xG fields and ball_recoveries can be null. Treat null as 'not recorded', not as zero.
- Stat depth varies by competition. See the coverage docs before you rely on a stat.
Query parameters:
- `player_ids` (string): Comma-separated player ids. Only these players are returned. Leave it out to get every player.
Response fields:
- `data[].player_id` (string): Player's id.
- `data[].player_name` (string): Player's name.
- `data[].team_id` (string): Id of the team the player played for.
- `data[].position` (string): G, D, M or F. An empty string when unknown.
- `data[].rating` (number|null): Match rating.
- `data[].minutes_played` (integer): Minutes on the pitch.
- `data[].started` (boolean): Whether the player was in the starting XI.
- `data[].played` (boolean): Whether the player got any minutes. False for unused substitutes.
- `data[].passing.{stat}` (integer): Passing counts. Stats: total_passes, accurate_passes, key_passes, assists, total_crosses, accurate_crosses, total_long_balls, accurate_long_balls.
- `data[].shooting.{stat}` (integer): Shooting counts. Stats: goals, total_shots, shots_on_target, shots_off_target, blocked_shots, big_chances_created.
- `data[].shooting.expected_goals` (number|null): Expected goals (xG) from the player's shots.
- `data[].shooting.expected_assists` (number|null): Expected assists (xA) from the player's passes.
- `data[].shooting.np_expected_goals` (number|null): xG without penalties.
- `data[].duels.{stat}` (integer): Duel counts. Stats: duel_won, duel_lost, aerial_won, challenge_lost, won_contest (take-ons won), dispossessed.
- `data[].defending.{stat}` (integer): Defensive counts. Stats: tackles, interceptions, clearances.
- `data[].defending.ball_recoveries` (integer|null): Times the player won the ball back. Null for older matches where it wasn't recorded; 0 means none. The players' values add up to the team's defending.ball_recoveries in the match stats endpoint.
- `data[].goalkeeping.saves` (integer): Saves made.
- `data[].general.{stat}` (integer): General counts. Stats: touches, fouls (committed), was_fouled, offsides, yellow_cards, red_cards, possession_lost.
- `data[].general.player_subbed_on` (string|null): Id of the player who came on to replace this player. Null if this player wasn't taken off.
- `data[].general.player_subbed_off` (string|null): Id of the player this player replaced when coming on. Null if this player didn't come off the bench.
Example: curl "https://api.soccer-data.co/v1/matches/{match_id}/player-stats" -H "X-Api-Key: $SOCCER_DATA_KEY"