Skip to contents

Wraps GET https://www.shl.se/api/statistics-v2/player-h2h- v2/{ssgt_uuid}/{home_team_uuid}/{away_team_uuid} of the SHL site API (www.shl.se). Unofficial use of a public source; seasons are END years (2026 = 2025/26) and are mapped to the site's ssgt uuids through /statistics-v2/layout-info.

Usage

shl_player_h2h(
  ssgt_uuid,
  home_team_uuid,
  away_team_uuid,
  game_uuid = NULL,
  return_parsed = TRUE
)

Arguments

ssgt_uuid

ssgt uuid: one season + series + game type (e.g. 2025/2026 SHL regular season). Directory: /statistics-v2/layout-info seasonSeriesGameTypeTeams[].ssgtUuid.

home_team_uuid

Home team uuid of the game.

away_team_uuid

Away team uuid of the game.

game_uuid

Game uuid; narrows the head-to-head to that game's line-ups.

return_parsed

Parse the payload into a tibble (default TRUE); FALSE returns the raw decoded JSON as a list.

Value

A fastRhockey_data tibble (the raw JSON list when return_parsed = FALSE) with the following columns:

col_nametypedescription
uuidcharacterAthlete uuid (platform key space; qQ9-... or 10-char form); joins to the athlete routes and stats-info stats[].info.uuid. Not the isa or ramses_legacy id.
first_namecharacterGiven (first) name of the player.
last_namecharacterSurname (family name) of the player.
full_namecharacterGiven name and surname.
birth_datecharacterDate of birth (YYYY-MM-DD).
nationalitycharacterNationality (ISO country code).
gendercharacterSex of the athlete or team (male / female).
jersey_numbercharacterJersey (shirt) number of the player.
positioncharacterPosition label in English (e.g. Forward); N/A when unknown.
position_codecharacterPosition code (GK, D, F; CE / LW / RW in stats rows); N/A when unknown.
age_valueintegerAge of the player in whole years.
age_formatcharacterUnit of value: years.
height_valueintegerHeight of the player in centimetres.
height_formatcharacterUnit of value: cm.
weight_valueintegerWeight of the player in kilograms.
weight_formatcharacterUnit of value: kg.
team_uuidcharacterPlatform team uuid.
team_instance_idcharacterClub site instance id (e.g. fhc1_fhc).
team_namecharacterName of the team.
team_codecharacterStatNet team code (SAIK, FHC).
team_mediacharacterMedia URL or string.
media_urlcharacterPortrait URL on the imgix CDN.
media_altcharacterImage alt text. Empty string in every sample (placeholder).
media_srcsetcharacterResponsive image srcset.
season_statscharacterCurrent-season stat rows of the player (empty in the sample).
career_statscharacterCareer stat rows of the player (empty in the sample).
match_stats_nrintegerJersey (shirt) number of the player.
match_stats_poscharacterPosition code in this game (e.g. CE, LW, RW, D, GK).
match_stats_lineintegerLine (unit) number the player was listed on.
match_stats_gintegerNumber of goals scored.
match_stats_aintegerNumber of assists credited.
match_stats_tpintegerPoints (goals + assists).
match_stats_shgintegerShorthanded goals.
match_stats_ppgintegerPower-play goals.
match_stats_swintegerNumber of shots that missed the net.
match_stats_pimintegerPenalty minutes.
match_stats_sogintegerNumber of shots on goal.
match_stats_ppsogintegerPower-play shots on goal.
match_stats_nepintegerOn ice for goals against (count).
match_stats_popintegerOn ice for goals for (count).
match_stats_toicharacterTime on ice (mm:ss). Clock/duration as an mm:ss string.
match_stats_hitsintegerBody checks delivered.
match_stats_fo_totintegerFace-offs taken.
match_stats_fowintegerNumber of face-offs won.
match_stats_folintegerFace-offs lost.
match_stats_num_penintegerNumber of penalties.
match_stats_fo_percnumericFace-off win %.
match_stats_msintegerMissed shots (wide + blocked).
match_stats_bk_sintegerNumber of blocked shots.
match_stats_plus_minusintegerGoals for minus goals against while on ice (+/-).
season_avg_statscharacterHead-to-head season averages.
statistics_providercharacterStats provider of the data (statnet seen).
is_in_squadlogicalWhether the player is in the current squad.
effective_ssgt_uuidcharacterThe ssgt the head-to-head was computed for: the CURRENT season, whatever the path asked.

Errors

fastRhockey_no_data: the host answered 404, an empty body (gameday routes before 2023/24), a table with no rows, or the season and game type are not in layout-info. fastRhockey_asset_fetch: any other non-2xx answer or a dead connection after retries, a non-JSON or error-envelope 200, a stats-info page that reaches count or falls short of its totalCount, or a body for another game, team, athlete or ssgt than the one asked for. fastRhockey_bad_request: a 400 / 422, a season that is not a year, or an argument outside its choices.

Examples

# \donttest{
  shl_player_h2h(ssgt_uuid = "iuzqg7dqk9", home_team_uuid = "087a-087aTQv9u",
    away_team_uuid = "41c4-41c4BiYZU", game_uuid = "bdhvuc5tex")
#> ── SHL Player H2h Information from www.shl.se ──────── fastRhockey 1.0.0.9000 ──
#> ℹ Data updated: 2026-10-13 01:59:22 UTC
#> # A tibble: 46 × 60
#>    uuid          first_name last_name    full_name birth_date nationality gender
#>    <chr>         <chr>      <chr>        <chr>     <chr>      <chr>       <chr> 
#>  1 qQ9-9d31rLEXi Max        Friberg      Max Frib… 1992-11-20 SE          "male"
#>  2 qZn-BWlb8Aoj  Ty         Rattie       Ty Rattie 1993-02-05 CA          "male"
#>  3 qcw-3QbUIyuRn Arttu      Ruotsalainen Arttu Ru… 1997-10-29 FI          ""    
#>  4 qRe-glixIcxZ  Fredrik    Karlström    Fredrik … 1998-01-12 SE          "male"
#>  5 qV0-1dPP3DJH6 Oscar      Lawner       Oscar La… 2001-02-13 SE          "male"
#>  6 qRo-4uyOhblgh Erik       Norén        Erik Nor… 2001-10-11 SE          "male"
#>  7 qee-2LDnbExBt Dominik    Egli         Dominik … 1998-08-20 CH          ""    
#>  8 qWb-2harGUCbA Jonathan   Myrenberg    Jonathan… 2003-04-11 SE          "male"
#>  9 qQ9-349c7WDv6 Lars       Johansson    Lars Joh… 1987-07-11 SE          "male"
#> 10 qQ9-d14fFrVkN Nicklas    Lasu         Nicklas … 1989-09-16 SE          "male"
#> # ℹ 36 more rows
#> # ℹ 53 more variables: jersey_number <chr>, position <chr>,
#> #   position_code <chr>, age_value <int>, age_format <chr>, height_value <int>,
#> #   height_format <chr>, weight_value <int>, weight_format <chr>,
#> #   team_uuid <chr>, team_instance_id <chr>, team_name <chr>, team_code <chr>,
#> #   team_media <chr>, media_url <chr>, media_alt <chr>, media_srcset <chr>,
#> #   season_stats <chr>, career_stats <chr>, match_stats_nr <int>, …
# }