Skip to contents

Find MLB All-Star Write-ins

Usage

mlb_all_star_write_ins(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_state_provincecharacterState or province 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.
is_playerlogicalWhether the person is a player.
is_verifiedlogicalWhether the player profile is verified.
draft_yearintegerYear the player was drafted.
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).
pronunciationcharacterPhonetic name pronunciation.
last_played_datecharacterDate of last MLB game played.
name_titlecharacterName title.
name_suffixcharacterName suffix (e.g. Jr., III).
name_matrilinealcharacterMaternal family name.
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_write_ins(league_id = 103, season = 2021))
#> ── MLB All-Star Write-Ins data from MLB.com ───────── baseballr 2.0.0 ──
#>  Data updated: 2026-06-12 14:09:22 UTC
#> # A tibble: 490 × 45
#>    player_id full_name      link     first_name last_name primary_number
#>        <int> <chr>          <chr>    <chr>      <chr>     <chr>         
#>  1    595978 Austin Hedges  /api/v1… Austin     Hedges    27            
#>  2    605194 Jharel Cotton  /api/v1… Jharel     Cotton    NA            
#>  3    451584 Wade Davis     /api/v1… Wade       Davis     40            
#>  4    663554 Casey Mize     /api/v1… Casey      Mize      12            
#>  5    609280 Miguel Andujar /api/v1… Miguel     Andujar   41            
#>  6    521230 Liam Hendriks  /api/v1… Liam       Hendriks  31            
#>  7    642048 Tayler Saucedo /api/v1… Tayler     Saucedo   55            
#>  8    451594 Dexter Fowler  /api/v1… William    Fowler    25            
#>  9    667674 Jack Kruger    /api/v1… Timothy    Kruger    NA            
#> 10    667670 Brent Rooker   /api/v1… Terry      Rooker    25            
#> # ℹ 480 more rows
#> # ℹ 39 more variables: birth_date <chr>, current_age <int>,
#> #   birth_city <chr>, birth_state_province <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>, is_player <lgl>, is_verified <lgl>,
#> #   draft_year <int>, mlb_debut_date <chr>, name_first_last <chr>, …
# }