Schedule / Vegas Golden Knights at Seattle Kraken
9:40 PM
Seattle Kraken
HomeVegas Golden Knights at Seattle Kraken
The game starts Tue 23 Mar at 9:40 PM ET. The score, goals, box score and play-by-play appear here once it begins.
Get this game with the SportAPI hockey API
Four requests build this page: /games/4678 for the score and team stats, /games/4678/players for the box score, /games/4678/events for goals and penalties, and /games/4678/plays for the play-by-play (add ?period=2 for one period). During a game, read them about once a minute.
curl -H "X-API-Key: YOUR_API_KEY" \
"https://sportapi.ai/api/hockey/games/4678"{ "data": {"id":4678,"start":"2027-03-24T01:40:00Z","status":"NS","decision":null,"period":null,"clock":null,"home":{"abbreviation":"SEA","score":null,"periods":[],"sog":null},"away":{"abbreviation":"VGK","score":null,"periods":[],"sog":null}}, "stats": {…} }<?php
$key = getenv('SPORTAPI_KEY');
$ctx = stream_context_create(['http' => ['header' => "X-API-Key: $key\r\n"]]);
$res = json_decode(file_get_contents('https://sportapi.ai/api/hockey/games/4678/events', false, $ctx), true);
foreach ($res['data'] as $e) {
if ($e['type'] !== 'goal') continue;
printf("P%d %s %s %d-%d\n", $e['period'], gmdate('i:s', $e['time_sec']), $e['player']['name'], $e['away_score'], $e['home_score']);
}Keep your API key on the server and never call the API from JavaScript in the browser. Save each answer for a few minutes too, so that page views don't use up your daily limit.
Endpoints, fields and status codes are in the API docs. A free key is on the hockey API page.