NAV
shell javascript python

NHL API

Welcome to the BALLDONTLIE NHL API, the best HOCKEY API on the planet. This API contains comprehensive NHL data. An API key is required. You can obtain an API key by creating a free account on our website. Read the authentication section to learn how to use the API key.

Take a look at our other APIs:

Join us on discord.

AI-Powered Integration

Using the OpenAPI Specification with AI

Our complete OpenAPI specification allows AI assistants to automatically understand and interact with our API. Simply share the spec URL with your AI assistant and describe what you want to build—the AI will handle the technical implementation.

Getting Started with AI:

  1. Copy this URL: https://www.balldontlie.io/openapi.yml
  2. Share it with your preferred AI assistant (ChatGPT, Claude, Gemini, etc.)
  3. Tell the AI what you want to build (e.g., "Create a dashboard showing tonight's NHL games")
  4. The AI will read the OpenAPI spec and write the code for you

Example prompts to try:

This makes it incredibly easy for non-technical users, analysts, and researchers to leverage our sports data without needing to learn programming from scratch.

Account Tiers

There are three different account tiers which provide you access to different types of data. Visit our website to create an account for free.

Paid tiers do not apply across sports. The tier you purchase for NHL will not automatically be applied to other sports. You can purchase the ALL-ACCESS ($159.99/mo) tier to get access to every endpoint for every sport.

Read the table below to see the breakdown.

Endpoint Free ALL-STAR GOAT
Teams Yes Yes Yes
Players Yes Yes Yes
Games No Yes Yes
Standings No Yes Yes
Box Scores No Yes Yes
Player Season Stats No No Yes
Team Season Stats No No Yes
Player Stats Leaders No No Yes
Team Stats Leaders No No Yes
Betting Odds No No Yes
Player Props No No Yes

The feature breakdown per tier is shown in the table below.

Tier Requests / Min $USD / mo.
GOAT 600 39.99
ALL-STAR 60 9.99
Free 5 0

Authentication

To authorize, use this code:

curl "api_endpoint_here" -H "Authorization: YOUR_API_KEY"
const axios = require("axios");

const response = await axios.get("api_endpoint_here", {
  headers: {
    Authorization: "YOUR_API_KEY",
  },
});

console.log(response.data);
import requests

response = requests.get(
    'api_endpoint_here',
    headers={'Authorization': 'YOUR_API_KEY'}
)

print(response.json())

Make sure to replace YOUR_API_KEY with your API key.

BALLDONTLIE uses API keys to allow access to the API. You can obtain an API key by creating a free account at our website

We expect the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: YOUR_API_KEY

Pagination

This API uses cursor based pagination rather than limit/offset. Endpoints that support pagination will send back responses with a meta key that looks like what is displayed on the right.

{
  "meta": {
    "next_cursor": 90,
    "per_page": 25
  }
}

You can use per_page to specify the maximum number of results. It defaults to 25 and doesn't allow values larger than 100.

You can use next_cursor to get the next page of results. Specify it in the request parameters like this: ?cursor=NEXT_CURSOR.

Errors

The API uses the following error codes:

Error Code Meaning
401 Unauthorized - You either need an API key or your account tier does not have access to the endpoint.
400 Bad Request -- The request is invalid. The request parameters are probably incorrect.
404 Not Found -- The specified resource could not be found.
406 Not Acceptable -- You requested a format that isn't json.
429 Too Many Requests -- You're rate limited.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

Teams

Get All Teams

curl "https://api.balldontlie.io/nhl/v1/teams" \
  -H "Authorization: YOUR_API_KEY"
const axios = require("axios");

const response = await axios.get("https://api.balldontlie.io/nhl/v1/teams", {
  headers: {
    Authorization: "YOUR_API_KEY",
  },
});

console.log(response.data);
import requests

response = requests.get(
    'https://api.balldontlie.io/nhl/v1/teams',
    headers={'Authorization': 'YOUR_API_KEY'}
)

print(response.json())

The above command returns JSON structured like this:

{
  "data": [
    {
        "id": 55,
        "full_name": "Philadelphia Flyers",
        "tricode": "PHI",
        "conference_name": "Eastern",
        "division_name": "Metropolitan"
    },
    {
        "id": 56,
        "full_name": "Anaheim Ducks",
        "tricode": "ANA",
        "conference_name": "Western",
        "division_name": "Pacific"
    },
    {
        "id": 57,
        "full_name": "Seattle Kraken",
        "tricode": "SEA",
        "conference_name": "Western",
        "division_name": "Pacific"
    },
    ...
  ]
}

This endpoint retrieves all teams.

HTTP Request

GET https://api.balldontlie.io/nhl/v1/teams

Query Parameters

Parameter Required Description
conference false Filter by conference name
division false Filter by division name

Get a Specific Team

curl "https://api.balldontlie.io/nhl/v1/teams/13" \
  -H "Authorization: YOUR_API_KEY"
const axios = require("axios");

const response = await axios.get(
  "https://api.balldontlie.io/nhl/v1/teams/13",
  {
    headers: {
      Authorization: "YOUR_API_KEY",
    },
  }
);

console.log(response.data);
import requests

response = requests.get(
    'https://api.balldontlie.io/nhl/v1/teams/13',
    headers={'Authorization': 'YOUR_API_KEY'}
)

print(response.json())

The above command returns JSON structured like this:

{
  "data": {
    "id": 13,
    "full_name": "San Jose Sharks",
    "tricode": "SJS",
    "conference_name": "Western",
    "division_name": "Pacific"
  }
}

This endpoint retrieves a specific team.

HTTP Request

GET https://api.balldontlie.io/nhl/v1/teams/:id

URL Parameters

Parameter Description
id Team ID

Team Season Stats

Get Season Stats for a Team

curl "https://api.balldontlie.io/nhl/v1/teams/61/season_stats?season=2024" \
  -H "Authorization: YOUR_API_KEY"
const axios = require("axios");

const response = await axios.get(
  "https://api.balldontlie.io/nhl/v1/teams/61/season_stats",
  {
    params: {
      season: 2024,
    },
    headers: {
      Authorization: "YOUR_API_KEY",
    },
  }
);

console.log(response.data);
import requests

response = requests.get(
    'https://api.balldontlie.io/nhl/v1/teams/61/season_stats',
    params={'season': 2024},
    headers={'Authorization': 'YOUR_API_KEY'}
)

print(response.json())

The above command returns JSON structured like this:

{
  "data": [
    {
      "value": 39,
      "name": "wins"
    },
    {
      "value": 36,
      "name": "losses"
    },
    {
      "value": 7,
      "name": "ot_losses"
    },
    {
      "value": 85,
      "name": "points"
    },
    {
      "value": 0.51829,
      "name": "points_pct"
    },
    {
      "value": 255,
      "name": "goals_for"
    },
    {
      "value": 82,
      "name": "games_played"
    },
    {
      "value": 255,
      "name": "goals_against"
    },
    {
      "value": 0,
      "name": "goal_differential"
    },
    {
      "value": 3.10975,
      "name": "goals_for_per_game"
    },
    {
      "value": 3.10975,
      "name": "goals_against_per_game"
    },
    {
      "value": 0.17619,
      "name": "power_play_percentage"
    },
    {
      "value": 0.803348,
      "name": "penalty_kill_percentage"
    },
    {
      "value": 28.58536,
      "name": "shots_for_per_game"
    },
    {
      "value": 29.89024,
      "name": "shots_against_per_game"
    },
    {
      "value": 0.535706,
      "name": "faceoff_win_percentage"
    }
  ]
}

This endpoint retrieves season statistics for a specific team.

HTTP Request

GET https://api.balldontlie.io/nhl/v1/teams/:id/season_stats

URL Parameters

Parameter Description
id Team ID

Query Parameters

Parameter Required Description
season true Returns stats for this season
postseason false If true, return postseason stats

Team Stats Leaders

Get Leaders for Team Stats

curl "https://api.balldontlie.io/nhl/v1/team_stats/leaders?season=2024&type=goals_for" \
  -H "Authorization: YOUR_API_KEY"
const axios = require("axios");

const response = await axios.get(
  "https://api.balldontlie.io/nhl/v1/team_stats/leaders",
  {
    params: {
      season: 2024,
      type: "goals_for",
    },
    headers: {
      Authorization: "YOUR_API_KEY",
    },
  }
);

console.log(response.data);
import requests

response = requests.get(
    'https://api.balldontlie.io/nhl/v1/team_stats/leaders',
    params={'season': 2024, 'type': 'goals_for'},
    headers={'Authorization': 'YOUR_API_KEY'}
)

print(response.json())

The above command returns JSON structured like this:

{
  "data": [
    {
        "team": {
            "id": 21,
            "full_name": "Winnipeg Jets",
            "tricode": "WPG",
            "conference_name": "Western",
            "division_name": "Central"
        },
        "name": "points",
        "value": 116,
        "season": 2024,
        "postseason": false
    },
    {
        "team": {
            "id": 36,
            "full_name": "Washington Capitals",
            "tricode": "WSH",
            "conference_name": "Eastern",
            "division_name": "Metropolitan"
        },
        "name": "points",
        "value": 111,
        "season": 2024,
        "postseason": false
    },
    ...
  ]
}

This endpoint retrieves team statistical leaders.

HTTP Request

GET https://api.balldontlie.io/nhl/v1/team_stats/leaders

Query Parameters

Parameter Required Description
season true Returns leaders for this season
type true The stat type to get leaders for
postseason false If true, return postseason leaders

Available Stat Types

The type parameter must be one of:

faceoff_win_percentage, shots_for_per_game, penalty_kill_percentage, goals_against_per_game, games_played, goals_for_per_game, goals_against, points_pct, points, power_play_percentage, shots_against_per_game, goals_for, wins, goal_differential, ot_losses, losses

Players

Get All Players

curl "https://api.balldontlie.io/nhl/v1/players?team_ids[]=61&seasons[]=2024" \
  -H "Authorization: YOUR_API_KEY"
const axios = require("axios");

const response = await axios.get(
  "https://api.balldontlie.io/nhl/v1/players",
  {
    params: {
      team_ids: [61],
      seasons: [2024],
    },
    headers: {
      Authorization: "YOUR_API_KEY",
    },
  }
);

console.log(response.data);
import requests

response = requests.get(
    'https://api.balldontlie.io/nhl/v1/players',
    params={'team_ids[]': 61, 'seasons[]': 2024},
    headers={'Authorization': 'YOUR_API_KEY'}
)

print(response.json())

The above command returns JSON structured like this:

{
  "data": [
      {
          "id": 13,
          "first_name": "Jonathan",
          "last_name": "Quick",
          "full_name": "Jonathan Quick",
          "position_code": "G",
          "shoots_catches": "L",
          "height_in_inches": 73,
          "weight_in_pounds": 220,
          "birth_date": "1986-01-20",
          "birth_place": "Milford, CT, USA",
          "teams": [
              {
                  "id": 61,
                  "full_name": "New York Rangers",
                  "tricode": "NYR",
                  "conference_name": "Eastern",
                  "division_name": "Metropolitan",
                  "season": 2024
              }
          ]
      },
      {
          "id": 71,
          "first_name": "Calvin",
          "last_name": "de Haan",
          "full_name": "Calvin de Haan",
          "position_code": "D",
          "shoots_catches": "L",
          "height_in_inches": 73,
          "weight_in_pounds": 192,
          "birth_date": "1991-05-08",
          "birth_place": "Carp, ON, CAN",
          "teams": [
              {
                  "id": 61,
                  "full_name": "New York Rangers",
                  "tricode": "NYR",
                  "conference_name": "Eastern",
                  "division_name": "Metropolitan",
                  "season": 2024
              }
          ]
      },
      ...
  ],
  "meta": {
    "next_cursor": null,
    "per_page": 25
  }
}

This endpoint retrieves all players based on the provided filters.

HTTP Request

GET https://api.balldontlie.io/nhl/v1/players

Query Parameters

Parameter Required Description
cursor false The cursor for pagination
per_page false Number of results per page (max 100)
name false Filter by player name
player_ids false Filter by player IDs
team_ids false Filter by team IDs
seasons false Filter by seasons

Player Season Stats

Get Player Season Stats

curl "https://api.balldontlie.io/nhl/v1/players/35/season_stats?season=2024" \
  -H "Authorization: YOUR_API_KEY"
const axios = require("axios");

const response = await axios.get(
  "https://api.balldontlie.io/nhl/v1/players/35/season_stats",
  {
    params: {
      season: 2024,
    },
    headers: {
      Authorization: "YOUR_API_KEY",
    },
  }
);

console.log(response.data);
import requests

response = requests.get(
    'https://api.balldontlie.io/nhl/v1/players/35/season_stats',
    params={'season': 2024},
    headers={'Authorization': 'YOUR_API_KEY'}
)

print(response.json())

The above command returns JSON structured like this:

{
  "data": [
    {
        "value": 30,
        "name": "assists"
    },
    {
        "value": 32,
        "name": "even_strength_goals"
    },
    {
        "value": 54,
        "name": "even_strength_points"
    },
    {
        "value": 0,
        "name": "faceoff_win_pct"
    },
    {
        "value": 75,
        "name": "games_played"
    },
    ...
  ]
}

This endpoint retrieves season statistics for a specific player.

HTTP Request

GET https://api.balldontlie.io/nhl/v1/players/:id/season_stats

URL Parameters

Parameter Description
id Player ID

Query Parameters

Parameter Required Description
season true Returns stats for this season
postseason false If true, return postseason stats

Player Stats Leaders

Get Leaders for Player Stats

curl "https://api.balldontlie.io/nhl/v1/player_stats/leaders?season=2024&type=points" \
  -H "Authorization: YOUR_API_KEY"
const axios = require("axios");

const response = await axios.get(
  "https://api.balldontlie.io/nhl/v1/player_stats/leaders",
  {
    params: {
      season: 2024,
      type: "points",
    },
    headers: {
      Authorization: "YOUR_API_KEY",
    },
  }
);

console.log(response.data);
import requests

response = requests.get(
    'https://api.balldontlie.io/nhl/v1/player_stats/leaders',
    params={'season': 2024, 'type': 'points'},
    headers={'Authorization': 'YOUR_API_KEY'}
)

print(response.json())

The above command returns JSON structured like this:

{
  "data": [
    {
        "player": {
            "id": 155,
            "first_name": "Nikita",
            "last_name": "Kucherov",
            "full_name": "Nikita Kucherov",
            "position_code": "R",
            "shoots_catches": "L",
            "height_in_inches": 72,
            "weight_in_pounds": 180,
            "birth_date": "1993-06-16",
            "birth_place": "Maykop, RUS",
        },
        "name": "points",
        "value": 121,
        "season": 2024,
        "postseason": false
    },
    {
        "player": {
            "id": 267,
            "first_name": "Nathan",
            "last_name": "MacKinnon",
            "full_name": "Nathan MacKinnon",
            "position_code": "C",
            "shoots_catches": "R",
            "height_in_inches": 72,
            "weight_in_pounds": 200,
            "birth_date": "1995-08-31",
            "birth_place": "Halifax, NS, CAN",
        },
        "name": "points",
        "value": 116,
        "season": 2024,
        "postseason": false
    },
    ...
  ]
}

This endpoint retrieves player statistical leaders.

HTTP Request

GET https://api.balldontlie.io/nhl/v1/player_stats/leaders

Query Parameters

Parameter Required Description
season true Returns leaders for this season
type true The stat type to get leaders for
postseason false If true, return postseason stats

Available Stat Types

The type parameter must be one of:

goals, power_play_points, game_winning_goals, plus_minus, even_strength_points, shots_against, goals_against_average, games_played, goals_against, shots, games_started, short_handed_goals, short_handed_points, faceoff_win_pct, assists, save_pct, power_play_goals, time_on_ice_per_game, wins, ot_losses, overtime_goals, penalty_minutes, saves, points, even_strength_goals, shutouts, shooting_pct, time_on_ice, points_per_game, losses

Games

Get All Games

curl "https://api.balldontlie.io/nhl/v1/games?seasons[]=2024&team_ids[]=61" \
  -H "Authorization: YOUR_API_KEY"
const axios = require("axios");

const response = await axios.get(
  "https://api.balldontlie.io/nhl/v1/games",
  {
    params: {
      seasons: [2024],
      team_ids: [61],
    },
    headers: {
      Authorization: "YOUR_API_KEY",
    },
  }
);

console.log(response.data);
import requests

response = requests.get(
    'https://api.balldontlie.io/nhl/v1/games',
    params={'seasons[]': 2024, 'team_ids[]': 61},
    headers={'Authorization': 'YOUR_API_KEY'}
)

print(response.json())

The above command returns JSON structured like this:

{
  "data": [
      {
          "id": 7,
          "season": 2024,
          "game_date": "2024-10-09",
          "start_time_utc": "2024-10-09T23:30:00.000Z",
          "home_team": {
              "id": 59,
              "full_name": "Pittsburgh Penguins",
              "tricode": "PIT",
              "conference_name": "Eastern",
              "division_name": "Metropolitan"
          },
          "away_team": {
              "id": 61,
              "full_name": "New York Rangers",
              "tricode": "NYR",
              "conference_name": "Eastern",
              "division_name": "Metropolitan"
          },
          "home_sog": 31,
          "away_sog": 40,
          "home_score": 0,
          "away_score": 6,
          "venue": "PPG Paints Arena",
          "game_state": "OFF",
          "period": 3,
          "postseason": false
      },
    ...
  ],
  "meta": {
    "next_cursor": null,
    "per_page": 25
  }
}

This endpoint retrieves all games based on the provided filters.

HTTP Request

GET https://api.balldontlie.io/nhl/v1/games

Query Parameters

Parameter Required Description
cursor false The cursor for pagination
per_page false Number of results per page (max 100)
team_ids false Filter by team IDs
dates false Filter by specific dates (YYYY-MM-DD)
seasons false Filter by seasons
postseason false Filter by postseason status
game_ids false Filter by specific game IDs

Standings

Get Team Standings

curl "https://api.balldontlie.io/nhl/v1/standings?season=2024&division=Atlantic" \
  -H "Authorization: YOUR_API_KEY"
const axios = require("axios");

const response = await axios.get(
  "https://api.balldontlie.io/nhl/v1/standings",
  {
    params: {
      season: 2024,
      division: "Atlantic",
    },
    headers: {
      Authorization: "YOUR_API_KEY",
    },
  }
);

console.log(response.data);
import requests

response = requests.get(
    'https://api.balldontlie.io/nhl/v1/standings',
    params={'season': 2024, 'division': 'Atlantic'},
    headers={'Authorization': 'YOUR_API_KEY'}
)

print(response.json())

The above command returns JSON structured like this:

{
  "data": [
      {
          "team": {
              "id": 46,
              "full_name": "Toronto Maple Leafs",
              "tricode": "TOR",
              "conference_name": "Eastern",
              "division_name": "Atlantic"
          },
          "season": 2024,
          "conference_name": "Eastern",
          "division_name": "Atlantic",
          "games_played": 82,
          "points": 108,
          "regulation_wins": 41,
          "regulation_plus_ot_wins": 51,
          "wins": 52,
          "losses": 26,
          "ot_losses": 4,
          "points_pctg": 0.658537,
          "goals_for": 268,
          "goals_against": 231,
          "goal_differential": 37,
          "home_record": "27-13-1",
          "road_record": "25-13-3",
          "streak": "W5"
      },
      {
          "team": {
              "id": 22,
              "full_name": "Tampa Bay Lightning",
              "tricode": "TBL",
              "conference_name": "Eastern",
              "division_name": "Atlantic"
          },
          "season": 2024,
          "conference_name": "Eastern",
          "division_name": "Atlantic",
          "games_played": 82,
          "points": 102,
          "regulation_wins": 41,
          "regulation_plus_ot_wins": 45,
          "wins": 47,
          "losses": 27,
          "ot_losses": 8,
          "points_pctg": 0.621951,
          "goals_for": 294,
          "goals_against": 219,
          "goal_differential": 75,
          "home_record": "29-8-4",
          "road_record": "18-19-4",
          "streak": "L1"
      },
    ...
  ]
}

This endpoint retrieves team standings.

HTTP Request

GET https://api.balldontlie.io/nhl/v1/standings

Query Parameters

Parameter Required Description
season false Filter by season
conference false Filter by conference name
division false Filter by division name

Box Scores

Get Box Scores

curl "https://api.balldontlie.io/nhl/v1/box_scores?game_ids[]=74509" \
  -H "Authorization: YOUR_API_KEY"
const axios = require("axios");

const response = await axios.get(
  "https://api.balldontlie.io/nhl/v1/box_scores",
  {
    params: {
      game_ids: [74509],
    },
    headers: {
      Authorization: "YOUR_API_KEY",
    },
  }
);

console.log(response.data);
import requests

response = requests.get(
    'https://api.balldontlie.io/nhl/v1/box_scores',
    params={'game_ids[]': 74509},
    headers={'Authorization': 'YOUR_API_KEY'}
)

print(response.json())

The above command returns JSON structured like this:

{
  "data": [
    {
        "player": {
            "id": 22,
            "first_name": "Jordan",
            "last_name": "Staal",
            "full_name": "Jordan Staal",
            "position_code": "C",
            "shoots_catches": "L",
            "height_in_inches": 76,
            "weight_in_pounds": 220,
            "birth_date": "1988-09-09",
            "birth_place": "Thunder Bay, ON, CAN",
        },
        "team": {
            "id": 18,
            "full_name": "Carolina Hurricanes",
            "tricode": "CAR",
            "conference_name": "Eastern",
            "division_name": "Metropolitan"
        },
        "game": {
            "id": 74509,
            "season": 2024,
            "game_date": "2025-05-20",
            "start_time_utc": "2025-05-21T00:00:00.000Z",
            "home_team": {
                "id": 18,
                "full_name": "Carolina Hurricanes",
                "tricode": "CAR",
                "conference_name": "Eastern",
                "division_name": "Metropolitan"
            },
            "away_team": {
                "id": 17,
                "full_name": "Florida Panthers",
                "tricode": "FLA",
                "conference_name": "Eastern",
                "division_name": "Atlantic"
            },
            "home_sog": 10,
            "away_sog": 7,
            "home_score": 1,
            "away_score": 2,
            "venue": "Lenovo Center",
            "game_state": "LIVE",
            "period": 1,
            "time_remaining": "06:30",
            "postseason": true
        },
        "position": "C",
        "goals": 0,
        "assists": 0,
        "points": 0,
        "plus_minus": -1,
        "penalty_minutes": 0,
        "power_play_goals": 0,
        "shots_on_goal": 0,
        "faceoff_winning_pctg": 0.625,
        "time_on_ice": "06:03",
        "blocked_shots": 0,
        "hits": 2,
        "shifts": 9,
        "giveaways": 0,
        "takeaways": 0,
        "sweater_number": 11
    },
      ...
  ],
  "meta": {
    "next_cursor": null,
    "per_page": 25
  }
}

This endpoint retrieves box scores for games.

HTTP Request

GET https://api.balldontlie.io/nhl/v1/box_scores

Query Parameters

Parameter Required Description
cursor false The cursor for pagination
per_page false Number of results per page (max 100)
season false Filter by season
game_ids false Filter by specific game IDs
team_ids false Filter by team IDs
player_ids false Filter by player IDs
dates false Filter by specific dates (YYYY-MM-DD)

Betting Odds

Get Betting Odds

curl "https://api.balldontlie.io/nhl/v1/odds?dates[]=2024-01-09" \
  -H "Authorization: YOUR_API_KEY"
const axios = require("axios");

const response = await axios.get("https://api.balldontlie.io/nhl/v1/odds", {
  params: {
    dates: ["2024-01-09"],
  },
  headers: {
    Authorization: "YOUR_API_KEY",
  },
});

console.log(response.data);
import requests

response = requests.get(
    'https://api.balldontlie.io/nhl/v1/odds',
    params={'dates': ['2024-01-09']},
    headers={'Authorization': 'YOUR_API_KEY'}
)

print(response.json())

The above command returns JSON structured like this:

{
  "data": [
    {
      "id": 12345,
      "game_id": 67890,
      "vendor": "draftkings",
      "spread_home_value": "-1.5",
      "spread_home_odds": 150,
      "spread_away_value": "1.5",
      "spread_away_odds": -180,
      "moneyline_home_odds": -200,
      "moneyline_away_odds": 170,
      "total_value": "6.5",
      "total_over_odds": -110,
      "total_under_odds": -110,
      "updated_at": "2024-01-09T12:00:00.000Z"
    },
    {
      "id": 12346,
      "game_id": 67890,
      "vendor": "fanduel",
      "spread_home_value": "-1.5",
      "spread_home_odds": 145,
      "spread_away_value": "1.5",
      "spread_away_odds": -175,
      "moneyline_home_odds": -195,
      "moneyline_away_odds": 165,
      "total_value": "6.0",
      "total_over_odds": -108,
      "total_under_odds": -112,
      "updated_at": "2024-01-09T12:00:00.000Z"
    }
  ],
  "meta": {
    "next_cursor": 12347,
    "per_page": 25
  }
}

This endpoint retrieves betting odds for NHL games. Either dates or game_ids must be provided.

Available Vendors:

HTTP Request

GET https://api.balldontlie.io/nhl/v1/odds

Query Parameters

Parameter Required Description
cursor false The cursor, used for pagination
per_page false The number of results per page. Default to 25. Max is 100
dates false Returns odds for games on these dates. This should be an array: ?dates[]=2024-01-09
game_ids false Returns odds for these game ids. This should be an array: ?game_ids[]=67890&game_ids[]=67891

Player Props

The Player Props API provides real-time player prop betting odds for NHL games. Player props allow betting on individual player performances such as goals, assists, points, shots on goal, saves, and more.

Market Types

The API supports two market types:

Get Player Props

curl "https://api.balldontlie.io/nhl/v1/odds/player_props?game_id=67890" \
  -H "Authorization: YOUR_API_KEY"
const axios = require("axios");

const response = await axios.get(
  "https://api.balldontlie.io/nhl/v1/odds/player_props",
  {
    params: {
      game_id: 67890,
    },
    headers: {
      Authorization: "YOUR_API_KEY",
    },
  }
);

console.log(response.data);
import requests

response = requests.get(
    'https://api.balldontlie.io/nhl/v1/odds/player_props',
    params={'game_id': 67890},
    headers={'Authorization': 'YOUR_API_KEY'}
)

print(response.json())

The above command returns JSON structured like this:

{
  "data": [
    {
      "id": 12345678,
      "game_id": 67890,
      "player_id": 123,
      "vendor": "draftkings",
      "prop_type": "points",
      "line_value": "1.5",
      "market": {
        "type": "over_under",
        "over_odds": 120,
        "under_odds": -145
      },
      "updated_at": "2024-01-09T12:00:00.000Z"
    },
    {
      "id": 87654321,
      "game_id": 67890,
      "player_id": 123,
      "vendor": "fanduel",
      "prop_type": "goals",
      "line_value": "1",
      "market": {
        "type": "milestone",
        "odds": 250
      },
      "updated_at": "2024-01-09T12:00:00.000Z"
    }
  ],
  "meta": {
    "next_cursor": 87654322,
    "per_page": 25
  }
}

This endpoint retrieves player prop betting odds for a specific NHL game. The game_id parameter is required.

Available Vendors:

HTTP Request

GET https://api.balldontlie.io/nhl/v1/odds/player_props

Query Parameters

Parameter Required Description
game_id true The game ID to retrieve player props for
player_id false Filter props for a specific player
prop_type false Filter by prop type. See supported prop types below.
vendors false Filter by specific sportsbook vendors. This should be an array: ?vendors[]=draftkings&vendors[]=fanduel
cursor false The cursor, used for pagination
per_page false The number of results per page. Default to 25. Max is 100

Supported Prop Types

The following prop_type values are supported:

Prop Type Description
anytime_goal Score a goal anytime in the game
anytime_goal_1p Score a goal in the 1st period
anytime_goal_2p Score a goal in the 2nd period
anytime_goal_3p Score a goal in the 3rd period
assists Total assists
first_goal Score the first goal of the game
first_goal_2p Score the first goal of the 2nd period
first_goal_3p Score the first goal of the 3rd period
goals Total goals scored
last_goal Score the last goal of the game
overtime_goal Score a goal in overtime
points Total points (goals + assists)
points_1p Points in the 1st period
points_2p Points in the 2nd period
points_3p Points in the 3rd period
power_play_points Power play points
saves Total saves (goalies)
second_goal Score the second goal of the game
shots_on_goal Total shots on goal
shots_on_goal_1p Shots on goal in the 1st period
shots_on_goal_2p Shots on goal in the 2nd period
shots_on_goal_3p Shots on goal in the 3rd period
third_goal Score the third goal of the game

Note: The actual prop types available may vary by game and sportsbook vendor.