The sports how-tos on the blog stop at an old announcement. NHL scores are a documented endpoint. One call returns the games for a date, including both clubs, the venue, and the game state.
👉 To access this endpoint, you must obtain an API key: https://steadyapi.com/register
Authentication
Every call uses a Bearer token from your SteadyAPI dashboard.
Documentation:
https://docs.steadyapi.com/#authenticating-requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
Scores for a date
Omit date to use the current day. Pass YYYY-MM-DD when you want another slate.
Endpoint: GET /v1/nhl/scores
Documentation:
https://docs.steadyapi.com/#hockey-nhl-GETapi-v1-nhl-scores
Parameters
date— optional date,YYYY-MM-DD. Defaults to the current day.
Request
GET https://api.steadyapi.com/v1/nhl/scores?date=2024-01-25
Authorization: Bearer YOUR_API_KEY
Python
import requests
url = "https://api.steadyapi.com/v1/nhl/scores"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.get(url, headers=headers)
response.raise_for_status()
body = response.json().get("body", {})
print(body.get("currentDate"))
for game in body.get("games", []):
away = game["awayTeam"]
home = game["homeTeam"]
print(
game.get("gameDate"),
away["abbrev"],
away["name"]["default"],
"at",
home["abbrev"],
home["name"]["default"],
game.get("gameState"),
game.get("venue", {}).get("default"),
)
Response fields
body.currentDate is the slate date. body.gameWeek lists nearby dates with date, dayAbbrev, and numberOfGames. Each item in body.games includes:
id— game idseasonandgameTypegameDateandstartTimeUTCgameState— schedule state, such asPREbefore puck dropvenue.default— arena nameawayTeam.abbrev,awayTeam.name.default,awayTeam.record, andawayTeam.logohomeTeam.abbrev,homeTeam.name.default,homeTeam.record, andhomeTeam.logogameCenterLink— game path
Practical use
Call the endpoint with no date for today's slate, or pass date when you are building a calendar. Team abbreviations in awayTeam.abbrev and homeTeam.abbrev match the abbreviations used by the other NHL routes, including standings.
Standings documentation:
https://docs.steadyapi.com/#hockey-nhl-GETapi-v1-nhl-standings
👉 Get your API key and pull NHL scores: https://steadyapi.com/register