Skip to main content
Version: 0.2.0

NHL — NHL Records API — Draft

nhl_records_draft​

Retrieve NHL Entry Draft picks.

Endpoint URL: GET https://records.nhl.com/site/api/draft/{draft_id}

Valid URL: https://records.nhl.com/site/api/draft

API ParameterPythonPatternRequiredNullableDescription
draft_iddraft_idYdraft_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
idInt64Unique player identifier.
age_in_daysStringPlayer age in days.
age_in_days_for_yearStringPlayer age in days for the draft year.
age_in_yearsStringPlayer age in years.
amateur_club_nameStringAmateur club the player played for.
amateur_leagueStringAmateur league the player played in.
birth_dateStringPlayer birth date.
birth_placeStringPlayer birth place.
country_codeStringPlayer country code.
cs_player_idInt64Central Scouting player identifier.
draft_dateStringDate the player was drafted.
draft_master_idInt64Draft master record identifier.
draft_yearInt64Draft year the lottery applies to.
drafted_by_team_idInt64Identifier of the drafting team.
first_nameStringPlayer first name.
heightStringPlayer height in inches.
last_nameStringPlayer last name.
notesStringNotes flag for the pick.
overall_pick_numberInt64Overall pick number in the draft.
pick_in_roundInt64Pick number within the round.
player_idInt64Unique player identifier.
player_nameStringPlayer name.
positionStringPlayer position.
removed_outrightStringRemoved-outright indicator.
removed_outright_whyStringReason the pick was removed outright.
round_numberInt64Draft round number.
shoots_catchesStringHandedness (shoots/catches).
supplemental_draftStringSupplemental draft indicator.
team_pick_historyStringHistory of the team's picks at this slot.
tri_codeStringTeam three-letter code.
weightStringPlayer weight in pounds.

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​

nhl_records_draft()

nhl_records_draft_by_team​

All draft picks made by a single team.

Endpoint URL: GET https://records.nhl.com/site/api/draft/byTeam/{team_id}

Valid URL: https://records.nhl.com/site/api/draft/byTeam/10

API ParameterPythonPatternRequiredNullableDescription
team_idteam_idYteam_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
idInt64Unique player identifier.
age_in_daysInt64Player age in days.
age_in_days_for_yearInt64Player age in days for the draft year.
age_in_yearsInt64Player age in years.
amateur_club_nameStringAmateur club the player played for.
amateur_leagueStringAmateur league the player played in.
birth_dateStringPlayer birth date.
birth_placeStringPlayer birth place.
country_codeStringPlayer country code.
cs_player_idInt64Central Scouting player identifier.
draft_dateStringDate the player was drafted.
draft_master_idInt64Draft master record identifier.
draft_yearInt64Draft year the lottery applies to.
drafted_by_team_idInt64Identifier of the drafting team.
first_nameStringPlayer first name.
heightFloat64Player height in inches.
last_nameStringPlayer last name.
notesStringNotes flag for the pick.
overall_pick_numberInt64Overall pick number in the draft.
pick_in_roundInt64Pick number within the round.
player_idInt64Unique player identifier.
player_nameStringPlayer name.
positionStringPlayer position.
removed_outrightStringRemoved-outright indicator.
removed_outright_whyStringReason the pick was removed outright.
round_numberInt64Draft round number.
shoots_catchesStringHandedness (shoots/catches).
supplemental_draftStringSupplemental draft indicator.
team_pick_historyStringHistory of the team's picks at this slot.
tri_codeStringTeam three-letter code.
weightFloat64Player weight in pounds.

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​

nhl_records_draft_by_team(team_id=10)

nhl_records_draft_prospect​

Draft prospect records.

Endpoint URL: GET https://records.nhl.com/site/api/draft-prospect/{prospect_id}

Valid URL: https://records.nhl.com/site/api/draft-prospect

API ParameterPythonPatternRequiredNullableDescription
prospect_idprospect_idYprospect_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
idInt64Unique player identifier.
birth_cityStringBirth city.
birth_country3codeStringProspect birth country three-letter code.
birth_dateStringPlayer birth date.
birth_state_prov_codeStringProspect birth state/province code.
category_idInt64Prospect category identifier.
created_onStringDate the trophy record was created.
cs_player_idInt64Central Scouting player identifier.
draft_status_codeStringDraft eligibility status code.
ep_player_idInt64EliteProspects player identifier.
first_nameStringPlayer first name.
headshot_idInt64Headshot image identifier.
heightInt64Player height in inches.
hometownStringProspect hometown.
last_club_nameStringMost recent club name.
last_league_abbrStringMost recent league abbreviation.
last_nameStringPlayer last name.
nationality_codeStringNationality code of the official.
news_articlesStringAssociated news articles.
playeridInt64Unique player identifier.
position_descStringPlayer position description.
profileStringProspect profile text.
quotesStringQuotes about the prospect.
scouting_reportStringScouting report text.
shoots_catchesStringHandedness (shoots/catches).
stats_textStringStatistical summary text.
videoStringAssociated video content.
weightInt64Player weight in pounds.

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​

nhl_records_draft_prospect()

nhl_records_draft_lottery_odds​

Draft lottery odds (current year or filtered by season).

Endpoint URL: GET https://records.nhl.com/site/api/draft-lottery-odds

Valid URL: https://records.nhl.com/site/api/draft-lottery-odds

API ParameterPythonPatternRequiredNullableDescription

Returns​

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

col_nametypedescription
idInt64Unique player identifier.
draft_yearInt64Draft year the lottery applies to.
format_contentStringDescription of the lottery format.
odds_contentStringDescription of the lottery odds.
result_notesStringNotes on the lottery results.

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​

nhl_records_draft_lottery_odds()