Skip to contents

One game's header: teams, score, xG, power plays, periods, rink, referees and attendance.

Usage

liiga_game(season, game_id)

Arguments

season

Season END year (2026 = 2025-26). Game ids repeat across seasons, so a game is (season, game_id).

game_id

Game id (game_id in liiga_schedule or liiga_games), e.g. 1; unique only within a season.

Value

A fastRhockey_data tibble (55 columns; zero rows when a valid payload has none).

col_nametypedescription
game_idintegerGame id, unique only within a season: key a game as (season, game_id).
seasonintegerSeason END year (2026 = 2025-26).
startcharacterScheduled start, ISO 8601 UTC.
periodscharacterJSON list of the game's periods: index, home and away goals, category, start and end second.
finished_typecharacterHow the game ended: ENDED_DURING_REGULAR_GAME_TIME, ENDED_DURING_EXTENDED_GAME_TIME (overtime), ENDED_DURING_WINNING_SHOT_COMPETITION (shootout).
startedlogicalGame has started.
endedlogicalGame has ended.
game_timeintegerSeconds from the start of the game. Regular season: 3900 (65:00) = the end of the 5-minute overtime; playoff overtime runs past it.
spectatorsintegerAttendance (spectators) reported for the game.
ice_rink_idintegerLiiga's id of the rink (ice arena).
ice_rink_namecharacterName of the rink (ice arena).
ice_rink_latitudenumericRink latitude, decimal degrees.
ice_rink_longitudenumericRink longitude, decimal degrees.
ice_rink_street_addresscharacterStreet address of the rink.
ice_rink_zipcharacterPostal code of the rink.
ice_rink_citycharacterCity where the rink is located.
current_periodintegerLast period played (3 = regulation; 4 and up = overtime periods or the shootout; 2026 values 3, 4, 5, 7).
refereescharacterGame officials.
stalelogicalLive data is stale.
seriecharacterTournament code, uppercase (RUNKOSARJA, PLAYOFFS, PRACTICE, ...); in /schedule the integer tournament id instead (see serieId and Divergence notes).
game_weekintegerGame week of the season.
home_team_idintegerHome team id (the number of the <num>:<slug> key).
home_team_slugcharacterHome team slug (e.g. hpk).
home_placeholdercharacterHome team: placeholder label for an undecided playoff team, else null.
home_namecharacterHome team: display name of the team, e.g. HPK.
home_goalsintegerHome team: goals scored by the team in the game.
home_time_outintegerHome team: second of the game (from game start) at which the team called its timeout.
home_powerplay_instancesintegerHome team: power plays the team had in the game.
home_powerplay_goalsintegerHome team: power-play goals the team scored in the game.
home_short_handed_instancesintegerHome team: times the team played short-handed in the game.
home_short_handed_goalsintegerHome team: short-handed goals the team scored in the game.
home_expected_goalsnumericHome team: expected goals (xG) for the team in the game, from Liiga's undocumented model.
home_rankingintegerHome team: table position.
home_game_start_date_timecharacterHome team: scheduled start, ISO 8601 UTC.
home_logos_dark_bgcharacterHome team: logo image URL for dark backgrounds.
home_logos_light_bgcharacterHome team: logo image URL for light backgrounds.
home_logos_dark_bg_originalcharacterHome team: original-file logo URL for dark backgrounds; null in every capture.
home_logos_light_bg_originalcharacterHome team: original-file logo URL for light backgrounds; null in every capture.
away_team_idintegerAway team id (the number of the <num>:<slug> key).
away_team_slugcharacterAway team slug (e.g. tps).
away_placeholdercharacterAway team: placeholder label for an undecided playoff team, else null.
away_namecharacterAway team: display name of the team, e.g. HPK.
away_goalsintegerAway team: goals scored by the team in the game.
away_time_outintegerAway team: second of the game (from game start) at which the team called its timeout.
away_powerplay_instancesintegerAway team: power plays the team had in the game.
away_powerplay_goalsintegerAway team: power-play goals the team scored in the game.
away_short_handed_instancesintegerAway team: times the team played short-handed in the game.
away_short_handed_goalsintegerAway team: short-handed goals the team scored in the game.
away_expected_goalsnumericAway team: expected goals (xG) for the team in the game, from Liiga's undocumented model.
away_rankingintegerAway team: table position.
away_game_start_date_timecharacterAway team: scheduled start, ISO 8601 UTC.
away_logos_dark_bgcharacterAway team: logo image URL for dark backgrounds.
away_logos_light_bgcharacterAway team: logo image URL for light backgrounds.
away_logos_dark_bg_originalcharacterAway team: original-file logo URL for dark backgrounds; null in every capture.
away_logos_light_bg_originalcharacterAway team: original-file logo URL for light backgrounds; null in every capture.

Details

Endpoint: GET https://liiga.fi/api/v2/games/{season}/{game_id}

Seasons are END years (2026 = 2025-26), the same key as sdv-py. Requests to liiga.fi are spaced at least one second apart. A request Liiga answers with nothing (an unknown game, a tournament not played that season, a shot map before 2016) raises fastRhockey_no_data; a failed fetch or an error-shaped answer raises fastRhockey_asset_fetch; a bad argument raises fastRhockey_bad_request.

Examples

# \donttest{
  try(liiga_game(game_id = 1, season = 2026))
#> ── Liiga game header Information from liiga.fi ─────── fastRhockey 1.0.0.9000 ──
#> ℹ Data updated: 2026-10-13 01:55:11 UTC
#> # A tibble: 1 × 55
#>   game_id season start  periods finished_type started ended game_time spectators
#>     <int>  <int> <chr>  <chr>   <chr>         <lgl>   <lgl>     <int>      <int>
#> 1       1   2026 2025-… "[{\"i… ENDED_DURING… TRUE    TRUE       3900       2810
#> # ℹ 46 more variables: ice_rink_id <int>, ice_rink_name <chr>,
#> #   ice_rink_latitude <dbl>, ice_rink_longitude <dbl>,
#> #   ice_rink_street_address <chr>, ice_rink_zip <chr>, ice_rink_city <chr>,
#> #   current_period <int>, referees <chr>, stale <lgl>, serie <chr>,
#> #   game_week <int>, home_team_id <int>, home_team_slug <chr>,
#> #   home_placeholder <chr>, home_name <chr>, home_goals <int>,
#> #   home_time_out <int>, home_powerplay_instances <int>, …
# }