// Matches
Get match player heatmap
Get the spots where one player touched the ball in one match. Plot the points to draw a heatmap of where they played. Get player ids from the match lineups or match player stats.
GET
https://api.soccer-data.co/v1/matches/{match_id}/players/{player_id}/heatmap
- Returns 404 when there is no heatmap for this player in this match, for example an unused substitute or a match without positional data. An unknown match or player id also returns 404.
- For a whole season of touches, use the player season heatmap endpoint instead.
- How far back heatmaps go depends on the competition. See the coverage docs.
Path parameters
match_idstringrequired
The match's id, like match_…. Find one with the ID guide.
player_idstringrequired
The player's id, like player_…. Find one with the ID guide.
Response fields
data.match_idstring
The match's id.
data.player.idstring
Player's id.
data.player.namestring
Player's name.
data.team.idstring
Id of the team the player played for.
data.team.namestring
Name of that team.
data.team.sidestring
home or away.
data.points[]array
The player's touches, in the order they were recorded.
data.points[].xinteger
Position along one axis of the pitch, as a percentage from 0 to 100.
data.points[].yinteger
Position along the other axis of the pitch, as a percentage from 0 to 100.
curl "https://api.soccer-data.co/v1/matches/match_lhpm4gzskh3h/players/player_zm7yzjr75yjn/heatmap" \ -H "X-Api-Key: $SOCCER_DATA_KEY"
const res = await fetch("https://api.soccer-data.co/v1/matches/match_lhpm4gzskh3h/players/player_zm7yzjr75yjn/heatmap", {
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_lhpm4gzskh3h/players/player_zm7yzjr75yjn/heatmap",
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_lhpm4gzskh3h/players/player_zm7yzjr75yjn/heatmap')
->json('data');
200 · Example response
{
"data": {
"match_id": "match_lhpm4gzskh3h",
"player": {
"id": "player_zm7yzjr75yjn",
"name": "Dušan Vlahović"
},
"team": {
"id": "team_pk5nlzkswnt1",
"name": "Juventus",
"side": "home"
},
"points": [
{
"x": 41,
"y": 9
}
]
}
}
### GET /matches/{match_id}/players/{player_id}/heatmap
Get match player heatmap
Get the spots where one player touched the ball in one match. Plot the points to draw a heatmap of where they played. Get player ids from the match lineups or match player stats.
- Returns 404 when there is no heatmap for this player in this match, for example an unused substitute or a match without positional data. An unknown match or player id also returns 404.
- For a whole season of touches, use the player season heatmap endpoint instead.
- How far back heatmaps go depends on the competition. See the coverage docs.
Response fields:
- `data.match_id` (string): The match's id.
- `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.team.name` (string): Name of that team.
- `data.team.side` (string): home or away.
- `data.points[]` (array): The player's touches, in the order they were recorded.
- `data.points[].x` (integer): Position along one axis of the pitch, as a percentage from 0 to 100.
- `data.points[].y` (integer): Position along the other axis of the pitch, as a percentage from 0 to 100.
Example: curl "https://api.soccer-data.co/v1/matches/match_lhpm4gzskh3h/players/player_zm7yzjr75yjn/heatmap" -H "X-Api-Key: $SOCCER_DATA_KEY"