Sports Betting Odds: NBA, NFL, MLB & NHL Odds, Closing Lines avatar

Sports Betting Odds: NBA, NFL, MLB & NHL Odds, Closing Lines

Pricing

from $3.50 / 1,000 games

Go to Apify Store
Sports Betting Odds: NBA, NFL, MLB & NHL Odds, Closing Lines

Sports Betting Odds: NBA, NFL, MLB & NHL Odds, Closing Lines

Sports betting odds API for NBA odds, NFL odds, MLB odds and NHL odds: moneyline, spread and total from ~25 sportsbooks (DraftKings, FanDuel, BetMGM, bet365). Today's lines, opening and closing odds, line movement, no-vig consensus, graded bets (ATS, over/under). History since 2009.

Pricing

from $3.50 / 1,000 games

Rating

0.0

(0)

Developer

Min Maxxxer

Min Maxxxer

Maintained by Community

Actor stats

0

Bookmarked

49

Total users

9

Monthly active users

2 days ago

Last modified

Share

NBA, NFL, MLB & NHL Betting Odds: Historical & Closing Lines

💰 One price per complete game — every available sportsbook included ($0.005, less on paid plans). Press Start — the prefilled input returns this week's NBA games with current odds of ~25 sportsbooks in under a minute.

Sample output: NBA 2024/25 with fair moneylines, spread and total at the open and the close

Historical NBA, NFL, MLB and NHL odds API for backtesting, closing line value and your own odds database. One record per game with the opening and closing line of every bookmaker that priced it — about 25 per game today, including DraftKings, FanDuel, BetMGM, Fanatics and bet365 (fewer in older seasons) — the no-vig market consensus and, for finished games, the result of every bet.

Why this Actor

  • ✅ Odds history back to 2009 — NBA, NFL, MLB, NHL, WNBA, NCAA and hundreds of other basketball, American football, hockey and baseball leagues
  • ✅ Opening and closing lines of about 25 bookmakers per game — moneyline, spread (run line, puck line), total and 3-way
  • ✅ Bet results built in — against the spread (ATS), over/under, moneyline and 3-way, graded on the closing line and on each bookmaker's own line
  • ✅ No-vig consensus, line movement and the best price per side, with its edge against the rest of the market and any arbitrage
  • ✅ Stable IDs for games, teams and bookmakers — safe to build a database on
  • ✅ One price per game — all bookmakers, markets, consensus, results and statistics included

🆓 Free samples on Hugging Face — one row per game, consensus lines and graded bets: NBA 2025-26, NBA 2024-25, NFL 2025.

Three modes:

  • Recent games — every league of the chosen sports, from 7 days back to 7 days ahead (upcoming games with current prices). Choose nothing at all and you get the NBA, NFL, MLB and NHL only
  • Full seasons — complete seasons of the leagues you choose: regular season, play-offs, play-in, wild card, bowls
  • Date range — only the games between two dates, e.g. NBA from 1 January to 15 February 2025 — you pay only for those games

NBA odds, NFL odds, MLB odds and NHL odds in one API

  • NBA odds — every regular-season, play-in and play-off game: moneyline, point spread and total with the opening and closing line of each sportsbook (DraftKings, FanDuel, BetMGM, Fanatics, bet365 and ~20 more), NBA odds history back to 2009/10.
  • NFL odds — every regular-season and play-off game including the Super Bowl: spread, total and moneyline, closing lines, ATS and over/under results; NFL odds history back to 2011.
  • MLB odds — moneyline, run line and total for every game, each graded after the final out; MLB odds history back to 2014.
  • NHL odds — moneyline, puck line, total and 3-way (regulation) odds; NHL odds history back to 2012.
  • Plus WNBA, college basketball (NCAAB), college football (NCAAF), EuroLeague, KHL, AHL, CFL, NPB, KBO and hundreds of other basketball, football, hockey and baseball leagues.

Today's odds, tonight's lines and full seasons come from the same Actor: one row per game, the same price per game.

NBA 2026-27 season: odds for every game, all season long

The 2026-27 NBA regular season tips off on 20 October 2026 (Pistons–Celtics, Knicks–76ers, Spurs–Thunder). Ask for the season by name and you get every game already played with its closing lines and graded bets, plus the upcoming games with today's prices from about 20 bookmakers (DraftKings, FanDuel, BetMGM, bet365, Fanatics…):

{
"mode": "seasons",
"leagues": ["NBA"],
"seasons": ["2026-2027"],
"statuses": ["finished", "scheduled"],
"markets": ["moneyline", "spread", "total"],
"oddsFormat": "american",
"incremental": true
}

Put it on a schedule (daily, or every hour on game days): with incremental: true each run saves only the games that are new or whose score or prices changed, so a season-long odds history costs one game each time something happens. The same works for the NHL 2026-27 and NFL 2026 seasons. Preseason games: add "preseason" to Season types.

Three output formats: one record per game (nested odds of every sportsbook), a compact summary row per game, or one row per odds quote for spreadsheets, pandas and SQL — the same price per game in every format.

Tonight's lines in seconds — for AI agents, bots and dashboards

Ask for one league and a team, get one compact row per game: the no-vig win probability, the main spread and total, and the best price of every outcome with the sportsbook offering it — about 1 KB per game instead of every bookmaker's odds, so an AI agent can read a whole slate.

{
"leagues": ["NBA"],
"teams": ["Lakers"],
"statuses": ["scheduled"],
"daysAhead": 3,
"outputFormat": "summary",
"oddsFormat": "american"
}
{"league": "NBA", "startTime": "2026-10-22T02:00:00Z", "homeTeam": "Los Angeles Lakers", "awayTeam": "Golden State Warriors",
"bookmakers": 27, "homeWinProb": 0.625, "fairHomeOdds": -167, "fairAwayOdds": 167,
"bestHomeOdds": -182, "bestHomeBookmaker": "1xBet", "bestAwayOdds": 185, "bestAwayBookmaker": "STS.pl",
"spreadLine": -5.5, "spreadHomeCoverProb": 0.4928, "totalLine": 235.5, "…": "…"}

With AI agents (MCP): add this Actor as a tool in the Apify MCP server (sports-odds-lab/nba-nfl-mlb-nhl-odds) and ask in plain words — "What are the odds for the Lakers tonight?", "Which NBA favourites moved most since the open?", "Best price on the Celtics moneyline?". The agent sets leagues, teams and outputFormat: "summary"; each game is one charge of $0.005.

What you get for each game

  • Game: start time (UTC), sport, country, league, stage and season type (regular / postseason / preseason / all-star), round, home and away team; stable IDs matchId, homeTeamId, awayTeamId, tournamentId, tournamentStageId and the Flashscore link
  • Result: status, final score (overtime included; a hockey shoot-out counts as one goal for the winner, as in the official result), regulation score, score after overtime, shoot-out, periods (quarters, periods or innings), overtime / extra-innings flag, winner, regulation result (for 3-way bets)
  • Odds per bookmaker (with a stable bookmakerId) — opening price and latest price; once a game has started the latest price is the closing line:
    • Moneyline (including overtime) with the bookmaker margin
    • Spread — each bookmaker's own main line at the close, or every alternate line, each with its bet result
    • Total — each bookmaker's own main line at the close, or every alternate line, each with its bet result
    • 3-way on regulation time (optional)
  • Market consensus (median across bookmaker brands, margin removed):
    • fair moneyline odds and win probability at the open and at the close, line movement in percentage points
    • the main spread and total at the open and at the close (voted across bookmakers) with their fair prices
    • best price per side and the bookmaker offering it, its edge against the consensus of the other bookmakers, and the arbitrage margin when the best prices on the same line cross
  • Bet results for finished games (settlement) — see below
  • Team statistics (where available): field goals, 3-pointers, rebounds, assists, turnovers; shots, power plays, faceoffs, hits; hits, errors, home runs; yards, first downs, turnovers …
  • Odds format: decimal or American (-110, +150)

Bet results: backtest without grading bets yourself

Every finished game carries a settlement block graded the way US books settle these markets — moneyline, spread and total including overtime (extra innings; an NHL shoot-out counts as one goal), 3-way on regulation time:

  • spreadResult — the side that covered the closing consensus spread: home, away or push; spreadResultOpening on the opening spread; atsMargin = home margin + spread
  • totalResult — over, under or push on the closing total; totalResultOpening; totalMargin
  • moneylineResult (home, away, push on a tie), threeWayResult (home, draw, away), favorite and favoriteWon
  • every bookmaker's spread and total row has its own result, graded on that bookmaker's line — so a -6 that pushed is not mixed with a -6.5 that lost

Asian quarter lines are graded as two half-stakes (home-half = half won, half refunded). Cancelled, abandoned and awarded games are void; games not finished yet have no result.

One row per odds quote (outputFormat: "rows")

For spreadsheets, pandas, SQL and BI tools: one row per game × bookmaker × market × line × outcome — bookmaker, market (moneyline, spread, total, threeWay), outcome (home, away, draw, over, under), line (spread from the outcome's own side: home -5.5 / away +5.5), openingOdds, lastOdds, isMainLine (the line is the market's consensus main line; with the default main lines setting every book's rows are already its own main line, which can differ by half a point) and the bet result for that outcome (win, loss, push, half-win, half-loss, void), with the game's teams, IDs and score on every row. Consensus rows (Consensus (no-vig)) carry the market's fair price at the main line. A game produces about 50–100 rows; you are charged once per game, not per row.

{"matchId": "YasLoKTi", "startTime": "2025-06-23T00:00:00Z", "homeTeam": "Oklahoma City Thunder", "awayTeam": "Indiana Pacers",
"homeScore": 103, "awayScore": 91, "bookmaker": "BetMGM.us", "bookmakerId": 851, "market": "spread", "outcome": "home",
"line": -6.5, "openingOdds": -154, "lastOdds": -110, "isMainLine": true, "result": "win"}

Date range and schedules

  • Date range (mode: "dates", dateFrom, dateTo, leagues): the league's local calendar date (US Eastern for US and Canadian leagues, so a 10 pm ET tip-off belongs to its own day). Ranges reaching into the coming week include upcoming games with current prices. dateFrom/dateTo also narrow a Full seasons run.
  • Only new or changed games (incremental: true) — for schedules that run every few minutes. The first run returns everything; later runs with the same settings return, and charge, only games whose score, status or odds changed: decided games are skipped while their score stays the same, upcoming games while no price or line moved. The memory lives in the key-value store us-sports-odds-incremental in your account; incrementalName keeps several schedules apart.

Historical odds: full seasons back to 2009

League and seasonBookmakers per game (moneyline)
NBA 2009/10 – 2012/136
NFL 2011/12 · NHL 2012/138–9
MLB 20147
NBA · NFL · NHL 2019/20 · MLB 20199–11
NBA · NFL · NHL 2024/25 · MLB 202417–22
Current games (October 2026: NFL, NHL, MLB)24–28 listings

US sportsbooks by season — share of games each book priced, measured on full seasons:

SeasonDraftKingsFanDuelFanaticsBetMGMbet365
NBA 2024/25–––96 %100 %
NFL 2025/26–36 %–100 %100 %
NBA 2025/265 % (play-offs, from 25 April 2026)78 %–100 %100 %
Current games (October 2026: NFL, NHL, MLB)100 %NFL, NHL 100 % · MLB 0 %100 %100 %100 %

DraftKings lines start in late April 2026; for older seasons the consensus is built from BetMGM, bet365 and the international books.

Spreads and totals are quoted by fewer books than the moneyline (roughly half to two thirds as many). A full season comes complete: e.g. 2,473 MLB games in 2024, 1,386 NBA games in 2024/25 (preseason and all-star games are skipped unless you ask for them).

About line-moving books: US books move the line and keep the price at -110. Only the line still quoted at the close counts as that book's closing line; the opening main line is the one the market started from.

Leagues

Everything Flashscore covers for these four sports — the NBA, WNBA, NCAA, EuroLeague and hundreds of basketball leagues; the NFL, NCAA, CFL; the NHL, KHL, AHL, SHL, Liiga, DEL; MLB, NPB, KBO, CPBL and more. In Full seasons mode use the short names NBA, NFL, MLB, NHL, WNBA, NBA Cup, NCAAB, NCAAF, EuroLeague, KHL, AHL, CFL, NPB, KBO, or Sport: Country: League as shown on Flashscore (Basketball: Spain: ACB, Hockey: Sweden: SHL), or paste the league's Flashscore URL.

Use cases

  • Backtest betting systems — every finished game is already graded: ATS, over/under, moneyline, on the closing and the opening line
  • Build models — closing-line probabilities are the most efficient price the market produces
  • Closing Line Value (CLV) — compare the price you bet with the consensus close
  • Line movement — find games where the spread or total moved between open and close
  • Line shopping history — see which book offered the best price, game after game
  • Your own odds database — schedule a daily run of recent games and keep appending

How to use it

  1. Choose Recent games (sports, days back/ahead), Full seasons (leagues and seasons) or Date range (leagues and two dates).
  2. Pick the markets and the odds format.
  3. Click Start. 30 recent games take about half a minute; a full NBA season (1,314 games with the play-offs) about 3 minutes. For many leagues and seasons, raise the run timeout (the default is 6 hours).
  4. Download the results as JSON, CSV or Excel, or read them through the Apify API.

From Python (pandas)

# pip install apify-client pandas
import pandas as pd
from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("sports-odds-lab/nba-nfl-mlb-nhl-odds").call(run_input={
"mode": "dates", "leagues": ["NBA"], "dateFrom": "2025-01-01", "dateTo": "2025-01-31",
"outputFormat": "rows", "oddsFormat": "american",
})
df = pd.DataFrame(client.dataset(run.default_dataset_id).list_items().items)
closing = df[(df.market == "spread") & (df.bookmaker != "Consensus (no-vig)")] # every book's own closing spread + ATS result
market = df[(df.market == "spread") & df.isMainLine] # all books at the market's main line only

The same input works from JavaScript, any HTTP client (run-sync-get-dataset-items), Make, Zapier, n8n, and from AI agents (Claude, ChatGPT, Cursor) through the Apify MCP server.

Ready-made examples

One click, preconfigured — open, press Start, adjust if you like:

Input example — full seasons

{
"mode": "seasons",
"leagues": ["NBA", "NFL", "NHL", "MLB"],
"seasons": ["2024-2025", "2024"],
"markets": ["moneyline", "spread", "total"],
"oddsFormat": "american"
}

Seasons follow the league's own format: 2024-2025 for the NBA and NHL, 2024 for MLB and other calendar-year leagues; for the NFL both 2024 and 2024-2025 work. Leave seasons empty and set lastSeasons to get the current season plus the ones before it.

Input example — date range, one row per quote

{
"mode": "dates",
"leagues": ["NBA"],
"dateFrom": "2025-01-01",
"dateTo": "2025-02-15",
"outputFormat": "rows",
"oddsFormat": "american"
}

Input example — recent games

{
"mode": "recent",
"sports": ["basketball", "baseball"],
"competitions": ["USA: NBA", "USA: MLB"],
"daysBack": 1,
"daysAhead": 1,
"oddsFormat": "american"
}

Output example (NBA Finals 2025, Game 7 — shortened, American odds)

{
"matchId": "YasLoKTi",
"startTime": "2025-06-23T00:00:00Z",
"sport": "basketball",
"competition": "NBA - Play Offs",
"season": "2024/2025",
"seasonType": "postseason",
"round": "Final",
"homeTeam": "Oklahoma City Thunder",
"homeTeamId": "0fHFHEWD",
"awayTeam": "Indiana Pacers",
"awayTeamId": "YPohMUTt",
"status": "finished",
"score": "103-91",
"periods": [[25, 22], [22, 26], [34, 20], [22, 23]],
"winner": "home",
"consensus": {
"booksMoneyline": 19,
"probHomeOpening": 0.744,
"probHomeLast": 0.6935,
"fairHomeOdds": -226,
"fairAwayOdds": 226,
"moveHomePts": -5.05,
"bestHomeOdds": -233,
"bestHomeBookmaker": "Betway",
"edgeVsConsensusHomePct": -0.83,
"arbitrageMoneylinePct": null,
"spreadLine": -6.5,
"spreadLineOpening": -8.5,
"totalLine": 215.5,
"totalLineOpening": 214.5
},
"settlement": {
"homeMargin": 12,
"totalPoints": 194,
"moneylineResult": "home",
"favorite": "home",
"favoriteWon": true,
"spreadLine": -6.5,
"spreadResult": "home",
"atsMargin": 5.5,
"spreadResultOpening": "home",
"totalLine": 215.5,
"totalResult": "under",
"totalMargin": -21.5,
"totalResultOpening": "under"
},
"odds": {
"moneyline": [{"bookmaker": "BetMGM.us", "bookmakerId": 851, "opening1": -385, "opening2": 290, "last1": -278, "last2": 225, "marginPct": 4.3}],
"spread": [{"bookmaker": "BetMGM.us", "bookmakerId": 851, "line": -6.5, "openingHome": -154, "openingAway": 125, "lastHome": -110, "lastAway": -110, "result": "home"}],
"total": [{"bookmaker": "BetMGM.us", "bookmakerId": 851, "line": 215.5, "openingOver": -110, "openingUnder": -110, "lastOver": -110, "lastUnder": -110, "result": "under"}]
},
"scrapedAt": "2026-10-05T21:40:12Z"
}

Pricing

One price per complete game: one game on the Free plan ($0.005) buys every bookmaker that priced the game, every market you selected, the consensus, the bet results and the statistics.

You pay per game saved — platform usage included, nothing else:

Apify planPer 1,000 games
Free$5.00
Starter$4.50
Scale$4.00
Business and higher$3.50

The price increase announced for 27 October 2026 has been cancelled — prices stay as above.

💡 Apify's free plan's monthly $5 credit covers about 1,000 games (roughly a month of NBA, NFL, NHL and MLB odds) — enough to try the data properly before paying anything. For comparison: per-odds-row scrapers charge $0.003–0.012 for each bookmaker price, i.e. $0.15–0.70 for a game with 20 bookmakers.

Every game comes with the odds of all bookmakers and markets you selected, the consensus and the statistics, at no extra cost. Nothing is charged for games you filter out: Skip games without odds is on by default. Set a spending limit on the run if you want a hard cap — the Actor stops as soon as the limit is reached.

FAQ

Where can I get historical NBA odds? Right here: every NBA season back to 2009 with the opening and closing moneyline, spread and total of every bookmaker that priced the game — a full season (about 1,300 games) costs about $6.50. Use Full seasons for whole seasons or Date range for any dates. NFL, MLB, NHL, WNBA and college leagues work the same way.

How do I download NBA closing lines to Excel, CSV or Google Sheets? Run the Actor, then Export the dataset as CSV or Excel (or import the CSV link into Google Sheets). With outputFormat: "rows" every bookmaker's closing price is its own row, ready for a pivot table.

Is there an NBA odds API I can call from code or an AI agent? Yes — the Apify API, the Python and JavaScript clients (see From Python above) and the Apify MCP server for AI agents all run this Actor with the same input.

Can I get against-the-spread (ATS) records? Yes. Every finished game has settlement.spreadResult (the side that covered the closing spread) and atsMargin; group by homeTeamId/awayTeamId for any team's ATS record, home or away, favourite or underdog.

Why does my NBA season have 1,224 regular-season games, not 1,230? The source lists the NBA Cup knock-out games (quarter-finals, semi-finals and the final) as a separate competition. Add NBA Cup to leagues to get them; they come with season type postseason.

Is Pinnacle included? No — the source does not list Pinnacle or Betfair. The no-vig consensus of 20–35 bookmaker brands is a robust reference, and best…Odds shows the best price available.

Does it include player props or team totals? No. For basketball, American football, ice hockey and baseball the source quotes moneyline, spread, total and 3-way — all four are included.

What is the "closing line"? The last price before the game starts. For finished and live games the last… fields are the closing odds; for scheduled games the current ones.

Do moneyline, spread and total include overtime? Yes — they are quoted including overtime and extra innings, the way US books settle them. The 3-way market is on regulation time (regulationResult).

How are bets graded? Moneyline, spread and total include overtime and extra innings (an NHL shoot-out counts as one goal for the winner, as in the official result); 3-way is graded on regulation time. settlement grades the consensus closing and opening lines; each bookmaker's spread and total row carries a result on its own line. Asian quarter lines are two half-stakes. Cancelled, abandoned and awarded games are void.

What do edgeVsConsensus…Pct and arbitrage…Pct mean? The best price on each side is compared with the no-vig consensus of the other bookmakers (the best book is left out, so it is not compared with itself): +2 means that price pays 2 % more than the rest of the market considers fair. Arbitrage is reported only when the best prices on the same line add up to less than 100 %. Stale listings (quotes a bookmaker stopped updating) and outliers are ignored. These numbers describe prices, not predictions.

Do opening and closing prices have timestamps? No — the source publishes the opening and the latest price, not when they were set. scrapedAt tells when the record was read; for finished games the latest price is the closing line.

Can I rely on the IDs? Yes: matchId, homeTeamId, awayTeamId, tournamentId and bookmakerId are the source's stable IDs and do not change when a team or bookmaker is renamed — use them as keys in your database.

How is the consensus calculated? Each bookmaker's margin is removed proportionally, then the median is taken across bookmaker brands (each brand once, via its lowest-margin listing). The main spread and total are the lines most bookmakers quote closest to 50/50.

How far back can I go? In Recent games mode 7 days back and 7 ahead. In Full seasons and Date range mode every season Flashscore lists — odds go back to 2009 (fewer bookmakers in older seasons, see the table above). US books: BetMGM and bet365 in every recent season, FanDuel from 2025/26, DraftKings from late April 2026, Fanatics in current games (see the table above).

Which time zone? All timestamps are UTC.

Where does the data come from? From publicly available game and odds information shown on Flashscore. This Actor is not affiliated with Flashscore, the leagues or any bookmaker.

More from Min Maxxxer

⭐ Did this Actor save you time? A short review on this page helps other bettors and analysts find it — and tells us what to build next.

Changelog

  • 0.6 — summary output (outputFormat: "summary": one compact row per game with market probabilities, main lines and the best price per outcome — for AI agents and dashboards), team filter (teams, every mode), and leagues now narrows Recent games too (only that league's sport is read — faster). The prefilled first run shows this week's NBA games with current odds.

  • 0.5 — billing and incremental fixes: with American odds, Only new or changed games no longer saves and charges unchanged games again; Full seasons + incremental skips finished games it already returned; a game moved to another date counts as a change; two overlapping runs with the same settings no longer overwrite each other's memory; the rows format never charges a game that produced no rows. The main line no longer depends on the order in which a brand's licences are listed, the moneyline consensus uses prices still quoted, and a season the source could not fully page through is reported as incomplete instead of looking complete.

  • 0.4 — Full seasons includes the upcoming games of the current season (from the league's fixtures page), so "seasons": ["2026-2027"] returns the NBA's opening weeks with current odds before the first tip-off; with last N seasons a season that has not started still yields the last complete one.

  • 0.3.5 — about 5× faster (a full NBA season in about 3 minutes instead of 18): more parallel requests and 2 GB runs by default, at the same price; date ranges now include scheduled games beyond the next 7 days (e.g. an NBA opening week); a response cut off mid-transfer is retried instead of skipping the game.

  • 0.3 — One row per odds quote (outputFormat: rows, charged once per game) with per-outcome results and consensus rows; date range mode (dateFrom/dateTo, league-local dates, upcoming games included near today; also narrows full seasons); only new or changed games for schedules (score, status and odds fingerprints).

  • 0.2.2 — fix: the best price per side (bestHomeOdds, bestSpreadHomeOdds, bestOverOdds …) is now always the price of the bookmaker named next to it; stale listings could make it look higher than any live quote.

  • 0.2 — Bet results: every finished game graded on the closing and opening consensus lines (spread, total, moneyline, 3-way), and every bookmaker's spread and total row graded on its own line, with pushes, quarter lines and void games; best price per side with the bookmaker offering it, its edge against the other bookmakers' consensus and arbitrage on the same line (stale listings ignored); field-level output schema for AI agents and integrations; ATS and total results in the table view.

  • 0.1 — first release (free launch period): basketball, American football, ice hockey and baseball; moneyline, spread, total and 3-way from up to 42 bookmakers, opening and closing; no-vig consensus, main lines, line movement; full seasons back to 2009; periods, season types, team statistics; decimal or American odds.