SportAPINHLGet SportAPI Key

NHL Teams

All 32 teams by conference and division. Open a team for its roster, results and next games.

Eastern Conference

Atlantic Division

Metropolitan Division

Western Conference

Central Division

Pacific Division

Get NHL teams with the SportAPI hockey API

The league request lists every team with its id, slug, abbreviation, conference and division. Team logos are served by the API at /teams/{id}/logo: download them once and store them on your own server.

Request
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://sportapi.ai/api/hockey/leagues/nhl"
Response (shortened)
{
    "data": {
        "id": 1,
        "current_season": "2026-27",
        "teams": [
            {
                "id": 1,
                "slug": "dallas-stars",
                "name": "Dallas Stars",
                "abbreviation": "DAL",
                "conference": "Western",
                "division": "Central"
            },
            "…"
        ]
    }
}
PHP
<?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/leagues/nhl', false, $ctx), true);

foreach ($res['data']['teams'] as $t) {
    echo $t['abbreviation'], ' ', $t['name'], ' (', $t['division'], ")\n";
}

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.