Skip to contents

Get ESPN MLB game rosters

Usage

espn_mlb_game_rosters(game_id)

Arguments

game_id

Game ID

Value

A game rosters data frame

col_nametypesdescription
athlete_idintegerUnique ESPN athlete identifier.
athlete_uidcharacterAthlete uid.
athlete_guidcharacterAthlete guid.
athlete_typecharacterAthlete type.
sdrintegerSdr.
first_namecharacterFirst name.
last_namecharacterLast name.
full_namecharacterFull name.
athlete_display_namecharacterAthlete display name (full).
short_namecharacterShort display name.
weightintegerWeight.
display_weightcharacterDisplay weight.
heightintegerHeight.
display_heightcharacterDisplay height.
ageintegerAge.
date_of_birthcharacterDate of birth.
debut_yearintegerDebut year.
birth_place_citycharacterBirth place city.
birth_place_statecharacterBirth place state.
birth_place_countrycharacterBirth place country.
slugcharacterSlug.
headshot_hrefcharacterHeadshot href.
headshot_altcharacterHeadshot alt.
athlete_jersey_numbercharacterAthlete jersey number.
position_idintegerPosition id.
position_namecharacterPosition name.
position_display_namecharacterPosition display name.
position_abbreviationcharacterPosition abbreviation.
position_leaflogicalPosition leaf.
positions_refcharacterPositions ref.
positions_idcharacterPositions id.
positions_namecharacterPositions name.
positions_display_namecharacterPositions display name.
positions_abbreviationcharacterPositions abbreviation.
positions_leaflogicalPositions leaf.
positions_parent_refcharacterPositions parent ref.
positions_statistics_refcharacterPositions statistics ref.
linkedlogicalLinked.
yearsintegerYears.
debut_year_2integerDebut year 2.
debut_refcharacterDebut ref.
debut_ref_1characterDebut ref 1.
activelogicalTRUE if the row represents an active record.
status_idintegerStatus id.
status_namecharacterGame status (e.g. 'STATUS_FINAL').
status_typecharacterStatus type.
status_abbreviationcharacterStatus abbreviation.
bats_typecharacterBats type.
bats_abbreviationcharacterBats abbreviation.
bats_display_valuecharacterBats display value.
throws_typecharacterThrows type.
throws_abbreviationcharacterThrows abbreviation.
throws_display_valuecharacterThrows display value.
starterlogicalTRUE if the player started the game.
validlogicalValid.
display_namecharacterDisplay name.
bat_orderintegerSpot in the batting order (1-9; NA if not applicable).
record_numberintegerRecord number.
at_batslistAt bats.
positionslistPositions.
noteslistNotes.
subbed_in_did_sublogicalSubbed in did sub.
subbed_out_did_sublogicalSubbed out did sub.
team_idintegerUnique ESPN team identifier.
team_guidcharacterESPN team GUID.
team_uidcharacterESPN universal team identifier (UID).
team_sdrcharacterTeam sdr.
team_slugcharacterURL-safe team identifier.
team_locationcharacterTeam city / location.
team_namecharacterTeam nickname (e.g. 'Yankees').
team_abbreviationcharacterShort team abbreviation (e.g. 'NYY').
team_display_namecharacterFull team display name (e.g. 'New York Yankees').
team_short_display_namecharacterShort team display name.
team_colorcharacterTeam primary color (hex, no leading '#').
team_alternate_colorcharacterTeam alternate color (hex).
team_is_activelogicalTeam is active.
is_all_starlogicalIs all star.
logo_hrefcharacterLogo href.
logo_dark_hrefcharacterLogo dark href.
logos_href_2characterLogos href 2.
logos_href_3characterLogos href 3.
logos_href_4characterLogos href 4.
logos_width_4integerLogos width 4.
logos_height_4integerLogos height 4.
logos_alt_4characterLogos alt 4.
logos_rel_full_4characterLogos rel full 4.
logos_rel_primary_logo_on_white_colorcharacterLogos rel primary logo on white color.
logos_last_updated_4characterLogos last updated 4.
logos_href_5characterLogos href 5.
logos_width_5integerLogos width 5.
logos_height_5integerLogos height 5.
logos_alt_5characterLogos alt 5.
logos_rel_full_5characterLogos rel full 5.
logos_rel_primary_logo_on_black_colorcharacterLogos rel primary logo on black color.
logos_last_updated_5characterLogos last updated 5.
logos_href_6characterLogos href 6.
logos_width_6integerLogos width 6.
logos_height_6integerLogos height 6.
logos_alt_6characterLogos alt 6.
logos_rel_full_6characterLogos rel full 6.
logos_rel_primary_logo_on_primary_colorcharacterLogos rel primary logo on primary color.
logos_last_updated_6characterLogos last updated 6.
logos_href_7characterLogos href 7.
logos_width_7integerLogos width 7.
logos_height_7integerLogos height 7.
logos_alt_7characterLogos alt 7.
logos_rel_full_7characterLogos rel full 7.
logos_rel_primary_logo_on_secondary_colorcharacterLogos rel primary logo on secondary color.
logos_last_updated_7characterLogos last updated 7.
logos_href_8characterLogos href 8.
logos_width_8integerLogos width 8.
logos_height_8integerLogos height 8.
logos_alt_8characterLogos alt 8.
logos_rel_full_8characterLogos rel full 8.
logos_rel_primary_logo_blackcharacterLogos rel primary logo black.
logos_last_updated_8characterLogos last updated 8.
logos_href_9characterLogos href 9.
logos_width_9integerLogos width 9.
logos_height_9integerLogos height 9.
logos_alt_9characterLogos alt 9.
logos_rel_full_9characterLogos rel full 9.
logos_rel_primary_logo_whitecharacterLogos rel primary logo white.
logos_last_updated_9characterLogos last updated 9.
logos_href_10characterLogos href 10.
logos_width_10integerLogos width 10.
logos_height_10integerLogos height 10.
logos_alt_10characterLogos alt 10.
logos_rel_full_10characterLogos rel full 10.
logos_rel_secondary_logo_on_white_colorcharacterLogos rel secondary logo on white color.
logos_last_updated_10characterLogos last updated 10.
logos_href_11characterLogos href 11.
logos_width_11integerLogos width 11.
logos_height_11integerLogos height 11.
logos_alt_11characterLogos alt 11.
logos_rel_full_11characterLogos rel full 11.
logos_rel_secondary_logo_on_black_colorcharacterLogos rel secondary logo on black color.
logos_last_updated_11characterLogos last updated 11.
logos_href_12characterLogos href 12.
logos_width_12integerLogos width 12.
logos_height_12integerLogos height 12.
logos_alt_12characterLogos alt 12.
logos_rel_full_12characterLogos rel full 12.
logos_rel_secondary_logo_on_primary_colorcharacterLogos rel secondary logo on primary color.
logos_last_updated_12characterLogos last updated 12.
logos_href_13characterLogos href 13.
logos_width_13integerLogos width 13.
logos_height_13integerLogos height 13.
logos_alt_13characterLogos alt 13.
logos_rel_full_13characterLogos rel full 13.
logos_rel_secondary_logo_on_secondary_colorcharacterLogos rel secondary logo on secondary color.
logos_last_updated_13characterLogos last updated 13.
logos_href_14characterLogos href 14.
logos_width_14integerLogos width 14.
logos_height_14integerLogos height 14.
logos_alt_14characterLogos alt 14.
logos_rel_full_14characterLogos rel full 14.
logos_rel_secondary_logo_blackcharacterLogos rel secondary logo black.
logos_last_updated_14characterLogos last updated 14.
logos_href_15characterLogos href 15.
logos_width_15integerLogos width 15.
logos_height_15integerLogos height 15.
logos_alt_15characterLogos alt 15.
logos_rel_full_15characterLogos rel full 15.
logos_rel_secondary_logo_whitecharacterLogos rel secondary logo white.
logos_last_updated_15characterLogos last updated 15.
game_idintegerUnique ESPN game/event identifier.
orderintegerOrder.
home_awaycharacterVenue label for the team ('home' or 'away').
winnerlogicalWinner.
nicknamecharacterTeam nickname.
draft_display_textcharacterDraft display text.
draft_roundintegerDraft round.
draft_yearintegerDraft year.
draft_selectionintegerDraft selection.

See also

Other ESPN MLB Functions: espn_mlb, espn_mlb_athletes_index(), espn_mlb_award(), espn_mlb_betting(), espn_mlb_calendar(), espn_mlb_coach(), espn_mlb_coach_record(), espn_mlb_coach_season(), espn_mlb_coaches(), espn_mlb_conferences(), espn_mlb_draft(), espn_mlb_draft_athlete_detail(), espn_mlb_draft_athletes(), espn_mlb_draft_pick(), espn_mlb_draft_rounds(), espn_mlb_draft_status(), espn_mlb_franchise(), espn_mlb_franchises(), espn_mlb_freeagents(), espn_mlb_futures(), espn_mlb_game_all(), espn_mlb_game_broadcasts(), espn_mlb_game_endpoints, espn_mlb_game_info(), espn_mlb_game_odds(), espn_mlb_game_official_detail(), espn_mlb_game_officials(), espn_mlb_game_play(), espn_mlb_game_play_personnel(), espn_mlb_game_player_box(), espn_mlb_game_powerindex(), espn_mlb_game_predictor(), espn_mlb_game_probabilities(), espn_mlb_game_probables(), espn_mlb_game_propbets(), espn_mlb_game_situation(), espn_mlb_game_team_leaders(), espn_mlb_game_team_linescores(), espn_mlb_game_team_records(), espn_mlb_game_team_roster(), espn_mlb_game_team_roster_entry(), espn_mlb_game_team_score(), espn_mlb_game_team_statistics(), espn_mlb_injuries(), espn_mlb_leaders(), espn_mlb_news(), espn_mlb_pbp(), espn_mlb_player_awards(), espn_mlb_player_box(), espn_mlb_player_career_stats(), espn_mlb_player_contract(), espn_mlb_player_contracts(), espn_mlb_player_endpoints, espn_mlb_player_eventlog(), espn_mlb_player_eventlog_v2(), espn_mlb_player_gamelog(), espn_mlb_player_info(), espn_mlb_player_overview(), espn_mlb_player_seasons(), espn_mlb_player_splits(), espn_mlb_player_statisticslog(), espn_mlb_player_stats(), espn_mlb_player_stats_v3(), espn_mlb_position(), espn_mlb_positions(), espn_mlb_powerindex(), espn_mlb_scoreboard(), espn_mlb_season_awards(), espn_mlb_season_draft(), espn_mlb_season_group(), espn_mlb_season_group_children(), espn_mlb_season_group_teams(), espn_mlb_season_groups(), espn_mlb_season_info(), espn_mlb_season_leaders(), espn_mlb_season_ranking(), espn_mlb_season_rankings(), espn_mlb_season_type(), espn_mlb_season_types(), espn_mlb_season_week(), espn_mlb_season_weeks(), espn_mlb_seasons(), espn_mlb_standings(), espn_mlb_team(), espn_mlb_team_box(), espn_mlb_team_current_roster(), espn_mlb_team_depthchart(), espn_mlb_team_endpoints, espn_mlb_team_injuries(), espn_mlb_team_leaders(), espn_mlb_team_news(), espn_mlb_team_odds_records(), espn_mlb_team_record(), espn_mlb_team_record_detail(), espn_mlb_team_roster(), espn_mlb_team_schedule(), espn_mlb_team_season_profile(), espn_mlb_team_season_roster(), espn_mlb_team_season_statistics(), espn_mlb_team_stats(), espn_mlb_teams(), espn_mlb_tournament(), espn_mlb_tournament_season(), espn_mlb_tournament_seasons(), espn_mlb_tournaments(), espn_mlb_transactions(), espn_mlb_venues(), espn_mlb_week_ranking(), espn_mlb_week_rankings(), espn_mlb_wp()

Author

Saiem Gilani

Examples

# \donttest{
try(espn_mlb_game_rosters(game_id = 401283399))
#>  2026-06-08 11:07:44.482434: Invalid arguments or no game roster data for 401283399 available!
#>  Args: game_id = 401283399
#>  Error: The API returned an error, HTTP Response Code 404
#> ── ESPN MLB Game Roster Information from ESPN.com ─── baseballr 2.0.0 ──
#>  Data updated: 2026-06-08 11:07:44 UTC
#> # A tibble: 0 × 0
# }