Skip to contents

Find MLB Player Game Stats

Usage

mlb_player_game_stats(person_id = NULL, game_pk = NULL)

Arguments

person_id

MLBAMIDs for player of interest.

game_pk

The game_pk to return game_log statistics for a specific player in a specific game and to complete the call.

Value

Returns a tibble with one row per stat group (fielding, hitting, pitching) for the player in the game, with the following columns:

col_nametypesdescription
typecharacterStat type returned (e.g. 'gameLog').
groupcharacterStat group: fielding, hitting, or pitching.
caught_stealingintegerRunners caught stealing.
stolen_basesintegerStolen bases.
stolen_base_percentagecharacterStolen base success rate.
caught_stealing_percentagecharacterCaught-stealing rate (catcher fielding).
assistsintegerFielding assists.
put_outsintegerFielding putouts.
errorsintegerFielding errors.
chancesintegerTotal fielding chances.
fieldingcharacterFielding percentage.
passed_ballintegerPassed balls (catcher).
pickoffsintegerPickoffs.
summarycharacterText summary line of the player's game.
games_playedintegerGames played.
games_startedintegerGames started.
fly_outsintegerFly-ball outs.
ground_outsintegerGround-ball outs.
air_outsintegerAir outs (fly outs + line outs + pop outs).
runsintegerRuns.
doublesintegerDoubles.
triplesintegerTriples.
home_runsintegerHome runs.
strike_outsintegerStrikeouts.
base_on_ballsintegerWalks.
intentional_walksintegerIntentional walks.
hitsintegerHits.
hit_by_pitchintegerHit by pitch.
at_batsintegerAt-bats.
number_of_pitchesintegerNumber of pitches seen or thrown.
innings_pitchedcharacterInnings pitched.
winsintegerPitcher wins.
lossesintegerPitcher losses.
savesintegerSaves.
save_opportunitiesintegerSave opportunities.
holdsintegerHolds.
blown_savesintegerBlown saves.
earned_runsintegerEarned runs allowed.
batters_facedintegerBatters faced.
outsintegerOuts recorded.
games_pitchedintegerGames pitched.
complete_gamesintegerComplete games.
shutoutsintegerShutouts.
pitches_thrownintegerPitches thrown.
ballsintegerBalls thrown.
strikesintegerStrikes thrown.
strike_percentagecharacterShare of pitches that were strikes.
hit_batsmenintegerBatters hit by pitch (pitcher).
balksintegerBalks.
wild_pitchesintegerWild pitches.
rbiintegerRuns batted in.
games_finishedintegerGames finished.
runs_scored_per9characterRuns scored per nine innings.
home_runs_per9characterHome runs allowed per nine innings.
inherited_runnersintegerInherited runners.
inherited_runners_scoredintegerInherited runners who scored.
catchers_interferenceintegerCatcher's interference.
sac_buntsintegerSacrifice bunts.
sac_fliesintegerSacrifice flies.
ground_into_double_playintegerGrounded into double plays.
ground_into_triple_playintegerGrounded into triple plays.
plate_appearancesintegerPlate appearances.
total_basesintegerTotal bases.
left_on_baseintegerRunners left on base.
at_bats_per_home_runcharacterAt-bats per home run.
total_splitsintegerNumber of stat splits returned.
type_display_namecharacterDisplay name of the stat type.
group_display_namecharacterDisplay name of the stat group.
player_idnumericMLBAM player ID supplied in the request.
game_pknumericGame ID supplied in the request.

Examples

# \donttest{
 try(mlb_player_game_stats(person_id = 605151, game_pk = 531368))
#> ── MLB Player Game Stats data from MLB.com ────────── baseballr 2.0.0 ──
#>  Data updated: 2026-06-12 14:09:45 UTC
#> # A tibble: 3 × 70
#>   type    group    caught_stealing stolen_bases stolen_base_percentage
#>   <chr>   <chr>              <int>        <int> <chr>                 
#> 1 gameLog fielding               0            0 .---                  
#> 2 gameLog pitching               0            0 .---                  
#> 3 gameLog hitting                0            0 .---                  
#> # ℹ 65 more variables: caught_stealing_percentage <chr>, assists <int>,
#> #   put_outs <int>, errors <int>, chances <int>, fielding <chr>,
#> #   passed_ball <int>, pickoffs <int>, summary <chr>,
#> #   games_played <int>, games_started <int>, fly_outs <int>,
#> #   ground_outs <int>, air_outs <int>, runs <int>, doubles <int>,
#> #   triples <int>, home_runs <int>, strike_outs <int>,
#> #   base_on_balls <int>, intentional_walks <int>, hits <int>, …
# }