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.1.0 ──
#> ℹ Data updated: 2026-11-13 21:32:58 UTC
#> # A tibble: 80 × 16
#>         id birth_city      birth_country birth_date birth_state_province
#>      <int> <chr>           <chr>         <chr>      <chr>               
#>  1 8476925 North Vancouver CAN           1993-11-05 BC                  
#>  2 8477425 Buffalo         USA           1995-09-13 NY                  
#>  3 8480893 Barnaul         RUS           2000-07-21 NA                  
#>  4 8483546 Beaconsfield    CAN           1998-03-16 QC                  
#>  5 8483565 Washington      USA           1998-05-12 MI                  
#>  6 8477503 Winnipeg        CAN           1995-03-02 MB                  
#>  7 8478007 Riga            LVA           1994-04-13 NA                  
#>  8 8479026 Moncton         CAN           1997-01-25 NB                  
#>  9 8479528 Lipetsk         RUS           1997-04-18 NA                  
#> 10 8479543 Toronto         CAN           1998-03-13 ON                  
#> # ℹ 70 more rows
#> # ℹ 11 more variables: current_team_id <int>, first_name <chr>,
#> #   full_name <chr>, height <int>, in_top100alltime <lgl>, last_name <chr>,
#> #   on_roster <chr>, position <chr>, sweater_number <int>, weight <int>,
#> #   years_pro <int>
# }