Skip to contents

Find MLB All-Star Ballots

Usage

mlb_all_star_ballots(league_id = NULL, season = NULL)

Arguments

league_id

League ID for league all-star ballot of interest.

season

The season of the all-star ballot.

Value

Returns a tibble with the following columns:

col_nametypesdescription
player_idintegerMLB player ID.
full_namecharacterPlayer full name.
linkcharacterMLB Stats API relative resource link.
first_namecharacterPlayer first name.
last_namecharacterPlayer last name.
primary_numbercharacterPlayer uniform number.
birth_datecharacterBirth date (YYYY-MM-DD).
current_ageintegerCurrent age in years.
birth_citycharacterCity of birth.
birth_countrycharacterCountry of birth.
heightcharacterHeight (feet and inches).
weightintegerWeight in pounds.
activelogicalWhether the player is currently active.
use_namecharacterPreferred first name.
use_last_namecharacterPreferred last name.
middle_namecharacterPlayer middle name.
boxscore_namecharacterName as shown in box scores.
nick_namecharacterPlayer nickname.
gendercharacterPlayer gender.
name_matrilinealcharacterMaternal family name.
is_playerlogicalWhether the person is a player.
is_verifiedlogicalWhether the player profile is verified.
pronunciationcharacterPhonetic name pronunciation.
last_played_datecharacterDate of last MLB game played.
mlb_debut_datecharacterMLB debut date (YYYY-MM-DD).
name_first_lastcharacterName in first-last order.
name_slugcharacterURL-friendly name slug.
first_last_namecharacterFirst and last name.
last_first_namecharacterName in last, first order.
last_init_namecharacterLast name with first initial.
init_last_namecharacterFirst initial with last name.
full_fml_namecharacterFull name (first-middle-last).
full_lfm_namecharacterFull name (last-first-middle).
strike_zone_topnumericTop of the player's strike zone (feet).
strike_zone_bottomnumericBottom of the player's strike zone (feet).
birth_state_provincecharacterState or province of birth.
draft_yearintegerYear the player was drafted.
name_titlecharacterName title.
name_suffixcharacterName suffix (e.g. Jr., III).
primary_position_codecharacterPrimary fielding position code.
primary_position_namecharacterPrimary fielding position name.
primary_position_typecharacterPrimary position type (e.g. Infielder).
primary_position_abbreviationcharacterPrimary position abbreviation.
bat_side_codecharacterBatting side code (L/R/S).
bat_side_descriptioncharacterBatting side description.
pitch_hand_codecharacterThrowing hand code (L/R).
pitch_hand_descriptioncharacterThrowing hand description.
league_idnumericMLB league ID.
seasonnumericSeason (YYYY).

Examples

# \donttest{
 try(mlb_all_star_ballots(league_id = 103, season = 2021))
#> ── MLB All-Star Ballots data from MLB.com ─────────── baseballr 2.0.0 ──
#>  Data updated: 2026-06-12 14:09:21 UTC
#> # A tibble: 136 × 49
#>    player_id full_name         link  first_name last_name primary_number
#>        <int> <chr>             <chr> <chr>      <chr>     <chr>         
#>  1    547989 José Abreu        /api… José       Abreu     79            
#>  2    596847 Ji Man Choi       /api… Ji Man     Choi      26            
#>  3    666915 Bobby Dalbec      /api… Robert     Dalbec    29            
#>  4    665489 Vladimir Guerrer… /api… Vladimir   Guerrero  27            
#>  5    493329 Yuli Gurriel      /api… Yulieski   Gurriel   10            
#>  6    663993 Nathaniel Lowe    /api… David      Lowe      31            
#>  7    641820 Trey Mancini      /api… Joseph     Mancini   34            
#>  8    647304 Josh Naylor       /api… Joshua-Do… Naylor    12            
#>  9    621566 Matt Olson        /api… Matthew    Olson     28            
#> 10    593934 Miguel Sanó       /api… Miguel     Sanó      22            
#> # ℹ 126 more rows
#> # ℹ 43 more variables: birth_date <chr>, current_age <int>,
#> #   birth_city <chr>, birth_country <chr>, height <chr>, weight <int>,
#> #   active <lgl>, use_name <chr>, use_last_name <chr>,
#> #   middle_name <chr>, boxscore_name <chr>, nick_name <chr>,
#> #   gender <chr>, name_matrilineal <chr>, is_player <lgl>,
#> #   is_verified <lgl>, pronunciation <chr>, last_played_date <chr>, …
# }