Skip to main content
GET
/
games
/
current
Live Games
curl --request GET \
  --url https://v1.hockey.sportsapipro.com/games/current \
  --header 'x-api-key: <api-key>'
{
  "games": [
    {
      "id": 123,
      "statusText": "<string>",
      "statusGroup": 123,
      "homeCompetitor": {
        "id": 123,
        "name": "<string>",
        "score": 123,
        "imageUrl": "<string>"
      },
      "awayCompetitor": {
        "id": 123,
        "name": "<string>",
        "score": 123,
        "imageUrl": "<string>"
      },
      "competition": {
        "id": 123,
        "name": "<string>",
        "country": {
          "id": 123,
          "name": "<string>"
        },
        "hasStandings": true
      },
      "startTime": "2023-11-07T05:31:56Z"
    }
  ],
  "lastUpdateId": 123
}

Overview

Returns all currently live hockey games with real-time scores updated every ~5 seconds.

Code Examples

curl -X GET "https://v1.hockey.sportsapipro.com/games/current" \
  -H "x-api-key: YOUR_API_KEY"

Polling for Live Updates

Use lastUpdateId for efficient polling that only returns changes:
let lastUpdateId = null;

async function pollLiveGames() {
  const url = lastUpdateId 
    ? `https://v1.hockey.sportsapipro.com/games/current?lastUpdateId=${lastUpdateId}`
    : 'https://v1.hockey.sportsapipro.com/games/current';
  
  const response = await fetch(url, {
    headers: { 'x-api-key': 'YOUR_API_KEY' }
  });
  const data = await response.json();
  
  if (data.lastUpdateId) lastUpdateId = data.lastUpdateId;
  return data.games;
}

// Poll every 5 seconds
setInterval(pollLiveGames, 5000);
Filter by competitions=55 to get only NHL games.

Authorizations

x-api-key
string
header
required

Your SportsAPI Pro API key

Query Parameters

competitions
integer

Filter by competition ID (e.g., 55 for NHL)

Example:

55

lastUpdateId
integer

For efficient polling - returns only updates since this ID

Response

200 - application/json

Live games retrieved successfully

games
object[]
lastUpdateId
integer

Use for subsequent polling requests