# NHL Hockey Stats API
> The National Hockey League as an API, from the official NHL Web API. Get the 32 clubs, live standings (wins, losses, OT losses, points, point pct, goals for/against, current streak, last-10 record, division/conference/wildcard rank), the schedule and final scores for any date, team rosters, player profiles with current-season and full career stats (goals, assists, points, plus-minus, save pct and more), and game box scores. Resolve teams by tricode (TOR) or name (Maple Leafs), and players by name (Connor McDavid) or NHL id. Perfect for building scoreboards and standings widgets, fantasy-hockey tools, stat dashboards, Discord/Slack bots, and sports-data apps. No key for the upstream, no accounts to manage.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/nhl-api/..."
```

## Pricing
- **Free** (Free) — 3,800 calls/Mo, 2 req/s
- **Starter** ($6/Mo) — 48,000 calls/Mo, 6 req/s
- **Pro** ($17/Mo) — 240,000 calls/Mo, 16 req/s
- **Mega** ($46/Mo) — 1,200,000 calls/Mo, 40 req/s

## Endpoints

### Teams

#### `GET /v1/teams` — The 32 NHL clubs

**Parameters:**
- `conference` (query, optional, string) — Eastern or Western Example: `Western`
- `division` (query, optional, string) — Atlantic|Metropolitan|Central|Pacific Example: `Pacific`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nhl-api/v1/teams?conference=Western&division=Pacific"
```

**Response:**
```json
{
    "data": {
        "count": 8,
        "teams": [
            {
                "abbr": "ANA",
                "name": "Anaheim Ducks",
                "division": "Pacific",
                "conference": "Western"
            },
            {
                "abbr": "CGY",
                "name": "Calgary Flames",
                "division": "Pacific",
                "conference": "Western"
            },
            {
                "abbr": "EDM",
                "name": "Edmonton Oilers",
                "division": "Pacific",
                "conference": "Western"
            },
            {
                "abbr": "LAK",
                "name": "Los Angeles Kings",
                "division": "Pacific",
                "conference": "Western"
            },
            {
                "abbr": "SEA",
                "name": "Seattle Kraken",
                "division": "Pacific",
                "conference": "Western"
            },
            {
                "abbr": "SJS",
                "name": "San Jose Sharks",
                "division": "Pacific",
                "conference": "Western"
            },
            {
                "abbr": "VAN",
                "name": "Vancouver Canucks",
                "division": "Pacific",
                "conference": "Western"
            },
            {
                "abbr": "VGK",
                "name": "Vegas Golden Knights",
                "division": "Pacific",
                "conference": "Western"
…(truncated, see openapi.json for full schema)
```

### Standings

#### `GET /v1/standings` — Current league standings

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nhl-api/v1/standings"
```

**Response:**
```json
{
    "data": {
        "as_of": "now",
        "count": 32,
        "teams": [
            {
                "team": {
                    "abbr": "COL",
                    "name": "Colorado Avalanche"
                },
                "wins": 55,
                "losses": 16,
                "points": 121,
                "streak": "W3",
                "last_10": "7-2-1",
                "division": "Central",
                "goal_diff": 99,
                "goals_for": 302,
                "ot_losses": 11,
                "point_pct": 0.737805,
                "conference": "Western",
                "league_rank": 1,
                "games_played": 82,
                "division_rank": 1,
                "goals_against": 203,
                "wildcard_rank": 0,
                "conference_rank": 1
            },
            {
                "team": {
                    "abbr": "CAR",
                    "name": "Carolina Hurricanes"
                },
                "wins": 53,
                "losses": 22,
                "points": 113,
                "streak": "W1",
                "last_10": "7-2-1",
                "division": "Metropolitan",
                "goal_diff": 56,
                "goals_for": 296,
                "ot_losses": 7,
                "point_pct": 0.689024,
                "conference": "Eastern",
                "league_rank": 2,
                "games_played": 82,
                "division_rank": 1,
                "goals_against": 240,
 
…(truncated, see openapi.json for full schema)
```

### Schedule

#### `GET /v1/schedule` — Games & scores on a date

**Parameters:**
- `date` (query, optional, string) — YYYY-MM-DD (default today) Example: `2025-04-15`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nhl-api/v1/schedule?date=2025-04-15"
```

**Response:**
```json
{
    "data": {
        "date": "2025-04-15",
        "count": 10,
        "games": [
            {
                "id": 2024021291,
                "away": {
                    "sog": 26,
                    "abbr": "NJD",
                    "name": "New Jersey Devils",
                    "score": 5
                },
                "home": {
                    "sog": 24,
                    "abbr": "BOS",
                    "name": "Boston Bruins",
                    "score": 4
                },
                "type": "regular",
                "state": "OFF",
                "venue": "TD Garden",
                "period": 4,
                "start_utc": "2025-04-15T23:00:00Z"
            },
            {
                "id": 2024021292,
                "away": {
                    "sog": 32,
                    "abbr": "TOR",
                    "name": "Toronto Maple Leafs",
                    "score": 4
                },
                "home": {
                    "sog": 35,
                    "abbr": "BUF",
                    "name": "Buffalo Sabres",
                    "score": 0
                },
                "type": "regular",
                "state": "OFF",
                "venue": "KeyBank Center",
                "period": 3,
                "start_utc": "2025-04-15T23:00:00Z"
            },
            {
                "id": 2024021293,
                "away": {
                    "sog": 16,
                    "abbr": "CHI",
            
…(truncated, see openapi.json for full schema)
```

### Rosters

#### `GET /v1/roster` — A team roster

**Parameters:**
- `team` (query, required, string) — Tricode or name Example: `TOR`
- `season` (query, optional, string) — 20242025 / 2024 / current Example: `20242025`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nhl-api/v1/roster?team=TOR&season=20242025"
```

**Response:**
```json
{
    "data": {
        "team": {
            "abbr": "TOR",
            "name": "Toronto Maple Leafs"
        },
        "count": 42,
        "season": "20242025",
        "players": [
            {
                "id": 8481720,
                "name": "Nick Abruzzese",
                "group": "forwards",
                "number": 26,
                "shoots": "L",
                "position": "C",
                "height_in": 71,
                "weight_lb": 183,
                "birth_country": "USA"
            },
            {
                "id": 8477503,
                "name": "Max Domi",
                "group": "forwards",
                "number": 11,
                "shoots": "L",
                "position": "C",
                "height_in": 70,
                "weight_lb": 209,
                "birth_country": "CAN"
            },
            {
                "id": 8482130,
                "name": "Roni Hirvonen",
                "group": "forwards",
                "number": 33,
                "shoots": "L",
                "position": "C",
                "height_in": 70,
                "weight_lb": 178,
                "birth_country": "FIN"
            },
            {
                "id": 8480995,
                "name": "Pontus Holmberg",
                "group": "forwards",
                "number": 29,
                "shoots": "L",
                "position": "R",
                "height_in": 72,
                "weight_lb": 201,
                "b
…(truncated, see openapi.json for full schema)
```

### Players

#### `GET /v1/player` — Player bio + season & career stats

**Parameters:**
- `id` (query, optional, string) — NHL player id Example: `8478402`
- `name` (query, optional, string) — Player name Example: `Connor McDavid`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nhl-api/v1/player?id=8478402&name=Connor+McDavid"
```

**Response:**
```json
{
    "data": {
        "player": {
            "id": 8478402,
            "name": "Connor McDavid",
            "team": {
                "abbr": "EDM",
                "name": "Edmonton Oilers"
            },
            "number": 97,
            "shoots": "L",
            "headshot": "https://assets.nhle.com/mugs/nhl/20252026/EDM/8478402.png",
            "position": "C",
            "height_in": 73,
            "is_active": true,
            "weight_lb": 194,
            "birth_city": "Richmond Hill",
            "birth_date": "1997-01-13",
            "career_stats": {
                "pim": 330,
                "goals": 409,
                "shots": 2713,
                "avgToi": "21:52",
                "points": 1220,
                "assists": 811,
                "otGoals": 17,
                "plusMinus": 186,
                "gamesPlayed": 794,
                "shootingPctg": 0.1507,
                "powerPlayGoals": 100,
                "powerPlayPoints": 418,
                "gameWinningGoals": 76,
                "shorthandedGoals": 9,
                "shorthandedPoints": 19,
                "faceoffWinningPctg": 0.4792
            },
            "season_stats": {
                "pim": 44,
                "goals": 48,
                "shots": 306,
                "points": 138,
                "assists": 90,
                "otGoals": 1,
                "plusMinus": 17,
                "gamesPlayed": 82,
                "shootingPctg": 0.156863,
             
…(truncated, see openapi.json for full schema)
```

### Games

#### `GET /v1/game` — Box score for a game

**Parameters:**
- `id` (query, required, string) — Game id (from /v1/schedule) Example: `2024021291`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nhl-api/v1/game?id=2024021291"
```

**Response:**
```json
{
    "data": {
        "id": 2024021291,
        "away": {
            "sog": 26,
            "abbr": "NJD",
            "name": "New Jersey Devils",
            "score": 5
        },
        "home": {
            "sog": 24,
            "abbr": "BOS",
            "name": "Boston Bruins",
            "score": 4
        },
        "type": "regular",
        "state": "OFF",
        "venue": "TD Garden",
        "period": 4,
        "start_utc": "2025-04-15T23:00:00Z",
        "period_type": "OT"
    },
    "meta": {
        "timestamp": "2026-06-01T00:04:10.343Z",
        "request_id": "2baf3a8d-183e-461b-8a6a-01a83d0a5acd"
    },
    "status": "ok",
    "message": "Game retrieved",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Usage notes

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/nhl-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "National Hockey League data. /v1/teams = the 32 clubs (filter conference=Eastern|Western, division=Atlantic|Metropolitan|Central|Pacific); /v1/standings = current standings (W-L-OT, points, pct, goals for/against, streak, last 10, division/conference rank); /v1/schedule?date=YYYY-MM-DD = games & scores (default today); /v1/roster?team=TOR&season=20242025 = a team's roster; /v1/player?name=Connor McDavid or id=8478402 = bio + current-season & career stats; /v1/game?id=2024021291 = box score by game id. Teams resolve by tricode (TOR) or name. Official data from the NHL.",
        "source": "NHL Web API (api-web.nhle.com) + player search (search.d3.nhle.com)",
        "endpoints": [
            "/v1/teams",
            "/v1/standings",
            "/v1/schedule",
            "/v1/roster",
            "/v1/player",
            "/v1/game",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T00:04:10.388Z",
        "request_id": "7224a05e-0e36-4965-9c02-5d12e55a0ce1"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/nhl-api
OpenAPI spec: https://www.oanor.com/api/nhl-api/openapi.json
