How do I get NHL standings in Python?
The NHL table for the current season: record, points, goal differential and 5v5 possession for all 32 teams, grouped by division in pandas.
Code verified November 18, 2026. One call to get_standings, 2 credits.
The call
season is the 8-digit id and defaults to the current one. Filter with conference or division. Pass league: "ahl" for the AHL, which has no possession columns.
import requests
import pandas as pd
API_KEY = "YOUR_API_KEY"
resp = requests.post(
"https://mcp.puckapi.com/v1/get_standings",
headers={"x-api-key": API_KEY},
json={},
timeout=60,
)
resp.raise_for_status()
data = resp.json()["data"]
table = pd.DataFrame(data["standings"])
print("as of", data["snapshot_date"], "-", len(table), "teams")
top = table.sort_values(["points", "goalDiff"], ascending=False).groupby("division").head(3)
cols = ["division", "teamAbbrev", "gamesPlayed", "wins", "losses", "otLosses", "points", "pointPct", "goalDiff"]
print(top.sort_values(["division", "points"], ascending=[True, False])[cols].round(3).to_string(index=False))
Replace YOUR_API_KEY with a key from your dashboard. Python needs requests and pandas (pip install requests pandas). JavaScript runs on Node 18 or newer, or in the browser.
Or use the official client: pip install puckapi
What comes back
The data object of the response, trimmed to the first rows. Every field is real output from the run above.
{
"standings": [
{
"teamAbbrev": "EDM",
"teamName": "Edmonton Oilers",
"conference": "Western",
"division": "Pacific",
"rank": 1,
"points": 37,
"gamesPlayed": 23,
"wins": 17,
"losses": 3,
"otLosses": 3,
"pointPct": 0.804348,
"goalDiff": 30,
"goalsForPerGame": 4,
"goalsAgainstPerGame": 2.7,
"corsiPct": 47.421585,
"fenwickPct": 46.797672,
"expectedGoalsFor": 37.651123,
"expectedGoalsAgainst": 43.98713,
"snapshotDate": "2026-11-18"
},
{
"teamAbbrev": "MIN",
"teamName": "Minnesota Wild",
"conference": "Western",
"division": "Central",
"rank": 2,
"points": 36,
"gamesPlayed": 23,
"wins": 16,
"losses": 3,
"otLosses": 4,
"pointPct": 0.782609,
"goalDiff": 32,
"goalsForPerGame": 3.61,
"goalsAgainstPerGame": 2.22,
"corsiPct": 49.92729,
"fenwickPct": 51.250847,
"expectedGoalsFor": 46.81856,
"expectedGoalsAgainst": 44.58994,
"snapshotDate": "2026-11-18"
},
"...30 more"
],
"snapshot_date": "2026-11-18",
"count": 32
}What to do next
- get_team_stats (5 credits). Goals, shots and special teams for one club.
- get_games (5 credits). The results behind each record, by team or date.
The data this uses
Every row above comes from NHL expected goals: team xG, Corsi and goalie GSAX. NHL expected goals since 2010-11: team 5-on-5 xGF and xGA with Corsi and Fenwick, and goalie GSAX, updated daily. REST or MCP, 500 free credits every month.
More guides
The same guide for other sports
Rather ask Claude? 31 free Claude skills call these endpoints for you.
Start with 500 free credits every month
No card. REST or MCP.