STAT-API

MLB pitches API

pitchesmlb.pitches
Every individual pitch thrown in every MLB game — the pitch type, velocity, location, movement, spin, and the result (called strike, swinging strike, foul, ball, hit, walk).
GET/api/v1/mlb/pitches
Requires one of: game_id — requests satisfying none of these return 400.
Parameters
game_idquerybigintoptional
Filter to a single game.
limitqueryintegeroptionaldefault 50
Page size. Defaults to 50; max 5000.
from_idquerybigintoptional
Return rows with id strictly greater than this value; page using the previous response's `next_from_id`. Omit on the first page.
Restores the documented defaults (trial keys only accept the unchanged defaults).
Request
curl -sS --compressed \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  'https://api.stat-api.com/api/v1/mlb/pitches?game_id=1'
Responses
200pitches rows matching the declared filter set, wrapped in { pitches, limit, next_from_id }. next_from_id is the last row's id on a full page — pass it back via ?from_id= to walk the full result; null marks the terminal page.application/jsonshow example ▸
400No declared filter set was satisfied — response body matches MissingRequiredFiltersError; pick one combo from the accepted-sets hint and resend.application/json
Response Schema(73 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
at_bat_id
bigint—
e.g. 1494
batter_id
bigint—
e.g. 306
game_id
bigint—
e.g. 84
pitcher_id
bigint—
e.g. 267
play_id
bigint——
e.g. 12
air_out
boolean—Whether this pitch resulted in an air out
e.g. false
ball
boolean——
Values:falsetrue
barrel
booleannullable—Optimal combination of exit velocity and launch angle
Values:falsetrue
break_angle
floatnullable——
e.g. 1.2
break_length
floatnullable——
e.g. 3.6
break_y
floatnullable——
e.g. 24
breaking_ball
booleannullable—Breaking ball (curveball, slider, knuckleball)
Values:falsetrue
call
string——
Values:BallFoulCalled StrikeIn play, out(s)Swinging StrikeIn play, no outIn play, run(s)Ball In DirtFoul TipSwinging Strike (Blocke…Hit By PitchFoul BuntPitchoutMissed Bunt
catchers_interference
boolean—Whether this pitch resulted in catchers interference
e.g. false
chase
booleannullable—Whether batter swung at pitch outside zone
e.g. true
double
boolean—Whether this pitch resulted in a double
Values:falsetrue
effective_speed
floatnullable—Perceived speed to batter (mph)
e.g. 85.3
expected_batting_avg
decimalnullable—xBA based on exit velocity and launch angle
e.g. — (all-null in sample)
expected_woba
decimalnullable—xwOBA based on exit velocity and launch angle
e.g. — (all-null in sample)
extension
floatnullable——
e.g. 7.015639833312882
fastball
booleannullable—Fastball variant (4-seam, 2-seam, sinker, cutter)
Values:truefalse
flare_burner
booleannullable—Launch angle 10-25 AND exit velocity < 95
Values:falsetrue
fly_out
boolean—Whether this pitch resulted in a fly out
Values:falsetrue
ground_into_double_play
boolean—Whether this pitch resulted in grounding into double play
e.g. false
ground_into_triple_play
boolean—Whether this pitch resulted in grounding into triple play
e.g. false
ground_out
boolean—Whether this pitch resulted in a ground out
Values:falsetrue
hard_hit
booleannullable—Exit velocity >= 95 MPH
Values:falsetrue
hit_by_pitch
boolean—Whether this pitch resulted in hit by pitch
Values:falsetrue
hit_coord_x
floatnullable—Hit coordinate X (feet from home plate)
e.g. 153.39
hit_coord_y
floatnullable—Hit coordinate Y (feet from home plate)
e.g. 167.3
hit_distance
integernullable—Distance of batted ball (feet)
e.g. 4
hit_exit_velocity
floatnullable—Exit velocity of batted ball (mph)
e.g. 103.4
hit_launch_angle
floatnullable—Launch angle of batted ball (degrees)
e.g. 5
home_run
boolean—Whether this pitch resulted in a home run
Values:falsetrue
in_play
boolean——
Values:falsetrue
in_strike_zone
booleannullable—Whether pitch was in the strike zone
Values:falsetrue
intentional_walk
boolean—Whether this pitch resulted in an intentional walk
e.g. false
launch_speed_angle_zone
integernullable—1=Weak, 2=Topped, 3=Under, 4=Flare/Burner, 5=Solid, 6=Barrel
e.g. 3
line_out
boolean—Whether this pitch resulted in a line out
Values:falsetrue
offspeed
booleannullable—Offspeed pitch (changeup, splitter, forkball)
Values:falsetrue
pitch_number
integer——
e.g. 1
pitch_speed
floatnullable——
e.g. 92.6
pitch_type
stringnullable——
Values:FFSISLCHFCSTCUFSKCSVFA
pitch_x
floatnullable——
e.g. 0.36271081581727094
pitch_y
floatnullable——
e.g. 155.85
pitch_z
floatnullable——
e.g. 3.5469804155056193
pitch_zone
integernullable——
e.g. 14
plate_x
floatnullable——
e.g. 125.18
plate_z
floatnullable——
e.g. 155.85
pop_out
boolean—Whether this pitch resulted in a pop out
Values:falsetrue
release_speed
floatnullable—Speed at release point (mph)
e.g. 92.6
result
string——
Values:BallFoulCalled StrikeIn play, out(s)Swinging StrikeIn play, no outIn play, run(s)Ball In DirtFoul TipSwinging Strike (Blocke…Hit By PitchFoul BuntPitchoutMissed Bunt
sacrifice_fly
boolean—Whether this pitch resulted in a sacrifice fly
Values:falsetrue
sacrifice_hit
boolean—Whether this pitch resulted in a sacrifice bunt
Values:falsetrue
single
boolean—Whether this pitch resulted in a single
Values:falsetrue
solid_contact
booleannullable—Launch angle 20-25 AND exit velocity 95-100
Values:falsetrue
spin_axis
floatnullable—Spin axis (degrees)
e.g. — (all-null in sample)
spin_direction
floatnullable——
e.g. 211
spin_rate
floatnullable——
e.g. 2190
spray_angle
floatnullable—Horizontal angle from center field (degrees)
e.g. -6.1
start_time
timestamptznullable—Wall-clock time of the pitch, as the league records it
e.g. — (all-null in sample)
statcast_quality_score
decimalnullable—Statcast data quality score (0.0-1.0)
e.g. — (all-null in sample)
strike
boolean——
Values:falsetrue
strike_zone_bottom
floatnullable——
e.g. 1.63
strike_zone_top
floatnullable——
e.g. 3.51
strikeout
boolean—Whether this pitch resulted in a strikeout
Values:falsetrue
sweet_spot
booleannullable—Launch angle between 8-32 degrees
Values:falsetrue
topped
booleannullable—Launch angle < 10 AND exit velocity < 90
Values:falsetrue
tracking_confidence
decimalnullable—Confidence in tracking data accuracy
e.g. — (all-null in sample)
triple
boolean—Whether this pitch resulted in a triple
Values:falsetrue
under
booleannullable—Launch angle less than 10 degrees
Values:falsetrue
walk
boolean—Whether this pitch resulted in a walk
Values:falsetrue
GET/api/v1/mlb/pitches/{id}
Parameters
idpathbigintrequired
Primary key (id) of the pitche row.
Restores the documented defaults (trial keys only accept the unchanged defaults).
Request
curl -sS --compressed \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  'https://api.stat-api.com/api/v1/mlb/pitches/{pk_value}'
Responses
200Single pitche row.application/jsonshow example ▸
404Row not found.
Response Schema(73 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
at_bat_id
bigint—
e.g. 1494
batter_id
bigint—
e.g. 306
game_id
bigint—
e.g. 84
pitcher_id
bigint—
e.g. 267
play_id
bigint——
e.g. 12
air_out
boolean—Whether this pitch resulted in an air out
e.g. false
ball
boolean——
Values:falsetrue
barrel
booleannullable—Optimal combination of exit velocity and launch angle
Values:falsetrue
break_angle
floatnullable——
e.g. 1.2
break_length
floatnullable——
e.g. 3.6
break_y
floatnullable——
e.g. 24
breaking_ball
booleannullable—Breaking ball (curveball, slider, knuckleball)
Values:falsetrue
call
string——
Values:BallFoulCalled StrikeIn play, out(s)Swinging StrikeIn play, no outIn play, run(s)Ball In DirtFoul TipSwinging Strike (Blocke…Hit By PitchFoul BuntPitchoutMissed Bunt
catchers_interference
boolean—Whether this pitch resulted in catchers interference
e.g. false
chase
booleannullable—Whether batter swung at pitch outside zone
e.g. true
double
boolean—Whether this pitch resulted in a double
Values:falsetrue
effective_speed
floatnullable—Perceived speed to batter (mph)
e.g. 85.3
expected_batting_avg
decimalnullable—xBA based on exit velocity and launch angle
e.g. — (all-null in sample)
expected_woba
decimalnullable—xwOBA based on exit velocity and launch angle
e.g. — (all-null in sample)
extension
floatnullable——
e.g. 7.015639833312882
fastball
booleannullable—Fastball variant (4-seam, 2-seam, sinker, cutter)
Values:truefalse
flare_burner
booleannullable—Launch angle 10-25 AND exit velocity < 95
Values:falsetrue
fly_out
boolean—Whether this pitch resulted in a fly out
Values:falsetrue
ground_into_double_play
boolean—Whether this pitch resulted in grounding into double play
e.g. false
ground_into_triple_play
boolean—Whether this pitch resulted in grounding into triple play
e.g. false
ground_out
boolean—Whether this pitch resulted in a ground out
Values:falsetrue
hard_hit
booleannullable—Exit velocity >= 95 MPH
Values:falsetrue
hit_by_pitch
boolean—Whether this pitch resulted in hit by pitch
Values:falsetrue
hit_coord_x
floatnullable—Hit coordinate X (feet from home plate)
e.g. 153.39
hit_coord_y
floatnullable—Hit coordinate Y (feet from home plate)
e.g. 167.3
hit_distance
integernullable—Distance of batted ball (feet)
e.g. 4
hit_exit_velocity
floatnullable—Exit velocity of batted ball (mph)
e.g. 103.4
hit_launch_angle
floatnullable—Launch angle of batted ball (degrees)
e.g. 5
home_run
boolean—Whether this pitch resulted in a home run
Values:falsetrue
in_play
boolean——
Values:falsetrue
in_strike_zone
booleannullable—Whether pitch was in the strike zone
Values:falsetrue
intentional_walk
boolean—Whether this pitch resulted in an intentional walk
e.g. false
launch_speed_angle_zone
integernullable—1=Weak, 2=Topped, 3=Under, 4=Flare/Burner, 5=Solid, 6=Barrel
e.g. 3
line_out
boolean—Whether this pitch resulted in a line out
Values:falsetrue
offspeed
booleannullable—Offspeed pitch (changeup, splitter, forkball)
Values:falsetrue
pitch_number
integer——
e.g. 1
pitch_speed
floatnullable——
e.g. 92.6
pitch_type
stringnullable——
Values:FFSISLCHFCSTCUFSKCSVFA
pitch_x
floatnullable——
e.g. 0.36271081581727094
pitch_y
floatnullable——
e.g. 155.85
pitch_z
floatnullable——
e.g. 3.5469804155056193
pitch_zone
integernullable——
e.g. 14
plate_x
floatnullable——
e.g. 125.18
plate_z
floatnullable——
e.g. 155.85
pop_out
boolean—Whether this pitch resulted in a pop out
Values:falsetrue
release_speed
floatnullable—Speed at release point (mph)
e.g. 92.6
result
string——
Values:BallFoulCalled StrikeIn play, out(s)Swinging StrikeIn play, no outIn play, run(s)Ball In DirtFoul TipSwinging Strike (Blocke…Hit By PitchFoul BuntPitchoutMissed Bunt
sacrifice_fly
boolean—Whether this pitch resulted in a sacrifice fly
Values:falsetrue
sacrifice_hit
boolean—Whether this pitch resulted in a sacrifice bunt
Values:falsetrue
single
boolean—Whether this pitch resulted in a single
Values:falsetrue
solid_contact
booleannullable—Launch angle 20-25 AND exit velocity 95-100
Values:falsetrue
spin_axis
floatnullable—Spin axis (degrees)
e.g. — (all-null in sample)
spin_direction
floatnullable——
e.g. 211
spin_rate
floatnullable——
e.g. 2190
spray_angle
floatnullable—Horizontal angle from center field (degrees)
e.g. -6.1
start_time
timestamptznullable—Wall-clock time of the pitch, as the league records it
e.g. — (all-null in sample)
statcast_quality_score
decimalnullable—Statcast data quality score (0.0-1.0)
e.g. — (all-null in sample)
strike
boolean——
Values:falsetrue
strike_zone_bottom
floatnullable——
e.g. 1.63
strike_zone_top
floatnullable——
e.g. 3.51
strikeout
boolean—Whether this pitch resulted in a strikeout
Values:falsetrue
sweet_spot
booleannullable—Launch angle between 8-32 degrees
Values:falsetrue
topped
booleannullable—Launch angle < 10 AND exit velocity < 90
Values:falsetrue
tracking_confidence
decimalnullable—Confidence in tracking data accuracy
e.g. — (all-null in sample)
triple
boolean—Whether this pitch resulted in a triple
Values:falsetrue
under
booleannullable—Launch angle less than 10 degrees
Values:falsetrue
walk
boolean—Whether this pitch resulted in a walk
Values:falsetrue