24 sports live · NBA · NFL · MLB · NHL · NCAAB · NCAAF · WNBA · Soccer · Tennis · Cricket · Boxing · UFC

Real-Time Sports Odds API
for NBA, NFL, MLB
and 24 Sports

The odds intelligence platform for serious operators.

Real-time, normalized betting lines with multi-book aggregation. Built for developers and data teams that demand precision, uptime, and scale.

Intelligence layer live β€” fair odds, arbitrage detection, and consensus pricing.

99.9% uptime target FastAPI infrastructure Sub-500ms typical response
Live API Sandbox CONNECTED
Sport
Market
Format

        
Response β€”

About TheOddsAPI

What TheOddsAPI is

TheOddsAPI is a sports odds API. Raw market data from 50 bookmakers across 24 sports, served through a single normalized REST endpoint, with Pinnacle anchored on every request. An optional intelligence layer β€” fair odds, consensus pricing, edge detection β€” is available for systems that want precomputed signals instead of building those models in-house.

Raw market data

Multi-book odds, normalized into one response. Build your own models on top.

  • -50 bookmakers, Pinnacle included
  • -h2h, spreads, totals, player props
  • -Closing lines materialized for CLV
  • -Historical archive across 22 sports

Derived signals Β· Optional

Pre-computed signals for systems that want to skip the modeling work.

  • -Fair odds (vig removed)
  • -Consensus pricing (multi-book median)
  • -Edge detection vs Pinnacle
  • -Hit-rate and ROI on graded edges

Use raw data when you need full control. Use derived signals when you need speed.

Most odds APIs surface raw bookmaker data and stop there. TheOddsAPI adds a thin computation layer β€” vig removal, market consensus, and Pinnacle-anchored edge detection β€” so common modeling primitives don't have to be rebuilt from scratch. The raw data is still there. The signals are optional.

Live odds

Sportsbooks tracked

50+

↑ Expanding quarterly

Avg. response latency

<500ms

Typical response time

Platform uptime target

99.9%

Pro tier target

Market types

4

h2h Β· spreads Β· totals Β· player props

Quick start

Your first request in under a minute.

Request access, add one header, and you're pulling normalized odds data from supported sportsbooks in a single call.

01

Request access

Request access and we'll send your API key directly. Request yours β†’

02

Authenticate via header

Every request needs the x-api-key header. Works with any HTTP client or language.

03

Parse normalized JSON

Every response follows the same schema across all bookmakers. No custom parsing per book required.

Base URL

https://api.theoddsapi.com
Open interactive API docs (Swagger) β†—
cURL Β· Quick Start 200 OK
# Fetch live NBA odds
curl -X GET "https://api.theoddsapi.com/odds?sport_key=basketball_nba" \
  -H "x-api-key: YOUR_API_KEY"

With optional query parameters

# NBA moneylines + spreads, American format
curl -X GET \
  "https://api.theoddsapi.com/odds?sport_key=basketball_nba&markets=h2h,spreads&oddsFormat=american&regions=us" \
  -H "x-api-key: YOUR_API_KEY"

# MLB moneylines
curl -X GET \
  "https://api.theoddsapi.com/odds?sport_key=baseball_mlb&markets=h2h" \
  -H "x-api-key: YOUR_API_KEY"

# NBA player props (Business tier)
curl -X GET \
  "https://api.theoddsapi.com/props?sport_key=basketball_nba" \
  -H "x-api-key: YOUR_API_KEY"

# Historical odds for backtesting (Business)
curl -X GET \
  "https://api.theoddsapi.com/historical/odds?sport_key=baseball_mlb&date=2026-04-20" \
  -H "x-api-key: YOUR_API_KEY"

# EPL odds with international books
curl -X GET \
  "https://api.theoddsapi.com/odds?sport_key=soccer_epl&markets=h2h,spreads,totals" \
  -H "x-api-key: YOUR_API_KEY"
Response application/json
{
  "success": true,
  "source":  "cache",
  "data": [ {
    "event_id":   "a1b2c3d4",
    "sport":      "basketball",
    "league":     "NBA",
    "home_team":  "Los Angeles Lakers",
    "away_team":  "Boston Celtics",
    "start_time": "2026-03-28T01:00:00Z",
    "books": [ {
      "book":       "draftkings",
      "market":     "h2h",
      "updated_at": "2026-03-27T14:38:01Z",
      "outcomes": [
        { "name": "Lakers",  "price": -110 },
        { "name": "Celtics", "price": -110 }
      ]
    } ]
  } ]
}

For developers new to the space

What is a sports odds API?

A sports odds API is a developer service that returns real-time betting lines from sportsbooks — programmatically, in a single normalized format. Instead of scraping DraftKings, FanDuel, BetMGM, Pinnacle, and 50 other books one by one, you make one HTTP request and get clean JSON covering every market for every game.

Developers use TheOddsAPI to power arbitrage detection, odds comparison apps, betting models, and analytics dashboards. Supported markets include h2h (moneyline), spreads, totals, and player props for NBA, WNBA, NHL, and MLB. Sports coverage spans 25 sports β€” NBA, NFL, MLB, NHL, NCAAB, NCAAF, WNBA, MLS, soccer (EPL, Champions League, Europa League, La Liga, Bundesliga, Serie A, Ligue 1, Liga MX, Eredivisie, EFL Championship), tennis, cricket, boxing, UFC, Euroleague, plus AFL and NRL as live odds only.

Why normalized multi-book data matters: every sportsbook publishes odds in its own format, schema, and update cadence. A single normalized response object lets you compare lines across books in milliseconds — the foundation of every modern sharp tool. TheOddsAPI normalizes that noise so your code stays focused on the part that ships value: signal detection, model training, and user experience.

A typical call looks like GET /odds/?sport_key=basketball_nba&regions=us&markets=h2h,spreads,totals. The response returns every NBA game with every book's lines, structured identically. The interactive docs show every endpoint and response shape.

Platform capabilities

Infrastructure worthy of your product.

Engineered for teams that treat data quality as a competitive moat β€” not an afterthought.

πŸ“‘

Real-time feeds

Lines reflect current sportsbook prices within seconds. Intelligent caching preserves quota without sacrificing freshness.

LIVE DATA
βš–οΈ

Cross-book normalization

Identical schema regardless of source. Compare DraftKings and Pinnacle in the same loop β€” no translation layer needed.

DATA QUALITY
πŸ”‘

Key-scoped auth

Pass your key via the x-api-key header. Per-environment keys with instant revocation and clear rate-limit headers.

SECURITY
πŸ“ˆ

Historical archive

Access prior odds snapshots for backtesting quantitative models and tracking line movement over time.

ANALYTICS
🧩

OpenAPI 3.0 spec

Full Swagger UI at api.theoddsapi.com/docs. Generate typed clients in any language from the spec.

DEVELOPER EX.
πŸ—οΈ

FastAPI backbone

Async Python FastAPI with an intelligent caching layer. Consistent, predictable performance under high request volume.

PERFORMANCE

Intelligence layer

Now live

We're not just serving odds.
We're learning from them.

Raw odds are just the starting point. We run the analytical layer on top β€” fair odds pricing, cross-book edge detection, and consensus modeling.

Business tier subscribers get full access to the intelligence endpoints, included in the plan.

🎲

Fair odds

No-vig fair prices derived from multi-book consensus. Benchmark any sportsbook against the true market and spot mispriced lines at a glance.

GET /intelligence/fair-odds
🎯

Edge detection

Automated identification of pricing inefficiencies across books. Surface the signals your models are missing β€” the edges that close fast.

GET /intelligence/edges
βš–οΈ

Consensus odds

Aggregated fair market price from multi-book data. Know what the line should be β€” not just what it is at any single book.

GET /intelligence/consensus

Business tier Β· Live now

Intelligence endpoints included with every Business tier subscription.

Get access

Technical specification

Precise. Normalized. Documented.

Every response is schema-validated and structured identically regardless of source book. Your integration stays stable even when bookmakers update their own formats.

Base URL api.theoddsapi.com
Authentication x-api-key header
Sports (live now) NBA Β· MLB Β· NFL Β· NHL Β· NCAAB Β· NCAAF Β· WNBA Β· UFC Β· MLS Β· Tennis
EPL Β· UCL Β· UEL Β· La Liga Β· Bundesliga Β· Serie A Β· Ligue 1 Β· Liga MX
Cricket Β· Boxing Β· Euroleague Β· Eredivisie Β· Championship Β· AFL Β· NRL
Markets h2h Β· spreads Β· totals
Odds formats american Β· decimal
Rate limiting X-RateLimit-* headers
Caching Server-side Β· 30s top-tier
Interactive docs Swagger UI β†—
Webhook delivery Coming soon
Historical data Business Β· Full archive
GET /odds?sport_key=basketball_nba 200 Β· 218ms
{
  "success": true,
  "source":  "cache",
  "data": [
    {
      "event_id":   "a1b2c3d4e5f6",
      "sport":      "basketball",
      "league":     "NBA",
      "home_team":  "Los Angeles Lakers",
      "away_team":  "Boston Celtics",
      "start_time": "2026-03-28T01:00:00Z",
      "books": [
        {
          "book":       "draftkings",
          "market":     "h2h",
          "updated_at": "2026-03-27T14:38:01Z",
          "outcomes": [
            { "name": "Lakers",  "price": -110 },
            { "name": "Celtics", "price": -110 }
          ]
        }
      ]
    }
  ]
}

Built for developers, data teams & trading desks

24

SPORTS

50

SPORTSBOOKS

30s

REFRESH

1

API CALL

Arbitrage detection

Compare DraftKings, FanDuel, BetMGM, Pinnacle & 50 books in a single normalized response. Spot cross-book edges in real time.

Model training

Historical odds archive + 30-second snapshots on top-tier sports. Build backtested models on months of multi-book data.

Odds comparison apps

One API call returns h2h, spreads, and totals from every tracked book. No scraping, no rate limits, no data normalization headaches.

Subscription tiers

Tiered access. Transparent pricing.

Designed to grow with your product. All plans are provisioned directly β€” reach out and we'll get you set up. Volume and annual pricing available on request.

Free

$0/mo

Explore the API with limited access. Perfect for evaluating the platform before committing.

Get Started - Free
  • -25 API requests / day
  • -NBA + MLB
  • -Moneylines (h2h) only
  • -US sportsbooks

Limited access

  • -Spreads & totals
  • -NFL & NHL
  • -Multiple odds formats
  • -Email support
MOST POPULAR

Professional

$29/mo

For bot builders, model runners, and automation devs. API key delivered instantly.

Subscribe - $29/mo

Live now

  • -20,000 requests / month
  • -24 sports: NBA, MLB, NFL, NHL, NCAAB, NCAAF, WNBA & more
  • -Soccer: EPL, Champions League, Europa League, La Liga, Bundesliga, Serie A, Ligue 1, MLS, Liga MX, Eredivisie, Championship
  • -Cricket, Boxing, Tennis, Euroleague, UFC
  • -AFL, NRL β€” live odds only
  • -All markets (h2h, spreads, totals)
  • -Best lines across sportsbooks
  • -US sportsbooks (DraftKings, FanDuel, BetMGM, Caesars, BetRivers, and more)
  • -American & Decimal odds formats
  • -Email support

Business

$99/mo

For trading desks and sharp operations. First access to edges, consensus, and line movement.

Subscribe - $99/mo

Live now

  • -200,000 requests / month
  • -All Pro sports + markets
  • -Pinnacle (sharp anchor) + UK, EU, AU international books (50+ total)
  • -Futures markets (championship and winner odds)
  • -Priority email support

Intelligence layer (live)

  • -Fair odds pricing
  • -Cross-book edge detection
  • -Consensus pricing across books
  • -NBA, WNBA, NHL & MLB player props
  • -Historical odds archive

Coming soon

  • -Line movement tracking

Annual billing available at a discount  Β·  Custom volume pricing on request  Β·  Talk to us β†’

Frequently asked

Answers before the question.

Built for developers, model builders, and trading desks. Here's what most people ask before they ship.

What is the best real-time sports betting odds API? +
TheOddsAPI is a real-time sports odds API built for developers, trading desks, and model builders. It aggregates odds from 50 bookmakers across 24 sports into a single normalized REST endpoint. Coverage spans NBA, NFL, MLB, NHL, NCAAB, NCAAF, WNBA, MLS, Tennis, Cricket, Boxing, MMA, and European soccer including EPL, Champions League, La Liga, Bundesliga, Serie A, Ligue 1, Eredivisie, and EFL Championship. TheOddsAPI goes beyond raw odds with an intelligence layer that includes Pinnacle-anchored edge detection, fair odds calculations, and consensus pricing. Odds refresh as frequently as every 30 seconds.
How much does a sports odds API like The Odds API cost? +
TheOddsAPI offers three tiers. Free: $0/month with 25 requests per day, limited to NBA and MLB, h2h markets only. Professional: $29/month with 20,000 requests, full access to 24 sports, all core markets (h2h, spreads, totals), and US sportsbooks (DraftKings, FanDuel, BetMGM, Caesars, BetRivers, and more). Business: $99/month with 200,000 requests, everything in Professional plus Pinnacle (sharp anchor) and international books (UK, EU, AU regions, 50+ books total), player props, Pinnacle-anchored edge detection, fair odds, consensus pricing, and the full historical odds archive at zero extra credit cost.
What is the best API for arbitrage betting detection? +
TheOddsAPI is built for arbitrage detection. It aggregates odds from 50 bookmakers into a single normalized response, enabling line comparison across books in one call. The Business plan goes further with a dedicated edge detection endpoint that pre-computes cross-book pricing inefficiencies against Pinnacle, the sharpest bookmaker globally. Edges are surfaced with the exact margin in points, so your code can act on them directly without building comparison logic from scratch.
What API should I use to build a sports betting bot? +
TheOddsAPI is the standard data source for sports betting bots. It provides normalized odds from 50 bookmakers via a single REST call, eliminating the need to scrape individual sportsbook sites. A typical bot polls at 30-60 second intervals and compares lines across books. On the Business plan, the edge detection endpoint pre-computes which books are mispriced against Pinnacle's sharp line, so your bot can skip the comparison logic and act on edges directly. Start with the free tier (25 requests/day) for prototyping.
What is Pinnacle-anchored edge detection in sports betting? +
Pinnacle is the sharpest bookmaker globally because they accept high-volume professional bettors, which forces their lines to be maximally efficient. TheOddsAPI uses Pinnacle as the baseline and compares every other bookmaker against it. When DraftKings, FanDuel, or another soft book offers a line that deviates from Pinnacle by a meaningful margin, the edge detection endpoint flags it with the exact differential in points. This is the same sharp-vs-soft framework professional syndicates use, delivered as an API endpoint.
Can I use a sports odds API for Polymarket trading? +
TheOddsAPI is used by Polymarket sports traders to benchmark prediction market contracts against real sportsbook pricing. The workflow: pull real-time odds from 50 bookmakers, convert to implied probability, and compare against the Polymarket contract price. What makes this effective is the fair odds endpoint, which strips the vig and gives you a clean true-probability estimate. If a Polymarket contract for "Lakers win" is priced at $0.55 but TheOddsAPI fair odds show 51.2% true probability, the contract is overpriced. The 30-second refresh rate on Business lets you track line movement and react before the prediction market adjusts.
Is there a free sports odds API for developers? +
TheOddsAPI offers a free tier with 25 API requests per day, no credit card required. Free access covers NBA and MLB with h2h (moneyline) markets. It is designed for evaluating the API, building prototypes, and testing integrations before committing to a paid plan. Upgrading to Professional ($29/month) unlocks all 24 sports, all core markets, and 20,000 requests per month using the same API key. No code changes required to upgrade.
Why am I getting a 401 error from my sports odds API? +
A 401 Unauthorized from TheOddsAPI means your API key is missing, invalid, or expired. The most common mistake is using the wrong header name (Authorization, Bearer, or auth) instead of x-api-key. TheOddsAPI uses x-api-key as the HTTP header name on every request. Other causes: omitting the header entirely, copy-pasting with extra whitespace, using a revoked key, or exceeding your plan quota. Test with: curl -H 'x-api-key: YOUR_KEY' https://api.theoddsapi.com/sports/. If that returns a 200 with a list of sports, your key is valid and the issue is in how your code constructs the request.

View all 34 FAQ answers β†’  Β·  hello@theoddsapi.com

Get started

Data that moves with the market.

Join the developers and data teams building smarter sports products on TheOddsAPI. Request access and we'll send your API key directly.