Skip to content

NHL Odds API ​

The Odds API covers NHL odds for live and upcoming games in a simple JSON API.

Not a developer? Current NHL odds can also be accessed in Excel or Google Sheets. For website owners, the odds widget brings bookmaker odds into websites with a simple HTML tag.

Features ​

  • NHL odds are covered for live and upcoming games.

  • Featured markets, including moneyline, spreads, totals are covered for several bookmakers. See the full list of bookmakers.

  • Additional markets including player props, period markets, and more are covered for most US bookmakers. See the full list of betting markets.

  • Odds are refreshed at regular intervals. More information on update intervals can be found here.

  • NHL scores are covered, with final scores available for games completed up to 3 days ago.

  • Current odds data and scores are available on all usage plans, including the free usage plan.

  • Historical NHL odds data is available on paid usage plans. Historical odds for featured markets (moneyline, spreads, totals) are available from mid-2020. Historical odds for other markets are available from May 2023. More information on historical odds data can be found here.

  • The API response includes deep links to bookmaker websites.

  • Rotation numbers are included in the API response.

Querying NHL Odds ​

Featured markets (moneyline, spreads and totals) can be queried using the odds endpoint. For additional markets including player props, use the event-odds endpoint.

Parameters

To query current NHL odds for featured markets, the following parameters need to be provided:

  • sport   In this case icehockey_nhl
  • regions   Regions of bookmakers to return, for example us
  • markets   For example, h2h for moneyline, spreads and totals
  • apiKey   Get a free API key

See the documentation for more options.

Example API Request

https://api.the-odds-api.com/v4/sports/icehockey_nhl/odds?regions=us&markets=h2h,spreads,totals&oddsFormat=american&apiKey=YOUR_API_KEY

Example API Response

The API will return live and upcoming NHL games, including start times, home and away teams, and odds from bookmakers for the specified regions and markets.

json
[{
    "id": "9e772482d5eda16bbc03e0e7b249ee1c",
    "sport_key": "icehockey_nhl",
    "sport_title": "NHL",
    "commence_time": "2025-01-20T18:00:00Z",
    "home_team": "Boston Bruins",
    "away_team": "San Jose Sharks",
    "bookmakers": [
    {
        "key": "betrivers",
        "title": "BetRivers",
        "last_update": "2025-01-20T12:04:30Z",
        "markets": [
        {
            "key": "h2h",
            "last_update": "2025-01-20T12:04:30Z",
            "outcomes": [
                {"name": "Boston Bruins", "price": -250},
                {"name": "San Jose Sharks", "price": 200}
            ]
        },
        {
            "key": "spreads",
            "last_update": "2025-01-20T12:04:30Z",
            "outcomes": [
                {"name": "Boston Bruins", "price": 102, "point": -1.5},
                {"name": "San Jose Sharks", "price": -124, "point": 1.5}
            ]
        },
        {
            "key": "totals",
            "last_update": "2025-01-20T12:04:30Z",
            "outcomes": [
                {"name": "Over", "price": 104, "point": 6.0},
                {"name": "Under", "price": -125, "point": 6.0}
            ]
        }
    ]},

The usage cost of the API call in this example is

usage cost = [number of markets] x [number of regions] = 3 x 1 = 3 credits

See the API documentation for details.

For ice hockey, the h2h market currently displays the market that is featured on each bookmaker's website (the market shown on a bookmaker's main events page). EU bookmakers typically feature regular time odds (includes draw), whilst US bookmakers typically feature the overtime odds (excludes draw).

Query Any NHL Markets ​

Any supported NHL markets can be queried one game at a time using the event-odds endpoint.

Parameters

To query current NHL odds for any market, including player props, period markets and more, the following parameters need to be provided:

  • sport   In this case icehockey_nhl
  • eventId   This example uses the id of Sharks @ Bruins (id 9e772...). A list of current event ids can be queried using the events endpoint.
  • regions   Regions of bookmakers to return, for example us
  • markets   For example h2h_p1 (1st period moneyline), player_shots_on_goal, player_goal_scorer_anytime
  • apiKey   Get a free API key

See the documentation for more options.

Milestone (X+) markets are captured using _alternate player market keys, for example player_shots_on_goal_alternate.

Example API Request

https://api.the-odds-api.com/v4/sports/icehockey_nhl/events/9e772482d5eda16bbc03e0e7b249ee1c/odds?regions=us&markets=h2h_p1,player_shots_on_goal,player_goal_scorer_anytime&oddsFormat=american&apiKey=YOUR_API_KEY

Example API Response

The response will contain the specified NHL game including odds from the specified bookmakers and markets.

json
{
    "id": "9e772482d5eda16bbc03e0e7b249ee1c",
    "sport_key": "icehockey_nhl",
    "sport_title": "NHL",
    "commence_time": "2025-01-20T18:00:00Z",
    "home_team": "Boston Bruins",
    "away_team": "San Jose Sharks",
    "bookmakers": [
      {
        "key": "betrivers",
        "title": "BetRivers",
        "last_update": "2025-01-20T12:04:30Z",
        "markets": [
          {
            "key": "h2h_p1",
            "last_update": "2025-01-20T12:04:59Z",
            "outcomes": [
              {"name": "Boston Bruins", "price": -225},
              {"name": "San Jose Sharks", "price": 170}
            ]
          },
          {
            "key": "player_goal_scorer_anytime",
            "last_update": "2025-01-20T12:04:59Z",
            "outcomes": [
              {"name": "Yes", "description": "Luke Kunin", "price": 575},
              {"name": "Yes", "description": "Elias Lindholm", "price": 205},
              {"name": "Yes", "description": "Macklin Celebrini", "price": 220},
              ...
            ]
          },
          {
            "key": "player_shots_on_goal",
            "last_update": "2025-01-20T12:04:59Z",
            "outcomes": [
              {"name": "Over", "description": "Pavel Zacha", "price": -165, "point": 1.5},
              {"name": "Under", "description": "Pavel Zacha", "price": 125, "point": 1.5},
              {"name": "Over", "description": "Elias Lindholm", "price": -177, "point": 1.5},
              {"name": "Under", "description": "Elias Lindholm", "price": 135, "point": 1.5},
              ...
            ]
         }
        ],
        ...

The usage cost of the API call in this example is

usage cost = [number of markets] x [number of regions] = 3 x 1 = 3 credits

If you only need featured markets (moneyline, spreads, totals), it will be more cost-efficient to query the odds endpoint since it will return multiple games.

See the API documentation for details.

Other Sports ​

See the full list of sports covered by The Odds API.

Stay Updated ​

Follow us on X.com or Bluesky to stay updated on new sports, bookmakers, markets and features.