Skip to contents

Wraps GET https://www.shl.se/api/gameday/boxscore/{game_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_boxscore(game_uuid, return_parsed = TRUE)

Arguments

game_uuid

Game uuid (gameInfo[].uuid from /sports-v2/game-schedule). gameday/* has data from 2023/24 on; older games answer 200 with an empty body.

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
team_sidecharacterSide of the game: home or away.
position_groupcharacterskater or goalie (goalies come from the body's gkStats rows).
player_idintegerisa (StatNet) player id, integer. Play-by-play sends it as a string, every other route as an integer; it is cast here so the frames join.
team_idcharacterTeam code (e.g. FHC) in gameday and standings payloads; not the team uuid.
periodintegerPeriod: 0 = the whole game, 1-3 the periods, 4 and up overtime.
full_namecharacterGiven name and surname.
first_namecharacterGiven (first) name of the player.
last_namecharacterSurname (family name) of the player.
nrintegerJersey (shirt) number of the player.
poscharacterPosition code in this game (e.g. CE, LW, RW, D, GK).
lineintegerLine (unit) number the player was listed on.
gnumericNumber of goals scored.
anumericNumber of assists credited.
ppgnumericPower-play goals.
swnumericNumber of shots that missed the net.
pimnumericPenalty minutes.
sognumericNumber of shots on goal.
ppsognumericPower-play shots on goal.
plus_minusnumericPlus/minus in the game.
toicharacterTime on ice (mm:ss). Clock/duration as an mm:ss string.
hitsnumericBody checks delivered.
fownumericNumber of face-offs won.
folnumericFace-offs lost.
fo_percnumericFace-off win %.
ganumericNumber of goals conceded (goals against).
soganumericShots on goal against.
spganumericUnverified goalie column (box score).
svsnumericNumber of saves made by the goalie.
svs_percnumericSave percentage of the game as a FRACTION 0-1 (e.g. '0.9655...'); integer 0 for a goalie without shots. Numeric, but sent as a string in some rows and as a number in others.

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_boxscore(game_uuid = "bdhvuc5tex")
#> ── SHL Boxscore Information from www.shl.se ────────── fastRhockey 1.0.0.9000 ──
#> ℹ Data updated: 2026-10-13 01:59:11 UTC
#> # A tibble: 44 × 29
#>    team_side position_group player_id team_id period full_name        first_name
#>    <chr>     <chr>              <int> <chr>    <int> <chr>            <chr>     
#>  1 home      skater              1332 FHC          0 Henrik Tömmernes Henrik    
#>  2 home      skater              2004 FHC          0 Max Friberg      Max       
#>  3 home      skater              5639 FHC          0 Jere Innala      Jere      
#>  4 home      skater              3770 FHC          0 Jacob Peterson   Jacob     
#>  5 home      skater              6432 FHC          0 Dominik Egli     Dominik   
#>  6 home      skater              6433 FHC          0 Arttu Ruotsalai… Arttu     
#>  7 home      skater              3265 FHC          0 Linus Högberg    Linus     
#>  8 home      skater              2429 FHC          0 Tom Nilsson      Tom       
#>  9 home      skater              1639 FHC          0 Erik Thorell     Erik      
#> 10 home      skater              4050 FHC          0 Filip Cederqvist Filip     
#> # ℹ 34 more rows
#> # ℹ 22 more variables: last_name <chr>, nr <int>, pos <chr>, line <int>,
#> #   g <dbl>, a <dbl>, ppg <dbl>, sw <dbl>, pim <dbl>, sog <dbl>, ppsog <dbl>,
#> #   plus_minus <dbl>, toi <chr>, hits <dbl>, fow <dbl>, fol <dbl>,
#> #   fo_perc <dbl>, ga <dbl>, soga <dbl>, spga <dbl>, svs <dbl>, svs_perc <dbl>
# }