Skip to main content

MLB — ESPN core API (v2) — Player

espn_mlb_players_index​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes?active=true&limit=100&page=1

API ParameterPythonPatternRequiredNullableDescription
activeactiveYactive query parameter.
limitlimitYMaximum number of items to return.
pagepageYpage query 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
$refcharacter

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

Example​

espn_mlb_players_index()

Last validated n/a.

espn_mlb_player_core​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/{athlete_id}

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/4239

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_id 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
$refcharacter
activelogicalWhether the player is currently active.
ageintegerPlayer age (in years).
date_of_birthcharacterDate of birth.
debut_yearintegerDebut year.
display_heightcharacterDisplay height.
display_namecharacterDisplay name.
display_weightcharacterDisplay weight.
first_namecharacterPlayer first name.
full_namecharacterPlayer's full name.
guidcharacterStable cross-league team GUID.
heightdoubleHeight (feet and inches).
idcharacterId.
jerseycharacterJersey number worn by the player.
last_namecharacterPlayer last name.
linkedlogicalLinked.
linkscharacter
short_namecharacterShort display name.
slugcharacterURL-safe identifier.
typecharacterRecord type / category.
uidcharacterESPN UID string.
weightdoubleWeight in pounds.
alternate_ids_sdrcharacter
birth_place_citycharacterBirth place city.
birth_place_statecharacterBirth place state.
college_$refcharacter
college_athlete_$refcharacter
contracts_$refcharacter
draft_display_textcharacterDraft display text.
draft_pick_$refcharacter
draft_roundintegerDraft round.
draft_selectionintegerDraft selection.
draft_team_$refcharacter
draft_yearintegerYear the player was drafted.
experience_yearsinteger
hand_abbreviationcharacter
hand_display_valuecharacter
hand_typecharacter
headshot_altcharacterHeadshot alt.
headshot_hrefcharacterHeadshot image URL.
position_$refcharacter
position_abbreviationcharacterPosition abbreviation.
position_display_namecharacterPosition display name.
position_idcharacterUnique position identifier.
position_leaflogicalPosition leaf.
position_namecharacterPosition name.
seasons_$refcharacter
statistics_$refcharacter
statisticslog_$refcharacter
status_abbreviationcharacterStatus abbreviation.
status_idcharacterStatus id.
status_namecharacterGame status (e.g. 'STATUS_FINAL').
status_typecharacterStatus type.
team_$refcharacter

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

Example​

espn_mlb_player_core(athlete_id='4239')

Last validated n/a.

espn_mlb_player_career_stats​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/{athlete_id}/statistics[/{stat_type}]

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/4239/statistics

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_id path parameter.
stat_typestat_typeYstat_type path parameter.

Returns​

return_parsed=True (default) — the output of parse_items; pass return_as_pandas=True for a pandas.DataFrame.

No returns table is published for this endpoint: parser: parse_items returns no columns on the live payload (nba, mlb, mbb, 2026-10-07); its rows sit under keys it does not read (top level: $ref, athlete, splits).

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

Example​

espn_mlb_player_career_stats(athlete_id='4239')

Last validated n/a.

espn_mlb_player_statisticslog​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/{athlete_id}/statisticslog

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/4239/statisticslog

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_id 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
statisticscharacter
season_$refcharacter

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

Example​

espn_mlb_player_statisticslog(athlete_id='4239')

Last validated n/a.

espn_mlb_player_eventlog​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/{athlete_id}/eventlog

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/4239/eventlog

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_id path parameter.

Returns​

return_parsed=True (default) — the output of parse_items; pass return_as_pandas=True for a pandas.DataFrame.

No returns table is published for this endpoint: no capture: 404 in nba, nfl, mlb, nhl, wnba, cfb, mbb, wbb with the documented example arguments (2026-10-07).

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

Example​

espn_mlb_player_eventlog(athlete_id='4239')

Last validated n/a.

espn_mlb_player_contracts​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/{athlete_id}/contracts

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/4239/contracts

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_id 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
$refcharacter

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

Example​

espn_mlb_player_contracts(athlete_id='4239')

Last validated n/a.

espn_mlb_player_awards​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/{athlete_id}/awards

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/4239/awards

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_id path parameter.

Returns​

return_parsed=True (default) — the output of parse_items; pass return_as_pandas=True for a pandas.DataFrame.

No returns table is published for this endpoint: no capture: the page holds zero items (count 0) in nba, nfl, mlb, nhl, wnba, cfb, mbb, wbb with the documented example arguments (2026-10-07).

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

Example​

espn_mlb_player_awards(athlete_id='4239')

Last validated n/a.

espn_mlb_player_seasons​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/{athlete_id}/seasons

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/4239/seasons

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_id 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
$refcharacter

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

Example​

espn_mlb_player_seasons(athlete_id='4239')

Last validated n/a.

espn_mlb_player_records​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/{athlete_id}/records

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/4239/records

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_id path parameter.

Returns​

return_parsed=True (default) — the output of parse_items; pass return_as_pandas=True for a pandas.DataFrame.

No returns table is published for this endpoint: no capture: the page holds zero items (count 0) in nba, nfl, mlb, nhl, wnba, cfb, mbb, wbb with the documented example arguments (2026-10-07).

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

Example​

espn_mlb_player_records(athlete_id='4239')

Last validated n/a.

espn_mlb_player_injuries​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/{athlete_id}/injuries

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/4239/injuries

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_id 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
idcharacterESPN numeric identifier for the athlete.
display_namecharacterAthlete's full display name as shown on ESPN.
injuriescharacterInjury entries for the athlete (list of dicts, stringified): status, type, details, dates.

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

Example​

espn_mlb_player_injuries(athlete_id='4239')

Last validated n/a.

espn_mlb_player_notes​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/{athlete_id}/notes

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/4239/notes

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_id path parameter.

Returns​

return_parsed=True (default) — the output of parse_items; pass return_as_pandas=True for a pandas.DataFrame.

No returns table is published for this endpoint: no capture: 404 in nba, nfl, mlb, nhl, wnba, cfb, mbb, wbb with the documented example arguments (2026-10-07).

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

Example​

espn_mlb_player_notes(athlete_id='4239')

Last validated n/a.

espn_mlb_player_vs_player​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/{athlete_id}/vsathlete/{opp_id}

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/4239/vsathlete/5

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_id path parameter.
opp_idopp_idYopp_id path parameter.

Returns​

return_parsed=True (default) — the output of parse_single_entity; pass return_as_pandas=True for a pandas.DataFrame.

No returns table is published for this endpoint: no capture: 404 in nba, nfl, mlb, nhl, wnba, cfb, mbb, wbb with the documented example arguments (2026-10-07).

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

Example​

espn_mlb_player_vs_player(athlete_id='4239', opp_id='5')

Last validated n/a.

espn_mlb_player_hotzones​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/{athlete_id}/hotzones

Valid URL: https://sports.core.api.espn.com/v2/sports/baseball/leagues/mlb/athletes/4239/hotzones

API ParameterPythonPatternRequiredNullableDescription
athlete_idathlete_idYathlete_id 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
countintegerCount of count.
itemscharacter
page_countinteger
page_indexinteger
page_sizeinteger

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

Example​

espn_mlb_player_hotzones(athlete_id='4239')

Last validated n/a.