Today

Blog / Guides

NHL stats API, free WAR and numbers you can check

Advanced NHL stats to build with: an open API and Python client, free WAR and RAPM, free CSV files and an xG model whose tests you can read.

onice is an independent, unofficial NHL stats site with one aim: to give you more than a table to look at. Every table is also an API, so you can take the deep numbers into your own app, bot or notebook, and you can check how good they are.

Why onice

Build with the onice API

Most hockey stats sites are made to be read. onice is made to be built on too: what you see in a table is one request away as JSON.

curl -H "X-API-Key: YOUR_KEY" "https://onice.dev/api/v1/tables/skaters?seasons=20262027&sit=5v5&limit=20"

Or in Python, after pip install onice:

import onice

client = onice.Client("YOUR_KEY")
client.find_player("mcdavid")
page = client.skaters(seasons="20262027", sit="5v5", sort="xgf_pct", limit=20)
page.data[0]

What you can ask for

What it is good for: a fantasy or Discord bot, a dashboard, a model of your own, a newsletter that updates its own tables, or an AI assistant that answers with real numbers (uvx onice-mcp).

How it works

Get a free key, read the documentation or compare the plans.

What WAR is made of

What WAR is made of: eight skaters of 2025-26

Wins above replacement (WAR) on onice is a sum you can open: even strength, power play, penalty kill, finishing and penalties, on top of the gap between an average and a replacement player.

1. Every number says how it is made

The Methodology page has the whole chain: where the NHL data comes from, how shifts become stints, how every expected goals (xG) value is calculated, how the score and venue adjustment follows the method of Micah McCurdy, how RAPM, GAR and WAR are built, and what each model does not know.

2. The checks are public

We do not only say that the numbers are right. We show how we test them. The figures about the data and the xG model are counted from the database every day (last count: 27 November 2026).

Against the NHL. The personal totals of each game are compared with the official box score, and season totals with the season reports of the NHL. This check was made in the autumn of 2026 and is repeated after big changes of the data:

NumberResult
Goals, hits, blocks, giveaways, takeaways100% of players exactly equal
Shots on goal98.6% and 96.9% of players exactly equal (2023-24, 2025-26)
Penalty minutes98.4% and 99.6% of players exactly equal
5-on-5 shot attempts for (on ice)median error 0.77%

The xG model on games it never saw. We train a copy without the newest season that has enough games and test it on that season. On 2026-27, so far, that is 33,335 attempts and 2,514 goals, and the copy expected 2,492. The AUC is 0.784, and the log loss is 0.2262, 15.4% better than guessing the average rate (0.2674).

Calibration of the xG model

Calibration by ten equal groups of shots, from the least to the most dangerous (predicted against actual share of goals):

GroupPredictedActual
10.5%0.3%
21.1%1.1%
31.8%1.9%
42.7%3.1%
53.9%4.2%
65.6%5.5%
77.6%7.7%
810.2%10.4%
914.2%14.5%
1027.3%26.6%

Season by season. The first row below is the season being played. For every finished season the xG adds up to the goals scored: the ratio of xG to goals is 1.00 in each of them. This is how the model is fitted, so it shows that the totals are honest, and the test above shows how well it predicts.

SeasonAttemptsGoalsxGxG / goalsModel learned from it
2026-2745,5002,5142,4430.97yes
2025-26163,0218,5728,5721.00yes
2024-25167,0508,4358,4351.00no
2023-24170,6498,5908,5901.00no
2022-23163,7718,8018,8011.00no
2021-22159,8278,7128,7121.00no
2020-21103,8685,4915,4911.00no
2019-20138,5687,1577,1571.00no
2018-19156,8358,0598,0591.00no
2017-18159,9417,9437,9431.00no
2016-17148,9447,1507,1501.00no
2015-16147,4497,0437,0431.00no
2014-15148,2106,9966,9961.00no
2013-14148,5357,0907,0901.00no
2012-1389,4344,2514,2511.00no
2011-12146,2536,9616,9611.00no
2010-11149,4047,2207,2201.00no

The three small models. The same inputs feed models for rebounds, freezes and misses. Their tests are published too, and they are weaker than the xG model, so the page says to read those columns as rough: rebound AUC 0.645, freeze 0.628, miss 0.610.

3. The xG models side by side

There is no single "expected goals". Each site makes its own model, and the differences matter when you compare numbers. This is how the models are described by the sites themselves (sources below the table). Each site tests on different games, so their quality figures are not compared here.

SiteKind of modelShots countedWhat is published about the qualityHow to get the numbers
oniceGradient boosting, 50 inputs, every input listedUnblocked attemptsAUC, log loss and calibration by ten groups on a held-out season and the season totals, counted every day, and a check against the NHLTables, charts, free CSV files, a free API, a Python package and an AI assistant connection
MoneyPuckGradient boosting, rebuilt for 2026-27Unblocked attempts (blocked ones count as 0 xG)AUC by seasonTables and free data files for non-commercial use
HockeyStats.comGradient boosting (XGBoost), four models by strength stateUnblocked attemptsAUC by strength state, calibration targetTables, part of them by subscription
HockeyViz"Magnus 9" (xG, shooting and goaltending models)Shots with the setup of the shotThe model write-upCharts and tables, part of them by subscription
Evolving-HockeyXGBoostUnblocked attempts (Fenwick)A public paperTables by subscription

Where onice stands out is what surrounds the model: it is written down input by input, its tests are published, and the same numbers come as a table, a chart, a file and an API.

Sources: the About and Data pages of MoneyPuck (moneypuck.com/about.htm, moneypuck.com/data.htm), the methodology pages of HockeyStats (hockeystats.com/methodology/expected-goals), the model pages of HockeyViz (hockeyviz.com/txt/xg9) and the glossary of Evolving-Hockey, read on 25 November 2026.

4. Take the numbers with you

5. See it on real data

Four things onice does, with real numbers from the site (regular season 2025-26, taken on 27 November 2026).

With and without: how much does a pair really matter?

In the Lines tool you pick a team and up to five of its players and see how the team does with all of them on the ice, with each one without the others, and with none of them. Edmonton at 5-on-5:

Edmonton with and without McDavid and Draisaitl

On the iceMinutesExpected goals share (xGF%)Goals for - against
McDavid and Draisaitl together31864.1%18 - 16
McDavid without Draisaitl1,07054.4%58 - 52
Draisaitl without McDavid72351.4%43 - 34
Neither of them1,98245.6%55 - 86

Together they created far better chances than the opponent, McDavid alone still had the better of it, and the team was outplayed when neither was on the ice. The first row also has the smallest sample (318 minutes), and its goals (18 for, 16 against) are much closer to even than its expected goals (22.1 for, 12.4 against). That gap is why the page shows both.

Luck and regression: who ran hot or cold?

Goals tell you what happened. Expected goals tell you what the chances were worth. The luck page lists the difference for shooters, teams and goalies. Morgan Geekie scored 39 goals from chances worth 24.1, Anders Lee 19 from chances worth 28.5.

Goals above and below expected

A large gap is a reason to look closer, not a promise about next season. Some shooters finish better than the model expects year after year.

Shift performance: how does a shift go, second by second?

The tool shows a player's team by the second of his shift: expected goals for and against per 60 minutes, next to his teammates at the same position and the league. Here is Connor McDavid.

How a shift of Connor McDavid goes, second by second

Power play and penalty kill in WAR

The Skaters table breaks GAR into its parts. Connor McDavid had 25.5 GAR (about 4.1 wins), 5.4 of it from the power play. Miro Heiskanen added value on both special teams: 1.7 goals on the power play and 1.0 on the penalty kill, next to 3.5 from even-strength defense.

And more: NHL EDGE (skating speed, shot speed, zone time) next to the on-ice numbers, RAPM, QoT and QoC, GAR and WAR with the method written down, Compare players, and fantasy tools (off-nights in the calendar, risers and fallers, buy and sell lists tested on past seasons, a trade check).

Try it

Start with the team tables, open a player, download the data, or read the Glossary for what each column means. If you find a number that looks wrong, write to us: the checks above get better with every pair of eyes.