Skip to main content

Yahoo Sports — Yahoo Sports Shangrila (graphite-secure.sports.yahoo.com) — Player

yahoo_player_basic​

Yahoo shangrila persisted query playerBasic -> tables: players, leagues

Endpoint URL: GET https://graphite-secure.sports.yahoo.com/v1/query/shangrila/playerBasic

Valid URL: https://graphite-secure.sports.yahoo.com/v1/query/shangrila/playerBasic

API ParameterPythonPatternRequiredNullableDescription
leagueleagueYleague query parameter.
playerIdplayer_idYplayerId query parameter.

Returns​

return_parsed=True (default) — A dict of polars/pandas DataFrames keyed by the payload's data collections (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).

players

col_nametypedescription
alias_pathStringSite-relative path portion of the entity's Yahoo alias (e.g., "/ncaaf/teams/tcu/").
alias_langStringLanguage/locale tag attached to the entity's Yahoo alias (e.g., "en-US").
alias_urlStringAbsolute sports.yahoo.com URL of the entity's page (e.g., "https://sports.yahoo.com/ncaaf/players/464024/").
alias_domainStringHost the entity's Yahoo alias resolves against (e.g., "sports.yahoo.com").
display_nameString
first_nameString
last_nameString
player_idString
positionsString
team_display_nameString
team_team_idString
uniform_numberStringJersey number the player wears for the team.
injuryString

leagues

col_nametypedescription
current_seasonInt64Season the league is currently playing, as the four-digit starting year.

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​

yahoo_player_basic()

yahoo_player_career_stats​

Yahoo shangrila persisted query playerCareerStats -> one row per players entry

Endpoint URL: GET https://graphite-secure.sports.yahoo.com/v1/query/shangrila/playerCareerStats

Valid URL: https://graphite-secure.sports.yahoo.com/v1/query/shangrila/playerCareerStats

API ParameterPythonPatternRequiredNullableDescription
playerIdplayer_idYplayerId query parameter.
seasonPhasesseason_phasesYseasonPhases query parameter.
footballStatIdsfootball_stat_idsYfootballStatIds query parameter.
basketballStatIdsbasketball_stat_idsYbasketballStatIds query parameter.
baseballStatIdsbaseball_stat_idsYbaseballStatIds query parameter.
hockeyStatIdshockey_stat_idsYhockeyStatIds query parameter.
soccerStatIdssoccer_stat_idsYsoccerStatIds 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
positionsString
stats_by_seasonStringJSON-encoded per-season statistical lines for the player.
total_statsStringJSON-encoded career-total statistical line summing the player's seasons.
career_statsStringJSON-encoded career statistical totals for the player across every season.

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​

yahoo_player_career_stats()

yahoo_player_game_log​

Yahoo shangrila persisted query playerGameLog -> one row per players entry

Endpoint URL: GET https://graphite-secure.sports.yahoo.com/v1/query/shangrila/playerGameLog

Valid URL: https://graphite-secure.sports.yahoo.com/v1/query/shangrila/playerGameLog

API ParameterPythonPatternRequiredNullableDescription
playerIdplayer_idYplayerId query parameter.
countcountYcount query parameter.
seasonsseasonsYseasons query parameter.
seasonPhasesseason_phasesYseasonPhases query parameter.
footballStatIdsfootball_stat_idsYfootballStatIds query parameter.
basketballStatIdsbasketball_stat_idsYbasketballStatIds query parameter.
baseballStatIdsbaseball_stat_idsYbaseballStatIds query parameter.
hockeyStatIdshockey_stat_idsYhockeyStatIds query parameter.
soccerStatIdssoccer_stat_idsYsoccerStatIds 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
player_idString
activeBoolean
positionsString
team_idString
player_game_statsStringJSON-encoded per-game statistical lines for the player across the requested game log.
player_season_statsStringJSON-encoded season statistical totals for the player.

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​

yahoo_player_game_log()

yahoo_player_props​

Yahoo shangrila persisted query playerProps -> one row per players entry

Endpoint URL: GET https://graphite-secure.sports.yahoo.com/v1/query/shangrila/playerProps

Valid URL: https://graphite-secure.sports.yahoo.com/v1/query/shangrila/playerProps

API ParameterPythonPatternRequiredNullableDescription
playerIdplayer_idYplayerId 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
gamesString
player_idString
display_nameString

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​

yahoo_player_props()

Yahoo shangrila persisted query playerSearch -> one row per leagues.players entry

Endpoint URL: GET https://graphite-secure.sports.yahoo.com/v1/query/shangrila/playerSearch

Valid URL: https://graphite-secure.sports.yahoo.com/v1/query/shangrila/playerSearch

API ParameterPythonPatternRequiredNullableDescription
leagueleagueYleague query parameter.
namenameYname query parameter.
onActiveRosterOnlyon_active_roster_onlyYonActiveRosterOnly query parameter.
nflPositionIdnfl_position_idYnflPositionId query parameter.
nbaPositionIdnba_position_idYnbaPositionId query parameter.
mlbPositionIdmlb_position_idYmlbPositionId query parameter.
nhlPositionIdnhl_position_idYnhlPositionId 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
player_idString
activeString
aliasStringJSON-encoded Yahoo alias object for the entity, carrying the site URL, path and subpage routing used to build links to its page.
first_nameString
last_nameString
display_nameString
suggested_headshotStringJSON-encoded image node for the headshot Yahoo recommends for this player.
teamString

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​

yahoo_player_search()

yahoo_player_season_stats​

Yahoo shangrila persisted query playerSeasonStats -> one row per players entry

Endpoint URL: GET https://graphite-secure.sports.yahoo.com/v1/query/shangrila/playerSeasonStats

Valid URL: https://graphite-secure.sports.yahoo.com/v1/query/shangrila/playerSeasonStats

API ParameterPythonPatternRequiredNullableDescription
playerIdplayer_idYplayerId query parameter.
seasonsseasonsYseasons query parameter.
seasonPhasesseason_phasesYseasonPhases query parameter.
footballStatIdsfootball_stat_idsYfootballStatIds query parameter.
footballCutTypeGroupsfootball_cut_type_groupsYfootballCutTypeGroups query parameter.
basketballStatIdsbasketball_stat_idsYbasketballStatIds query parameter.
basketballCutTypeGroupsbasketball_cut_type_groupsYbasketballCutTypeGroups query parameter.
baseballStatIdsbaseball_stat_idsYbaseballStatIds query parameter.
baseballCutTypeGroupsbaseball_cut_type_groupsYbaseballCutTypeGroups query parameter.
hockeyStatIdshockey_stat_idsYhockeyStatIds query parameter.
hockeyCutTypeGroupshockey_cut_type_groupsYhockeyCutTypeGroups query parameter.
groupBySeasonPhasegroup_by_season_phaseYgroupBySeasonPhase query parameter.
usePlayerUniqueIduse_player_unique_idYusePlayerUniqueId 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
player_idString
activeBoolean
positionsString
team_idString
player_season_statsStringJSON-encoded season statistical totals for the player.

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​

yahoo_player_season_stats()