How do I get an NHL goalie's save percentage by game in Python?
A goalie's game log for a season with shots against, saves, goals against and the decision, ready for a rolling save percentage.
Code verified November 18, 2026. One call to get_player_game_log, 5 credits.
The call
player_id is a number and comes from search_players. Season is the 8-digit id, 20252026 for 2025-26.
import requests
import pandas as pd
API_KEY = "YOUR_API_KEY"
resp = requests.post(
"https://mcp.puckapi.com/v1/get_player_game_log",
headers={"x-api-key": API_KEY},
json={
"player_id": 8478048,
"season": "20252026",
"game_type": "regular",
"limit": 100,
},
timeout=60,
)
resp.raise_for_status()
data = resp.json()["data"]
log = pd.DataFrame(data["games"]).sort_values("gameDate")
log["rolling10"] = log["saves"].rolling(10).sum() / log["shotsAgainst"].rolling(10).sum()
print(data["player"]["name"], len(log), "games")
print(log[["gameDate", "opponent", "shotsAgainst", "saves", "savePct", "rolling10"]].tail(10).round(3))
print("season save pct:", round(log["saves"].sum() / log["shotsAgainst"].sum(), 3))
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.
{
"player": {
"id": 8478048,
"name": "Igor Shesterkin",
"position": "G"
},
"games": [
{
"gameId": "2025020002",
"gameDate": "2025-10-07",
"team": "NYR",
"opponent": "PIT",
"homeAway": "home",
"decision": "loss",
"shotsAgainst": 29,
"saves": 28,
"goalsAgainst": 1,
"savePct": 0.9655,
"timeOnIce": 3600
},
{
"gameId": "2025020009",
"gameDate": "2025-10-09",
"team": "NYR",
"opponent": "BUF",
"homeAway": "away",
"decision": "win",
"shotsAgainst": 37,
"saves": 37,
"goalsAgainst": 0,
"savePct": 1,
"timeOnIce": 3600
},
"...49 more"
],
"count": 51,
"season": "20252026",
"game_type": "regular",
"next_offset": null
}The example player is Igor Shesterkin. The record against the line, market by market, is on the Igor Shesterkin prop history page.
What to do next
- get_goalie_stats (5 credits). Rank every goalie on save percentage, goals saved above expected or wins.
- get_game_detail (10 credits). Add the odds and which goalies started a given game.
More guides
Rather ask Claude? 28 free Claude skills call these endpoints for you.
Start with 500 free credits every month
No card. REST or MCP.