Skip to contents

Returns every player who has suited up for a given team via the NHL Records API (https://records.nhl.com/site/api/player/byTeam/{team_id}).

Usage

nhl_records_player_byteam(team_id, cayenne_exp = NULL)

Arguments

team_id

Integer team ID (required).

cayenne_exp

Optional Cayenne filter expression string.

Value

A data frame (fastRhockey_data) with the following columns:

col_nametypesdescription
idintegerUnique player identifier.
accrued_seasonsintegerNumber of accrued NHL seasons.
add_nameslogicalAdditional names for the player.
age_sign_waiverintegerAge at which the player signed a waiver.
age_signel_faintegerAge at which the player signed as a free agent.
alertcharacterAlert flag or note.
birth_citycharacterBirth city of the player.
birth_countrycharacterBirth country of the player.
birth_datecharacterBirth date of the player.
birth_state_provincecharacterBirth state or province of the player.
career_team_idlogicalPrimary career team identifier.
central_registry_positioncharacterPosition per the central registry.
club_elec_arbcharacterClub election to arbitration indicator.
current_team_idintegerCurrent team identifier.
date_of_deathlogicalDate of death, if applicable.
dda_idintegerDDA identifier.
deceasedlogicalWhether the player is deceased.
ep_player_idintegerEliteProspects player identifier.
fa_group_after_seasonlogicalFree agent group after the season.
first_namecharacterFirst name of the player.
first_signed_by_team_idintegerTeam that first signed the player.
free_agent_groupcharacterFree agent group classification.
full_namecharacterFull name of the player.
group5electioncharacterGroup 5 free agency election indicator.
group5seasons_earnedintegerGroup 5 seasons earned.
group6prorationlogicalGroup 6 proration indicator.
group6seasons_earnedintegerGroup 6 seasons earned.
groups_earned_thru_seasonintegerSeason through which groups were earned.
heightintegerPlayer height in inches.
hof_induction_yearlogicalHockey Hall of Fame induction year.
home_towncharacterHome town of the player.
iihf_hof_induction_yearlogicalIIHF Hall of Fame induction year.
in_hockey_hoflogicalWhether the player is in the Hockey Hall of Fame.
in_iihf_hofintegerWhether the player is in the IIHF Hall of Fame.
in_top100alltimelogicalWhether the player is in the all-time top 100.
in_us_hockey_hoflogicalWhether the player is in the US Hockey Hall of Fame.
is_defectedcharacterWhether the player defected.
is_deletedcharacterWhether the record is deleted.
is_juniorcharacterWhether the player is a junior.
is_retiredlogicalWhether the player is retired.
is_rookiecharacterWhether the player is a rookie.
is_suspendedcharacterWhether the player is suspended.
last_amateur_league_idintegerLast amateur league identifier.
last_amateur_team_idintegerLast amateur team identifier.
last_nhl_team_idintegerLast NHL team identifier.
last_namecharacterLast name of the player.
loan_cap_exceptioncharacterLoan cap exception indicator.
long_term_injurycharacterLong-term injury indicator.
messagecharacterStatus message.
middle_namecharacterMiddle name of the player.
nationalitycharacterNationality of the player.
nhl_experienceintegerYears of NHL experience.
on_rostercharacterWhether the player is on a roster.
platform_yearintegerPlatform year for contract purposes.
positioncharacterPlayer position.
pr_namecharacterPublic relations display name.
pr_statintegerPublic relations status code.
pro_year_reductionintegerProfessional year reduction.
reentry_waiverscharacterRe-entry waivers indicator.
roster_special_codelogicalRoster special status code.
salary_arbitration_expintegerSalary arbitration experience.
shoots_catchescharacterHandedness (shoots or catches).
sweater_numberintegerSweater number worn by the player.
update_timestampcharacterTimestamp of the last record update.
us_hof_induction_yearlogicalUS Hockey Hall of Fame induction year.
vet_cap_excptncharacterVeteran cap exception indicator.
waiver_amountintegerWaiver amount.
waiver_draftcharacterWaiver draft indicator.
waiver_statuscharacterWaiver status.
weightintegerPlayer weight in pounds.
years_prointegerNumber of professional years played.

Examples

# \donttest{
  try(nhl_records_player_byteam(team_id = 10))
#> ── NHL Records Player by Team ───────────────────────────── fastRhockey 1.0.0 ──
#>  Data updated: 2026-06-13 03:25:46 UTC
#> # A tibble: 71 × 71
#>         id accrued_seasons add_names age_sign_waiver age_signel_fa alert
#>      <int>           <int> <lgl>               <int>         <int> <chr>
#>  1 8475690              13 NA                     21            20 N    
#>  2 8476329               6 NA                     22            22 N    
#>  3 8476988               8 NA                     22            22 Y    
#>  4 8477541               2 NA                     21            21 N    
#>  5 8479528              NA NA                     NA            NA N    
#>  6 8479543               4 NA                     20            20 Y    
#>  7 8479599              NA NA                     NA            NA N    
#>  8 8479968               2 NA                     22            22 N    
#>  9 8480284              NA NA                     NA            NA N    
#> 10 8480870               1 NA                     19            19 N    
#> # ℹ 61 more rows
#> # ℹ 65 more variables: birth_city <chr>, birth_country <chr>, birth_date <chr>,
#> #   birth_state_province <chr>, career_team_id <lgl>,
#> #   central_registry_position <chr>, club_elec_arb <chr>,
#> #   current_team_id <int>, date_of_death <lgl>, dda_id <int>, deceased <lgl>,
#> #   ep_player_id <int>, fa_group_after_season <lgl>, first_name <chr>,
#> #   first_signed_by_team_id <int>, free_agent_group <chr>, full_name <chr>, …
# }