Skip to contents

Retrieve latest draft information by year

Usage

mlb_draft_latest(year)

Arguments

year

The year for which to return data

Value

Returns a tibble with the latest draft information for the year requested:

col_nametypesdescription
pick_roundcharacterDraft round.
pick_numberintegerOverall pick number.
display_pick_numberintegerPick number as displayed.
round_pick_numberintegerPick number within the round.
pick_valuecharacterAssigned slot/pick value (dollars).
signing_bonuscharacterSigning bonus (dollars).
home_citycharacterProspect home city.
home_statecharacterProspect home state.
home_countrycharacterProspect home country.
school_namecharacterSchool name.
school_school_classcharacterSchool class (e.g. 4YR JR, HS SR).
school_countrycharacterSchool country.
school_statecharacterSchool state.
headshot_linkcharacterURL to the player's headshot image.
person_idintegerMLB player ID.
person_full_namecharacterPlayer full name.
person_linkcharacterMLB Stats API relative player link.
person_first_namecharacterPlayer first name.
person_last_namecharacterPlayer last name.
person_primary_numbercharacterPlayer uniform number.
person_birth_datecharacterBirth date (YYYY-MM-DD).
person_current_ageintegerCurrent age in years.
person_birth_citycharacterCity of birth.
person_birth_state_provincecharacterState or province of birth.
person_birth_countrycharacterCountry of birth.
person_heightcharacterHeight (feet and inches).
person_weightintegerWeight in pounds.
person_activelogicalWhether the player is currently active.
person_primary_position_codecharacterPrimary fielding position code.
person_primary_position_namecharacterPrimary fielding position name.
person_primary_position_typecharacterPrimary position type (e.g. Infielder).
person_primary_position_abbreviationcharacterPrimary position abbreviation.
person_use_namecharacterPreferred first name.
person_use_last_namecharacterPreferred last name.
person_middle_namecharacterPlayer middle name.
person_boxscore_namecharacterName as shown in box scores.
person_gendercharacterPlayer gender.
person_is_playerlogicalWhether the person is a player.
person_is_verifiedlogicalWhether the player profile is verified.
person_draft_yearintegerYear the player was drafted.
person_mlb_debut_datecharacterMLB debut date (YYYY-MM-DD).
person_bat_side_codecharacterBatting side code (L/R/S).
person_bat_side_descriptioncharacterBatting side description.
person_pitch_hand_codecharacterThrowing hand code (L/R).
person_pitch_hand_descriptioncharacterThrowing hand description.
person_name_first_lastcharacterName in first-last order.
person_name_slugcharacterURL-friendly name slug.
person_first_last_namecharacterFirst and last name.
person_last_first_namecharacterName in last, first order.
person_last_init_namecharacterLast name with first initial.
person_init_last_namecharacterFirst initial with last name.
person_full_fml_namecharacterFull name (first-middle-last).
person_full_lfm_namecharacterFull name (last-first-middle).
person_strike_zone_topnumericTop of the player's strike zone (feet).
person_strike_zone_bottomnumericBottom of the player's strike zone (feet).
person_xref_ids_xref_idcharacterCross-reference ID from an external source.
person_xref_ids_xref_typecharacterCross-reference source type (e.g. fangraphs).
person_xref_ids_seasoncharacterSeason associated with the cross-reference ID.
team_spring_league_idintegerSpring training league ID.
team_spring_league_namecharacterSpring training league name.
team_spring_league_linkcharacterMLB Stats API relative spring league link.
team_spring_league_abbreviationcharacterSpring training league abbreviation.
team_all_star_statuscharacterTeam all-star status flag.
team_idintegerMLB team ID of the drafting team.
team_namecharacterDrafting team name.
team_linkcharacterMLB Stats API relative team link.
team_seasonintegerTeam season (YYYY).
team_venue_idintegerHome venue ID.
team_venue_namecharacterHome venue name.
team_venue_linkcharacterMLB Stats API relative venue link.
team_spring_venue_idintegerSpring training venue ID.
team_spring_venue_linkcharacterMLB Stats API relative spring venue link.
team_team_codecharacterTeam code.
team_file_codecharacterTeam file code.
team_abbreviationcharacterTeam abbreviation.
team_team_namecharacterTeam nickname.
team_location_namecharacterTeam location/city name.
team_first_year_of_playcharacterFirst year the franchise played.
team_league_idintegerMLB league ID.
team_league_namecharacterLeague name.
team_league_linkcharacterMLB Stats API relative league link.
team_division_idintegerDivision ID.
team_division_namecharacterDivision name.
team_division_linkcharacterMLB Stats API relative division link.
team_sport_idintegerMLB sport ID.
team_sport_linkcharacterMLB Stats API relative sport link.
team_sport_namecharacterSport name.
team_short_namecharacterTeam short name.
team_franchise_namecharacterFranchise name.
team_club_namecharacterClub name.
team_activelogicalWhether the team is currently active.
draft_type_codecharacterDraft type code.
draft_type_descriptioncharacterDraft type description.
is_draftedlogicalWhether the prospect was drafted.
is_passlogicalWhether the pick was a pass.
yearcharacterDraft year (YYYY).

Examples

# \donttest{
 try(mlb_draft_latest(year = 2020))
#> ── MLB Draft (Latest) data from MLB.com ───────────── baseballr 2.0.0 ──
#>  Data updated: 2026-06-12 14:09:26 UTC
#> # A tibble: 4 × 96
#>   pick_round pick_number display_pick_number round_pick_number
#>   <chr>            <int>               <int>             <int>
#> 1 5                  160                 160                29
#> 2 5                  160                 160                29
#> 3 5                  160                 160                29
#> 4 5                  160                 160                29
#> # ℹ 92 more variables: pick_value <chr>, signing_bonus <chr>,
#> #   home_city <chr>, home_state <chr>, home_country <chr>,
#> #   school_name <chr>, school_school_class <chr>, school_country <chr>,
#> #   school_state <chr>, headshot_link <chr>, person_id <int>,
#> #   person_full_name <chr>, person_link <chr>, person_first_name <chr>,
#> #   person_last_name <chr>, person_primary_number <chr>,
#> #   person_birth_date <chr>, person_current_age <int>, …
# }