Skip to main content

SIHF (Swiss hockey) — SIHF statistics API (data.sihf.ch; National League, Swiss League and every SIHF league) — Game

sihf_game_info​

Header of one game: league, phase, teams, final and per-period score and shots, venue, attendance, officials.

Endpoint URL: GET https://data.sihf.ch/statistic/api/cms/gameoverview

Valid URL: https://data.sihf.ch/statistic/api/cms/gameoverview?alias=gameDetail&searchQuery=20261105000325&language=en

API ParameterPythonPatternRequiredNullableDescription
searchQuerygame_idYRequired. SIHF game id (game_id in sihf_results), e.g. 20261105000325.
languagelanguageYResponse language. Only part of the body is translated: status, position and penalty names stay German.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
game_idInt64SIHF game id (Int64 join key; the details link of sihf_results, the searchQuery of the game wrappers).
seasonInt64Season by its END year (2026 = 2025-26).
roundInt64Round number within the season.
league_idInt64SIHF league id of the game (1 = National League).
league_nameStringLeague name (e.g., "National League").
region_idInt64SIHF region id of the game (1 = national).
region_nameStringRegion name (e.g., "National").
group_idInt64SIHF group id (0 = no group).
group_nameStringName of the league group the game belongs to ('Keine' = none).
tournament_idInt64SIHF tournament id (1 = championship).
tournament_nameStringTournament name, German (e.g., 'Meisterschaft' = championship).
qualification_idInt64SIHF id of the stage of the season (1 = regular season).
qualification_nameStringStage of the season (e.g., "Regular Season", "Playoff Final").
phase_idInt64SIHF phase id (regular season, a playoff round, ...).
phase_nameStringPhase name (e.g., "NL Playoff Final").
start_date_timeStringScheduled start, ISO-8601 with UTC offset, as a string.
end_date_timeStringEnd of the game, ISO-8601 with UTC offset, as a string.
update_date_timeStringWhen SIHF last updated the record, ISO-8601 with UTC offset, as a string.
status_idInt64SIHF game-status id (12 = finished).
status_nameStringGame-status name; German whatever the language (e.g., "Ende").
status_percentInt64Game progress, 0-100 (100 once the game is over).
status_canceledBooleanWhether the game was cancelled.
home_team_idInt64SIHF team id of the home team.
home_team_nameStringHome team display name.
home_team_acronymStringHome team abbreviation.
away_team_idInt64SIHF team id of the away team.
away_team_nameStringAway team display name.
away_team_acronymStringAway team abbreviation.
home_scoreInt64Final home score.
away_scoreInt64Final away score.
home_score_by_periodListHome goals per period, aligned with period_indicators.
away_score_by_periodListAway goals per period, aligned with period_indicators.
home_shots_by_periodListHome shots on goal per period, aligned with period_indicators.
away_shots_by_periodListAway shots on goal per period, aligned with period_indicators.
period_indicatorsListPeriod labels: "1", "2", "3", then "OT1", ...
venue_nameStringName of the arena the game was played in.
venue_cityStringCity of the arena with its canton code (e.g., 'Davos-Platz GR').
spectatorsInt64Attendance as SIHF reports it.
refereesStringReferee names, comma-joined.
linesmenStringLinesman names, comma-joined.
broadcastsStringBroadcasters, comma-joined (e.g., "MYSPORTS,TV24").

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. SIHF answered 404 (unknown game), or it ignored a requested season / league / phase and served another one.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

sihf_game_info(game_id=20261105000325)

sihf_game_player_stats​

Skater box score of one game, both sides, with ice time and faceoffs.

Endpoint URL: GET https://data.sihf.ch/statistic/api/cms/gameoverview

Valid URL: https://data.sihf.ch/statistic/api/cms/gameoverview?alias=gameDetail&searchQuery=20261105000325&language=en

API ParameterPythonPatternRequiredNullableDescription
searchQuerygame_idYRequired. SIHF game id (game_id in sihf_results), e.g. 20261105000325.
languagelanguageYResponse language. Only part of the body is translated: status, position and penalty names stay German.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
game_idInt64SIHF game id (Int64 join key; the details link of sihf_results, the searchQuery of the game wrappers).
team_sideStringSide of the game the row belongs to: "home" or "away".
team_idInt64SIHF team id of the row's side.
team_nameStringTeam name of the row's side.
player_numberInt64Jersey number worn in this game.
playerStringPlayer name as SIHF prints it, last name first (e.g., "Dahlbeck Klas").
player_positionStringPosition, German whatever the language (e.g., "Verteidiger").
goalsInt64Goals scored by the player.
assistsInt64Assists (primary + secondary).
assists1Int64Primary assists.
assists2Int64Secondary assists.
pointsInt64Points (goals + assists).
pim_totalInt64Penalty minutes.
plus_minusInt64Plus-minus: even-strength and shorthanded goals for, minus against, while on ice.
shots_on_goalInt64Shots on goal taken by the player.
sog_missedInt64Shots that missed the net.
sog_postInt64Shots off the post or crossbar.
blockingsInt64Opponent shots blocked by the player.
faceoffs_wonInt64Faceoffs won by the player.
faceoffs_lostInt64Faceoffs lost by the player.
faceoffs_percentFloat64Faceoff win percentage, 0-100; null with no faceoffs.
time_on_iceStringIce time, "mm:ss".
time_on_ice_ppStringPower-play ice time, "mm:ss".
time_on_ice_pkStringPenalty-kill ice time, "mm:ss".
row_typeString"data" per player, "total" for the side's total row.
player_idInt64SIHF licence number of the player (Int64 join key), resolved from the game's roster.

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. SIHF answered 404 (unknown game), or it ignored a requested season / league / phase and served another one.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

sihf_game_player_stats(game_id=20261105000325)

sihf_game_goalie_stats​

Goaltender box score of one game, both sides.

Endpoint URL: GET https://data.sihf.ch/statistic/api/cms/gameoverview

Valid URL: https://data.sihf.ch/statistic/api/cms/gameoverview?alias=gameDetail&searchQuery=20261105000325&language=en

API ParameterPythonPatternRequiredNullableDescription
searchQuerygame_idYRequired. SIHF game id (game_id in sihf_results), e.g. 20261105000325.
languagelanguageYResponse language. Only part of the body is translated: status, position and penalty names stay German.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
game_idInt64SIHF game id (Int64 join key; the details link of sihf_results, the searchQuery of the game wrappers).
team_sideStringSide of the game the row belongs to: "home" or "away".
team_idInt64SIHF team id of the row's side.
team_nameStringTeam name of the row's side.
player_numberInt64Jersey number worn in this game.
playerStringPlayer name as SIHF prints it, last name first (e.g., "Dahlbeck Klas").
goals_againstInt64Goals allowed by the goaltender.
savesInt64Shots on goal saved by the goaltender.
shots_againstInt64Shots on goal faced.
saves_percentageFloat64Save percentage on a 0-100 scale (91.25 = .9125).
seconds_playedStringIce time as "mm:ss" (a string, despite the upstream name). Minutes are not capped at 59: an overtime game reads "65:00", a season total "3615:02".
goals_against_averageFloat64Goals against per 60 minutes in this game.
penalty_in_minutesInt64Penalty minutes.
row_typeString"data" for every row: a game goalie box has no summary rows.
player_idInt64SIHF licence number of the player (Int64 join key), resolved from the game's roster.

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. SIHF answered 404 (unknown game), or it ignored a requested season / league / phase and served another one.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

sihf_game_goalie_stats(game_id=20261105000325)

sihf_game_team_stats​

Team stats of one game: shots by period, faceoffs by zone, penalty minutes, power play and penalty kill.

Endpoint URL: GET https://data.sihf.ch/statistic/api/cms/gameoverview

Valid URL: https://data.sihf.ch/statistic/api/cms/gameoverview?alias=gameDetail&searchQuery=20261105000325&language=en

API ParameterPythonPatternRequiredNullableDescription
searchQuerygame_idYRequired. SIHF game id (game_id in sihf_results), e.g. 20261105000325.
languagelanguageYResponse language. Only part of the body is translated: status, position and penalty names stay German.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
game_idInt64SIHF game id (Int64 join key; the details link of sihf_results, the searchQuery of the game wrappers).
statisticStringStatistic label as SIHF prints it (e.g., "SOG Total", "FO% 1P", "PPT").
home_valueStringHome team's value, as a string (counts, percentages and mm:ss times share the column).
away_valueStringAway team's value, as a string.

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. SIHF answered 404 (unknown game), or it ignored a requested season / league / phase and served another one.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

sihf_game_team_stats(game_id=20261105000325)

sihf_game_lineups​

Lineups of one game by unit and slot, plus the absentees.

Endpoint URL: GET https://data.sihf.ch/statistic/api/cms/gameoverview

Valid URL: https://data.sihf.ch/statistic/api/cms/gameoverview?alias=gameDetail&searchQuery=20261105000325&language=en

API ParameterPythonPatternRequiredNullableDescription
searchQuerygame_idYRequired. SIHF game id (game_id in sihf_results), e.g. 20261105000325.
languagelanguageYResponse language. Only part of the body is translated: status, position and penalty names stay German.

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
game_idInt64SIHF game id (Int64 join key; the details link of sihf_results, the searchQuery of the game wrappers).
team_sideStringSide of the game the row belongs to: "home" or "away".
team_idInt64SIHF team id (Int64 join key).
unitStringLineup unit: "goalkeeper", "defense_left" / "_right", "forward_left" / "_center" / "_right", "other"; null for an absentee.
slotInt641-based position in SIHF's listing of the unit.
player_idInt64SIHF licence number of the player (Int64 join key), resolved from the game's roster.
player_nameStringPlayer name from the game's roster, last name first.
player_jerseyInt64Jersey number from the game's roster.
is_captainBooleanWhether the lineup tags the player as captain.
is_first_goalkeeperBooleanWhether the lineup tags the player as the starting goaltender.
absence_codeStringAbsence code for an absentee ("SU", "IN", "AB").
absence_reasonStringAbsence reason, German (e.g., "Überzählig", "Verletzt", "Abwesend").

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. SIHF answered 404 (unknown game), or it ignored a requested season / league / phase and served another one.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.

Example​

sihf_game_lineups(game_id=20261105000325)