Skip to main content

NBA — ESPN core API (v2) — Player

espn_nba_players_index​

ESPN endpoint.

Endpoint URL: GET https://sports.core.api.espn.com/v2/sports/basketball/leagues/nba/athletes

Valid URL: https://sports.core.api.espn.com/v2/sports/basketball/leagues/nba/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
$refString
countInt64Total items in the ESPN collection across every page (the page envelope's count), the same on every row; more than the row count means this is one page of several (pass the wrapper's limit= or page=).
page_countInt64Pages the collection spans at the requested limit (the page envelope's pageCount), the same on every row; above 1 means rows are missing from this frame.

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_nba_players_index()

espn_nba_player_core​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/basketball/leagues/nba/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
$refString
activeBooleanTRUE if the row represents an active record (player / team / season).
ageInt64Player age (in years).
date_of_birthStringDate of birth (YYYY-MM-DD).
debut_yearInt64Year of professional debut.
display_heightStringPlayer height in display format (e.g. '6-2').
display_nameStringDisplay name.
display_weightStringPlayer weight in display format (e.g. '180 lbs').
first_nameStringPlayer's first name.
full_nameStringPlayer's full name.
guidStringStable cross-league team GUID.
heightFloat64Player height (string e.g. '6-2' or inches).
idInt64Id.
jerseyStringJersey number worn by the player.
last_nameStringPlayer's last name.
linkedBooleanTRUE if the record is linked to a related entity.
linksString
short_nameStringShort display name.
slugStringURL-safe identifier.
typeStringRecord type / category.
uidStringESPN UID string.
weightFloat64Player weight in pounds.
alternate_ids_sdrString
birth_place_cityStringBirth place city.
birth_place_stateStringBirth place state.
college_$refString
college_athlete_$refString
contracts_$refString
draft_display_textStringDraft display text.
draft_pick_$refString
draft_roundInt64Round of the draft selection.
draft_selectionInt64Draft selection.
draft_team_$refString
draft_yearInt64Draft year (4-digit).
experience_yearsInt64Experience years.
hand_abbreviationStringHand abbreviation.
hand_display_valueStringHand display value.
hand_typeStringHand type.
headshot_altStringAlternative-text label for the headshot.
headshot_hrefStringHeadshot image URL.
position_$refString
position_abbreviationStringPosition abbreviation ('G' / 'F' / 'C').
position_display_nameStringPosition display name.
position_idInt64Unique position identifier.
position_leafBooleanPosition leaf.
position_nameStringListed roster position ('Guard', 'Forward', 'Center').
seasons_$refString
statistics_$refString
statisticslog_$refString
status_abbreviationStringStatus abbreviation.
status_idInt64Status identifier.
status_nameStringStatus label.
status_typeStringStatus type.
team_$refString

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_nba_player_core(athlete_id='4239')

espn_nba_player_career_stats​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/basketball/leagues/nba/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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_nba_player_career_stats(athlete_id='4239')

espn_nba_player_statisticslog​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/basketball/leagues/nba/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
statisticsString
season_$refString
countInt64Always null, since the statisticslog payload ships its rows under entries with no page envelope.
page_countInt64Always null, since the statisticslog payload ships its rows under entries with no page envelope.

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_nba_player_statisticslog(athlete_id='4239')

espn_nba_player_eventlog​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/basketball/leagues/nba/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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_nba_player_eventlog(athlete_id='4239')

espn_nba_player_contracts​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/basketball/leagues/nba/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
$refString
countInt64Total items in the ESPN collection across every page (the page envelope's count), the same on every row; more than the row count means this is one page of several (pass the wrapper's limit= or page=).
page_countInt64Pages the collection spans at the requested limit (the page envelope's pageCount), the same on every row; above 1 means rows are missing from this frame.

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_nba_player_contracts(athlete_id='4239')

espn_nba_player_awards​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/basketball/leagues/nba/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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_nba_player_awards(athlete_id='4239')

espn_nba_player_seasons​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/basketball/leagues/nba/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
$refString
countInt64Total items in the ESPN collection across every page (the page envelope's count), the same on every row; more than the row count means this is one page of several (pass the wrapper's limit= or page=).
page_countInt64Pages the collection spans at the requested limit (the page envelope's pageCount), the same on every row; above 1 means rows are missing from this frame.

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_nba_player_seasons(athlete_id='4239')

espn_nba_player_records​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/basketball/leagues/nba/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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_nba_player_records(athlete_id='4239')

espn_nba_player_injuries​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/basketball/leagues/nba/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
idInt64ESPN numeric identifier for the athlete.
display_nameStringAthlete's full display name as shown on ESPN.
injuriesStringInjury entries for the athlete (list of dicts, stringified): status, type, details, dates.

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

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_nba_player_injuries(athlete_id='4239')

espn_nba_player_notes​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/basketball/leagues/nba/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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

espn_nba_player_notes(athlete_id='4239')

espn_nba_player_vs_player​

ESPN endpoint.

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

Valid URL: https://sports.core.api.espn.com/v2/sports/basketball/leagues/nba/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.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

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