PitchAPIDocumentationShots

Shots API

Shot-level detail is the point of the API: where the ball was struck, where it crossed the line, and how likely it was to go in.

Shot-level detail is the reason the API exists. GET /v1/matches/{id}/shots returns every attempt in a match with the player, the minute, the body part, the situation, both coordinate pairs and the expected-goals figures. A single shot is available by its match-scoped s_ ID, and one player's shots are available without filtering the match yourself.

Coordinates are metres on a real 105 x 68 pitch, not a normalised grid, and they are direction-normalised so every shot attacks the goal at x = 105. The goal-line pair is separate from the pitch pair: goal_crossed_y is measured across the full pitch width, not the opening alone.

expected_goals_on_target is omitted when unavailable rather than sent as zero. Null means undefined throughout the API, and a shot with no xGOT is not a shot worth zero.

Data model

Shot fields

Every shot response includes the fields below. A few need care: is_on_target is also true for blocked shots heading on target, and expected_goals_on_target is omitted when unavailable.

id
string
Shot identifier, scoped to this match. Not globally unique.
player
object
The player who took the shot (id, name, position_id, image_url).
team_id
string
The team that took the shot.
x
number
0 to 105
Pitch x coordinate where the shot was struck, in metres.
y
number
0 to 68
Pitch y coordinate where the shot was struck, in metres.
expected_goals
number
0 to 1
Chance quality before the shot, as a probability from 0 to 1.
expected_goals_on_target
number
0 to 1
Chance quality after the shot, given where it crossed the line. Omitted when unavailable.
is_on_target
boolean
Whether the shot was on target.
goal_crossed_y
number
0 to 68
Y coordinate where the shot crossed the goal line. Omitted when the crossing position isn't available.
goal_crossed_z
number
0 to 7.6
Height in metres where the shot crossed the goal line. Omitted when the crossing position isn't available.
is_inside_box
boolean
Whether the shot was taken from inside the penalty area.
event_type
string
The outcome: Goal, AttemptSaved, Miss, or Post.
situation
string
How the chance arose: RegularPlay, FromCorner, SetPiece, FastBreak, FreeKick, ThrowInSetPiece, Penalty, or IndividualPlay.
shot_type
string
Body part used: RightFoot, LeftFoot, Header, or OtherBodyParts.
minute
integer
Match minute the shot was taken, not counting stoppage time.
minute_added
integer
Stoppage-time minutes added to minute. Omitted when none was added.
is_blocked
boolean
Whether a defender blocked the shot before it reached the goal.
blocked_x
number
Pitch x coordinate where the ball was intercepted or blocked. Omitted when not blocked.
blocked_y
number
Pitch y coordinate where the ball was intercepted or blocked. Omitted when not blocked.
is_own_goal
boolean
Whether the goal was an own goal.
is_saved_off_line
boolean
Whether the ball was cleared off the goal line.
keeper
object
The goalkeeper facing the shot (id, name, position_id, image_url). Omitted when unavailable.
Data model

Coordinate systems

Shots carry two coordinate pairs: where the ball was struck on the pitch and where it crossed the goal line. Both are in metres on a real 105 x 68 pitch, not a normalised grid.

Pitch coordinates are normalised for direction: every shot attacks the goal at x equals 105 regardless of which side took it. You never need to flip the axis for direction. Every distance in the advanced analytics uses the same pitch and the same units.

Heatmaps use the same pitch but count cells rather than metres, on a 16 x 12 grid the response describes in its grid block. They inherit the direction normalisation: cell_x 0 is the acting team's own goal line and 15 the opponent's, for both teams and in both halves. It is not the left end of the pitch. Each grid is therefore right on its own pitch, but the two are not on a shared one. To draw both teams together, request frame equals home_ltr and the server turns the away side for you — there is nothing to mirror by hand. Every team and player also carries a side field, home or away, and grid.frame echoes the orientation actually served.

On the pitch
x0 to 105
Distance along the pitch in metres, normalised so the attacking goal is always at 105.
y0 to 68
Lateral position across the pitch in metres. The centre line is at 34.
On the goal line
goal_crossed_y0 to 68
Where the shot crossed the goal line on the same y axis as the pitch.
goal_crossed_z0 to 7.6
Height above the ground where the shot crossed the goal line.
Goal width
7.32 m
posts at y = 30.34 and 37.66
Crossbar height
2.44 m
z above this is over
Penalty area
16.5 m deep
x >= 88.5
Penalty spot
11 m out
x = 94

The goal_crossed_y field is measured across the full pitch width, not the goal opening alone.

API reference

Endpoints

Every request takes an X-API-KEY header and returns the JSON envelope described on the overview.

GET/v1/matches/{id}/shots

List shots

Every shot in the match, grouped by half. Each shot has pitch coordinates for the strike point plus goal-line coordinates for where it crossed or missed.

Auth API keyResponse JSON
idstringrequired

Match ID, for example m_B8x2K9

curl https://api.pitchapi.dev/v1/matches/{id}/shots \
  -H "X-API-KEY: $PITCH_KEY"
GET/v1/matches/{id}/shots/{shot_id}

Retrieve a shot

One shot. Shot IDs are match-scoped, so the same value in a different match is a different shot.

Auth API keyResponse JSON
idstringrequired

Match ID, for example m_B8x2K9

shot_idstringrequired

Shot ID scoped to the match, for example s_Q1pR6z

curl https://api.pitchapi.dev/v1/matches/{id}/shots/{shot_id} \
  -H "X-API-KEY: $PITCH_KEY"
GET/v1/matches/{id}/players/{player_id}/shots

List a player's shots

All of one player's shots in a match. Use this to build a single-player shotmap without filtering the full shot list.

Auth API keyResponse JSON
idstringrequired

Match ID, for example m_B8x2K9

player_idstringrequired

Player ID, for example p_7YtX4q

curl https://api.pitchapi.dev/v1/matches/{id}/players/{player_id}/shots \
  -H "X-API-KEY: $PITCH_KEY"
Questions

Common questions

Are shot coordinates normalised?
No. They are metres on a 105 x 68 pitch, and they are already normalised for direction, so you never flip the axis for the team attacking right to left. Heatmaps are the exception: they use a 16 x 12 cell grid.
Why is expected_goals_on_target missing?
The field is omitted when the model has no value for that attempt. Treat a missing value and null the same way: undefined, never zero. Summing xG should skip it, not add it as 0.
Something missing or wrong? That is a bug in the docs.Get a free key
On this page