Skip to contents

Retrieve draft prospect information by year

Usage

mlb_draft_prospects(year)

Arguments

year

The year for which to return data

Value

Returns a tibble with information for every draft prospect for the year requested:

col_nametypesdescription
bis_player_idintegerBIS (Baseball Info Solutions) player ID.
headshot_linkcharacterURL to the player's headshot image.
is_draftedlogicalWhether the prospect was drafted.
is_passlogicalWhether the pick was a pass.
yearcharacterDraft year (YYYY).
pick_roundcharacterDraft round.
pick_numberintegerOverall pick number.
rankintegerProspect rank.
scouting_reportcharacterLink to the scouting report.
blurbcharacterProspect scouting blurb.
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.
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_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_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_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_primary_numbercharacterPlayer uniform number.
person_mlb_debut_datecharacterMLB debut date (YYYY-MM-DD).
person_pronunciationcharacterPhonetic name pronunciation.
person_name_matrilinealcharacterMaternal family name.
person_name_titlecharacterName title.
person_name_suffixcharacterName suffix (e.g. Jr., III).
person_nick_namecharacterPlayer nickname.
person_death_datecharacterDate of death (YYYY-MM-DD), if applicable.
person_death_citycharacterCity of death, if applicable.
person_death_state_provincecharacterState or province of death, if applicable.
person_death_countrycharacterCountry of death, if applicable.
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_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.
draft_type_codecharacterDraft type code.
draft_type_descriptioncharacterDraft type description.
team_all_star_statuscharacterTeam all-star status flag.
team_idintegerMLB team ID associated with the prospect.
team_namecharacterTeam name.
team_linkcharacterMLB Stats API relative team link.
team_seasonintegerTeam season (YYYY).
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_short_namecharacterTeam short name.
team_franchise_namecharacterFranchise name.
team_club_namecharacterClub name.
team_activelogicalWhether the team is currently active.
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_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_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.

Examples

# \donttest{
  try(mlb_draft_prospects(year = 2020))
#> ── MLB Draft Prospects data from MLB.com ──────────── baseballr 2.0.0 ──
#>  Data updated: 2026-06-12 14:09:27 UTC
#> # A tibble: 2,554 × 102
#>    bis_player_id headshot_link       is_drafted is_pass year  pick_round
#>            <int> <chr>               <lgl>      <lgl>   <chr> <chr>     
#>  1       5012729 https://img.mlbsta… FALSE      FALSE   2020  NA        
#>  2        804300 https://img.mlbsta… FALSE      FALSE   2020  NA        
#>  3       5010766 https://img.mlbsta… FALSE      FALSE   2020  NA        
#>  4       5009176 https://img.mlbsta… TRUE       FALSE   2020  1         
#>  5            NA https://img.mlbsta… TRUE       FALSE   2020  1         
#>  6       5012222 https://img.mlbsta… FALSE      FALSE   2020  NA        
#>  7       5002839 https://img.mlbsta… FALSE      FALSE   2020  NA        
#>  8       5001752 https://img.mlbsta… FALSE      FALSE   2020  NA        
#>  9        767407 https://img.mlbsta… FALSE      FALSE   2020  NA        
#> 10        802464 https://img.mlbsta… FALSE      FALSE   2020  NA        
#> # ℹ 2,544 more rows
#> # ℹ 96 more variables: pick_number <int>, rank <int>,
#> #   scouting_report <chr>, blurb <chr>, home_city <chr>,
#> #   home_state <chr>, home_country <chr>, school_name <chr>,
#> #   school_school_class <chr>, school_country <chr>,
#> #   school_state <chr>, person_id <int>, person_full_name <chr>,
#> #   person_link <chr>, person_first_name <chr>, …
# }