Docs
Coverage MatrixDocumentationChange LogLog InContact Us
Docs

Event Tracking

MLB Event Tracking provides in-depth tracking information for all players on the field during a given event.

❗️

This endpoint is only available with our MLB Statcast access.

⏱️

Update Frequency

TTL / Cache: This endpoint will update to a 2s TTL (time to live) upon a game moving to inprogress. Upon closed, it will transfer to 120s.

Data Updates: Realtime

Click here for a comprehensive list of metrics and their definitions.



Data Points

Player Tracking Metrics:

Open the Player Tracking Metric Definitions doc for detailed info on every metric we offer

AttributeParent ElementTypeDescription
descriptionmetricStringText description of a player tracking metric
ex. The speed of a batted ball immediately after bat-on-ball contact.
groupmetricStringGroup of a player tracking metric
Baserunning, Batting, Pitching, Fielders (IF), Fielders (OF)
namemetricStringName of a player tracking metric
ex. Exit Velocity
unitmetricStringUnit of measurement for a player tracking metric
ex. MPH,Degrees,Seconds
valuemetricStringNumerical value of a player tracking metric
ex. 0.6(Seconds) or 37(Degrees)
Game:
AttributeParent ElementTypeDescription
away_teamgameGUIDUnique ID of the away team
ex. 29dd9a87-5bcc-4774-80c3-7f50d985068b
home_teamgameGUIDUnique ID of the home team
ex. ef64da7f-cfaf-4300-87b0-9313386b977c
idgameGUIDUnique ID of the game
ex. 1b554f5e-d8b7-4268-95da-2f4191015c84
referencegameStringUnique MLBAM ID of a game
Play-By-Play - Base Runner:
AttributeParent ElementTypeDescription
ending_baserunnerIntegerRunner's base at the end of a play
first_namerunnerStringFirst name of a runner
ex. Markus
full_namerunnerStringFull name of a runner
ex. Mookie Betts
suffixrunnerStringName suffix of a runner
ex. Jr.
jersey_numberrunnerIntegerNumber of a runner's jersey
last_namerunnerStringLast name of a runner
ex. Betts
outrunnerBooleanSignifies the runner was out on a play
outcome_idrunnerStringID of a runner outcome on a play. Check our FAQ for a list of valid outcomes and their definitions
description-StringText description of a runner outcome
ex. Will Smith to third. or Freddie Freeman scores.
idrunnerGUIDUnique player ID of a runner
ex. ea1a2111-44cc-4996-babb-9439465e6760
preferred_namerunnerStringPreferred name of a runner
ex. Mookie
starting_baserunnerIntegerRunner's base at the start of a play
Play-By-Play - Count:
AttributeParent ElementTypeDescription
ballscountIntegerNumber of balls in an at bat
outscountIntegerNumber of outs in an at bat
pitch_countcountIntegerNumber of pitches in an at bat
strikescountIntegerNumber of strikes in an at bat
Play-By-Play - Errors:
AttributeParent ElementTypeDescription
first_nameerrorStringFirst name of a player committing an error
ex. Gavin
full_nameerrorStringFull name of a player committing an error
ex. Gavin Lux
suffixerrorStringName suffix of a player committing an error
ex. Jr.
iderrorGUIDUnique player ID of a player committing an error
ex. ea1a2111-44cc-4996-babb-9439465e6760
jersey_numbererrorIntegerJersey number a player committing an error
last_nameerrorStringLast name of a player committing an error
ex. Lux
preferred_nameerrorStringPreferred name of a player committing an error
ex. Gavin
typeerrorStringType of fielding error
fielding,throwing,interference
Play-By-Play - Fielding:
AttributeParent ElementTypeDescription
first_nameassistStringFirst name of a player recording an assist
ex. Gavin
full_nameassistStringFull name of a player recording an assist
ex. Gavin Lux
suffixassistStringName suffix of a player recording an assist
ex. Jr.
idassistGUIDUnique player ID of a player recording an assist
ex. ea1a2111-44cc-4996-babb-9439465e6760
jersey_numberassistIntegerJersey number a player recording an assist
last_nameassistStringLast name of a player recording an assist
ex. Lux
preferred_nameassistStringPreferred name of a player recording an assist
ex. Gavin
sequenceassistIntegerSequential number of an assist
first_nameputoutStringFirst name of a player recording a putout
ex. Byron
full_nameputoutStringFull name of a player recording a putout
ex. Byron Buxton
suffixputoutStringName suffix of a player recording a putout
ex. Jr.
idputoutGUIDUnique player ID of a player recording a putout
ex. ea1a2111-44cc-4996-babb-9439465e6760
jersey_numberputoutIntegerJersey number a player recording a putout
last_nameputoutStringLast name of a player recording a putout
ex. Buxton
preferred_nameputoutStringPreferred name of a player recording a putout
ex. Gavin
sequenceputoutIntegerSequential number of a putout
Play-By-Play - Hit Data:

Please note that attributes within mlb_hit_data may not be present for every event

Attribute

Parent Element

Type

Description

coord_x

coordinates

Decimal

X coordinate marked by operator of where the ball was fielded

coord_y

coordinates

Decimal

Y coordinate marked by operator of where the ball was fielded

hardness

mlb_hit_data

String

Amount of hard contact on a hit
soft,medium,hard

launch_angle

mlb_hit_data

Decimal

Vertical angle relative to the horizon at which a hit was launched

Available with Statcast only

launch_speed

mlb_hit_data

Decimal

Measured speed of a hit ball (in miles per hour)

Available with Statcast only

location

mlb_hit_data

Integer

Positional number (1-9) of the player nearest to a hit ball location. Please see our FAQ for fielding position numbers and definitions

Available with Statcast only

Note: 78 and 89 are valid integers for left-center home runs (78) and right-center home runs (89)

total_distance

mlb_hit_data

Integer

Total distance a hit ball traveled (in feet)

Available with Statcast only

trajectory

mlb_hit_data

String

Trajectory of a batted ball into the field of play
bunt_grounder, bunt_line_drive, bunt_popup, fly_ball, ground_ball, line_drive, popup

hit_location

pitch

Integer

Number code of hit ball location (1-35). Please see our FAQ for a diagram of our field and its corresponding hit location zones

hit_type

pitch

String

Type of hit
GB(Ground ball), FB(Fly ball), LD(Line drive), PU(Popup)

Play-By-Play - Hitter:
AttributeParent ElementTypeDescription
first_namehitterStringFirst name of a hitter
ex. Markus
full_namehitterStringFull name of a hitter
ex. Mookie Betts
suffixhitterStringName suffix of a hitter
ex. Jr.
hitter_handpitcherStringHandedness of a hitter
idhitterGUIDUnique player ID of a hitter
ex. ea1a2111-44cc-4996-babb-9439465e6760
jersey_numberhitterIntegerNumber of a hitter's jersey
last_namehitterStringLast name of a hitter
ex. Betts
preferred_namehitterStringPreferred name of a hitter
ex. Mookie
Play-By-Play - Pitch Data:

Please note that attributes within mlb_pitch_data may not be present for every event

Attribute

Parent Element

Type

Description

break_angle

breaks

Decimal

Degrees clockwise (batter’s view) that the plane of the pitch deviates from the vertical

Available with Statcast only

break_length

breaks

Decimal

Max distance (in inches) that the pitch separates from the straight line between pitch start and pitch end

Available with Statcast only

break_y

breaks

Decimal

Distance (in feet) from home plate where the break is greatestAvailable with Statcast only

spin_direction

breaks

Decimal

Rate of spin on the ball (in RPMs) after it was released by pitcher.

Available with Statcast only

spin_rate

breaks

Decimal

The axis of rotation for the ball at release given as an angle that reflects how the spin will influence the ball trajectory. Pure back-spin is 180 degrees, pure side-spin that puts the ball to the 1b side is 90 degrees, pure-side spin that pulls the ball to the 3b side is 270 degrees, and pure top-spin is 0 or 360 degrees

Available with Statcast only

code

mlb_pitch_data

String

Two-letter code for a type of pitch.
FA, FF, FT, FC, SI, FS, FO, CH, SC, SL, CU, CS, KC, SU, FL, GY, KN, EP, IN, PO, AB, AS, NP, UN
See FAQ for pitch code descriptions

a_x

coordinates

Decimal

Ball acceleration on the x axis

Available with Statcast only

a_y

coordinates

Decimal

Ball acceleration on the y axis

Available with Statcast only

a_z

coordinates

Decimal

Ball acceleration on the z axis

Available with Statcast only

p_x

coordinates

Decimal

Horizontal position in feet of the ball as it crosses the front axis of home plate

Available with Statcast only

p_z

coordinates

Decimal

Vertical position in feet above home plate of the ball as it crosses the front axis of home plate

Available with Statcast only

pfx_x

coordinates

Decimal

Horizontal movement of the ball in inches

Available with Statcast only

pfx_z

coordinates

Decimal

Vertical movement of the ball in inches

Available with Statcast only

v_x0

coordinates

Decimal

Velocity of the ball from the x axisAvailable with Statcast only

v_y0

coordinates

Decimal

Velocity of the ball from the y axis; this is negative because 0,0,0 is behind the batter and the ball travels from pitcher mound towards 0,0,0

Available with Statcast only

v_z0

coordinates

Decimal

Velocity of the ball from the z axis

Available with Statcast only

x

coordinates

Decimal

X coordinate where a pitch crossed the front of home plate

x0

coordinates

Decimal

Coordinate location of the ball at the point it was released from the pitchers hand on the x axis (time = 0)

Available with Statcast only

y

coordinates

Decimal

Y coordinate where a pitch crossed the front of home plate

y0

coordinates

Decimal

Coordinate location of the ball at the point it was released from the pitchers hand on the y axis (time = 0)

Available with Statcast only

z0

coordinates

Decimal

Coordinate location of the ball at the point it was released from the pitchers hand on the z axis (time = 0)

Available with Statcast only

description

mlb_pitch_data

String

Text description of a pitch
ex. Curveball

end_speed

mlb_pitch_data

Decimal

Speed in MPH of the ball as it crosses the front edge of home plate (0,0 in the x axis)

Available with Statcast only

extension

mlb_pitch_data

Decimal

Measure of the true release point from pitching rubber - distance in feet closer to home plate than the 60.5 ft from pitching rubber to home

Available with Statcast only

plate_time

mlb_pitch_data

Decimal

Time from pitchers release until the ball is projected to reach the back tip of home plate or struck by the bat

Available with Statcast only

start_speed

mlb_pitch_data

Decimal

Speed in MPH of the ball at 50 feet in front of homeplate

strike_zone_bottom

mlb_pitch_data

Decimal

Distance in feet from ground to bottom of batter strike zone
ex. 1.7

strike_zone_top

mlb_pitch_data

Decimal

Distance in feet from ground to top of batter strike zone
ex. 3.56

Play-By-Play - Play Flags:
AttributeParent ElementTypeDescription
is_ab_overflagsBooleanIndicates an at bat has ended on a pitch
is_buntflagsBooleanIndicates a bunt play
is_double_playflagsBooleanIndicates a double play
is_passed_ballflagsBooleanIndicates a passed ball
is_hitflagsBooleanIndicates a hit
is_triple_playflagsBooleanIndicates a triple play
is_wild_pitchflagsBooleanIndicates a wild pitch
Play-By-Play - Pitch:
AttributeParent ElementTypeDescription
idpitchGUIDUnique ID of a pitch
ex. 37d94861-7ce4-4547-802c-f97f93e434b4
pitch_xpitcherIntegerNumber as a percentage distance from the center of the strike zone, in positive or negative values from approximately -300% to positive 300%
ex. 70
pitch_ypitcherIntegerNumber as a percentage distance from the center of the strike zone, in positive or negative values from approximately -200% to positive 200%
ex. -95
created_atpitchdateTimeTimestamp of a thrown pitch
ex. 2022-09-25T20:10:00+00:00
pitch_countpitcherIntegerNumber of pitches for a pitcher in a game
officialpitchBooleanSignifies whether the API is ingesting data directly from the league at the time of the event. For true, entry_mode=Ingest. For false, entry_mode=LDE.
outcome_idpitchStringID of a pitch outcome on a play. Check our FAQ for a list of valid outcomes and their definitions
sequence_numberpitchIntegerSequential number of a pitch in a game
pitch_speedpitcherStringSpeed of a pitch in MPH
ex. 92.0
pitch_typepitcherStringCode for a type of pitch.
FA(Fastball), SI(Sinker), CT(Cutter), CU(Curveball), SL(Slider), CH(Changeup), KN(Knuckleball), SP(Splitter), SC(Screwball), FO(Forkball), IB(Intentional Ball), PI(Pitchout), Other
pitch_zonepitcherIntegerNumber corresponding to the pitch strike zone (1-13)
See our FAQ for more detail and a graphic representation
statuspitchStringStatus of a pitch. Can be utilized to determine if a play is or was under review
official, overturned, under review, upheld
updated_atpitchdateTimeTimestamp of a pitch update
ex. 2022-09-25T20:25:14+00:00
end_timewall_clockdateTimeTimestamp of an event end time
ex. 2022-09-25T23:00:45+00:00
start_timewall_clockdateTimeTimestamp of an event start time
ex. 2022-09-25T23:00:45+00:00
Play-By-Play - Pitcher:
AttributeParent ElementTypeDescription
first_namepitcherStringFirst name of a pitcher
ex. Clayton
full_namepitcherStringFull name of a pitcher
ex. Clayton Kershaw
suffixpitcherStringName suffix of a pitcher
ex. Jr.
pitcher_handpitcherStringHandedness of a pitcher
idpitcherGUIDUnique player ID of a pitcher
ex. ea1a2111-44cc-4996-babb-9439465e6760
jersey_numberpitcherIntegerNumber of a pitcher's jersey
last_namepitcherStringLast name of a pitcher
ex. Kershaw
preferred_namepitcherStringPreferred name of a pitcher
ex. Clayton
Play-By-Play - Steal:
AttributeParent ElementTypeDescription
created_atstealdateTimeTimestamp of a steal attempt
ex. 2022-09-25T20:10:00+00:00
idstealGUIDUnique ID of a steal attempt
ex. bebe4b5d-970a-40f4-bfa5-05a9a38eac4a
officialstealBooleanSignifies whether the API is ingesting data directly from the league at the time of the event. For true, entry_mode=Ingest. For false, entry_mode=LDE.
sequence_numberstealIntegerSequence number of an event within a game
statusstealStringStatus of a pitch/play. Can be utilized to determine if a play is or was under review
official, overturned, under review, upheld
updated_atstealdateTimeTimestamp of a steal attempt update
ex. 2022-09-25T20:25:14+00:00
Player:
AttributeParent ElementTypeDescription
first_nameplayerStringFirst name of a player
ex. Markus
full_nameplayerStringFull name of a player
ex. Mookie Betts
suffixplayerStringName suffix of a player
ex. Jr.
idplayerGUIDUnique ID of a player
ex. ea1a2111-44cc-4996-babb-9439465e6760
jersey_numberplayerIntegerNumber of a player's jersey
last_nameplayerStringLast name of a runner
ex. Betts
preferred_nameplayerStringPreferred name of a player
ex. Mookie
Series:
AttributeParent ElementTypeDescription
ps_gamegameIntegerGame number in a series
ps_roundgameStringName of a series
ex. ALDS
Venue:
AttributeParent ElementTypeDescription
addressvenueStringAddress of a venue
ex. 1000 Vin Scully Avenue
capacityvenueStringCapacity of a venue
ex. 56000
cityvenueStringCity of a venue
ex. Los Angeles
countryvenueStringCountry of a venue
ex. USA
field_orientationvenueStringField orientation of a venue
ex. NE
idvenueGUIDUnique ID of a venue
ex. 66a19c3d-24fe-477d-bee7-c6ef1b98352f
latlocationDecimalLatitude of a venue
ex. 34.0745409
lnglocationDecimalLongitude of a venue
ex. -118.2408881
marketvenueStringMarket of a venue
ex. Los Angeles
namevenueStringName of a venue
ex. Dodger Stadium
stadium_typevenueStringType of a venue
ex. outdoor
statevenueStringState of a venue
ex. CA
surfacevenueStringSurface type of a venue
ex. grass
time_zonevenueStringTime zone of a venue
ex. US/Eastern
zipvenueIntegerZIP code of a venue
ex. 90012
Language
Credentials
Header
Click Try It! to start a request and see the response here!