Skip to main content

MLB — MLB Stats API — Draft

mlb_draft​

GET /api/v1/draft/{year} — draft results for a year (optionally one round).

Endpoint URL: GET https://statsapi.mlb.com/api/v1/draft/{year}

Valid URL: https://statsapi.mlb.com/api/v1/draft/2024

API ParameterPythonPatternRequiredNullableDescription
yearyearYyear path parameter.
roundround_Yround query parameter.
teamIdteam_idYteamId query parameter.
playerIdplayer_idYplayerId query parameter.
limitlimitYMaximum number of items to return.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame (parser: parse_mlb_api_list); pass return_as_pandas=True for a pandas.DataFrame. return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

mlb_draft(year=2024)

Last validated n/a.

mlb_draft_latest​

View latest player drafted, endpoint best used when draft is currently open.

Endpoint URL: GET https://statsapi.mlb.com/api/v1/draft/{year}/latest

Valid URL: https://statsapi.mlb.com/api/v1/draft/2023/latest

API ParameterPythonPatternRequiredNullableDescription
yearyearYyear path parameter.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
numberintegerJersey number.
next_upcharacterIndicates whether this draft slot is the next pick to be made in the current draft.
pick_pick_roundcharacterDraft round in which this pick was made (e.g., '1', '2', 'CB-A' for competitive balance).
pick_pick_numberintegerOverall pick number of this selection counting sequentially across all rounds of the draft.
pick_display_pick_numberintegerThe formatted overall pick number displayed publicly for this draft selection.
pick_round_pick_numberintegerPick number within the specific draft round (i.e., the Nth pick in that round).
pick_signing_bonuscharacterReported or slotted signing bonus amount associated with this draft pick.
pick_home_citycharacterCity of the draftee's listed home address at the time of the draft.
pick_home_statecharacterState or province of the draftee's listed home address at the time of the draft.
pick_home_countrycharacterCountry of the draftee's listed home address at the time of the draft.
pick_school_namecharacterName of the high school or college the draftee attended before being drafted.
pick_school_school_classcharacterAcademic class or level of the draftee at their school (e.g., High School, Junior, Senior).
pick_school_citycharacterCity of the high school or college the draftee attended before being drafted.
pick_school_countrycharacterCountry of the school the draftee attended.
pick_school_statecharacterState of the school the draftee attended.
pick_headshot_linkcharacterURL to the headshot image of the drafted player on the MLB Stats API CDN.
pick_person_idintegerUnique MLB Stats API (MLBAM) identifier for the drafted player.
pick_person_full_namecharacterPlayer's complete display name as used throughout the MLB Stats API.
pick_person_linkcharacterRelative URL path to the player's resource in the MLB Stats API.
pick_person_first_namecharacterThe player's legal or preferred first name.
pick_person_last_namecharacterThe player's legal or preferred last name.
pick_person_birth_datecharacterDate of birth of the drafted player in ISO 8601 format.
pick_person_current_ageintegerAge of the drafted player in years at the time of the data retrieval.
pick_person_birth_citycharacterCity where the drafted player was born.
pick_person_birth_state_provincecharacterState or province where the drafted player was born.
pick_person_birth_countrycharacterCountry where the drafted player was born.
pick_person_heightcharacterPlayer's height in feet-and-inches notation (e.g., 6' 2").
pick_person_weightintegerPlayer's weight in pounds as recorded by the MLB Stats API.
pick_person_activelogicalBoolean flag indicating whether the drafted player is currently on an active MLB roster.
pick_person_primary_position_codecharacterNumeric or short code identifying the player's primary fielding position.
pick_person_primary_position_namecharacterFull name of the player's primary fielding position (e.g., Shortstop, Center Field).
pick_person_primary_position_typecharacterBroad classification of the player's position role (e.g., Pitcher, Infielder, Outfielder).
pick_person_primary_position_abbreviationcharacterShort abbreviation for the player's primary fielding position (e.g., SS, CF, SP).
pick_person_use_namecharacterThe first name or nickname the player prefers to use publicly.
pick_person_use_last_namecharacterThe last name the player prefers to use publicly, which may differ from the legal last name.
pick_person_middle_namecharacterThe player's middle name as recorded by the MLB Stats API.
pick_person_boxscore_namecharacterAbbreviated name format used for the player on official MLB box scores.
pick_person_gendercharacterRecorded gender of the drafted player.
pick_person_is_playerlogicalBoolean flag indicating whether this person is classified as an active player in the MLB Stats API.
pick_person_is_verifiedlogicalBoolean flag indicating whether the player's profile has been verified by MLB.
pick_person_draft_yearintegerThe MLB draft year in which this player was originally selected.
pick_person_bat_side_codecharacterSingle-letter code for the player's batting handedness (e.g., R, L, S for switch).
pick_person_bat_side_descriptioncharacterFull description of the player's batting side (e.g., Right, Left, Switch).
pick_person_pitch_hand_codecharacterSingle-letter code for the player's pitching handedness (e.g., R, L, S).
pick_person_pitch_hand_descriptioncharacterFull description of the player's pitching hand (e.g., Right, Left, Switch).
pick_person_name_first_lastcharacterPlayer's display name in first-last format, typically matching the broadcast name.
pick_person_name_slugcharacterURL-safe slug derived from the player's name for use in web links.
pick_person_first_last_namecharacterPlayer's name formatted as first name followed by last name.
pick_person_last_first_namecharacterPlayer's name formatted as last name followed by first name.
pick_person_last_init_namecharacterPlayer's name formatted as last name followed by first initial.
pick_person_init_last_namecharacterPlayer's name formatted as first initial followed by last name (e.g., J. Smith).
pick_person_full_fml_namecharacterPlayer's full name in first-middle-last order as recorded by the MLB Stats API.
pick_person_full_lfm_namecharacterPlayer's full name in last-first-middle order as recorded by the MLB Stats API.
pick_person_strike_zone_topdoubleUpper boundary of the player's personalized strike zone in feet from the ground.
pick_person_strike_zone_bottomdoubleLower boundary of the player's personalized strike zone in feet from the ground.
pick_person_xref_idscharacterSerialized cross-reference identifiers linking the player to external data systems.
pick_team_spring_league_idintegerMLB Stats API identifier for the team's spring training league.
pick_team_spring_league_namecharacterFull name of the spring training league the team belongs to.
pick_team_spring_league_linkcharacterRelative URL path to the spring training league resource in the MLB Stats API.
pick_team_spring_league_abbreviationcharacterAbbreviation for the spring training league the team participates in (e.g., Cactus, Grapefruit).
pick_team_all_star_statuscharacterAll-Star game affiliation status of the team (e.g., American League, National League).
pick_team_idintegerUnique MLB Stats API identifier for the team that made this draft pick.
pick_team_namecharacterFull official name of the MLB team that made this pick (e.g., New York Yankees).
pick_team_linkcharacterRelative URL path to the team resource in the MLB Stats API.
pick_team_seasonintegerMLB season year for which this team's metadata snapshot applies.
pick_team_venue_idintegerMLB Stats API identifier for the team's regular-season home ballpark.
pick_team_venue_namecharacterName of the team's regular-season home ballpark (e.g., Yankee Stadium).
pick_team_venue_linkcharacterRelative URL path to the team's regular-season home venue in the MLB Stats API.
pick_team_spring_venue_idintegerMLB Stats API identifier for the team's spring training ballpark.
pick_team_spring_venue_linkcharacterRelative URL path to the spring training venue resource in the MLB Stats API.
pick_team_team_codecharacterShort internal code used by MLB to identify the team in system contexts.
pick_team_file_codecharacterLowercase file-system-safe code used internally by MLB to identify the team.
pick_team_abbreviationcharacterStandard two- or three-letter abbreviation for the MLB team that made this pick.
pick_team_team_namecharacterThe nickname portion of the team's full name (e.g., Yankees, Dodgers).
pick_team_location_namecharacterGeographic location name (city/metro) associated with the team (e.g., New York).
pick_team_first_year_of_playcharacterYear in which the selecting franchise first played as an MLB team.
pick_team_league_idintegerMLB Stats API identifier for the league (American or National) of the selecting team.
pick_team_league_namecharacterFull name of the league the selecting team belongs to (e.g., American League).
pick_team_league_linkcharacterRelative URL path to the league resource in the MLB Stats API.
pick_team_division_idintegerMLB Stats API identifier for the division the selecting team belongs to.
pick_team_division_namecharacterFull name of the division the selecting team belongs to (e.g., AL East).
pick_team_division_linkcharacterRelative URL path to the division resource in the MLB Stats API.
pick_team_sport_idintegerMLB Stats API identifier for the sport classification (MLB = 1).
pick_team_sport_linkcharacterRelative URL path to the sport resource in the MLB Stats API.
pick_team_sport_namecharacterFull name of the sport classification for the team (e.g., Major League Baseball).
pick_team_short_namecharacterShortened version of the team name used in space-constrained display contexts.
pick_team_franchise_namecharacterHistorical franchise name that persists across any team relocations or renames.
pick_team_club_namecharacterInformal club or nickname portion of the team's full name (e.g., Yankees, Red Sox).
pick_team_activelogicalBoolean flag indicating whether the selecting MLB franchise is currently active.
pick_draft_type_codecharacterShort code identifying the type of draft (e.g., amateur, Rule 5) for this pick.
pick_draft_type_descriptioncharacterHuman-readable description of the draft type associated with this pick.
pick_is_draftedlogicalBoolean flag indicating whether this draft slot has been filled with an actual selection.
pick_is_passlogicalBoolean flag indicating whether the selecting team passed on this pick rather than making a selection.
pick_yearcharacterMLB draft year for which this pick record applies.

return_parsed=False — the raw JSON Dict payload, unparsed.

Example​

mlb_draft_latest(year=2023)

Last validated n/a.