TheOddsAPI
Home Swagger Pricing FAQ

Quick start guide

Your first API call in under a minute.

Real-time sports odds from 50 sportsbooks across 24 sports. One API key, one header, normalized JSON.

Your base URL

https://api.theoddsapi.com

All requests go to this URL. Make sure this is set correctly before making your first call.

Authentication

Pass your API key as the x-api-key header on every request. You can also pass it as a query parameter for quick browser testing.

Browser — paste this into your address bar

https://api.theoddsapi.com/me/?x-api-key=YOUR_API_KEY

cURL

curl -H "x-api-key: YOUR_API_KEY" \
  https://api.theoddsapi.com/sports/

Python

# pip install requests
import requests

API_KEY = "YOUR_API_KEY"
headers = {"x-api-key": API_KEY}

resp = requests.get(
    "https://api.theoddsapi.com/odds/",
    headers=headers,
    params={"sport_key": "basketball_nba"}
)

print(resp.json())

JavaScript (fetch)

const API_KEY = "YOUR_API_KEY";

const resp = await fetch(
  "https://api.theoddsapi.com/odds/?sport_key=basketball_nba",
  { headers: { "x-api-key": API_KEY } }
);

const data = await resp.json();
console.log(data);

Get live odds

Pull real-time odds from DraftKings, FanDuel, BetMGM, Pinnacle, Betfair, and 45 more sportsbooks in a single call.

# NBA odds — all markets, all books
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.theoddsapi.com/odds/?sport_key=basketball_nba"

# EPL soccer with Pinnacle + EU books
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.theoddsapi.com/odds/?sport_key=soccer_epl"

# MLB run lines (spreads) only
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.theoddsapi.com/odds/?sport_key=baseball_mlb&markets=spreads"

# Champions League totals (over/under)
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.theoddsapi.com/odds/?sport_key=soccer_uefa_champs_league&markets=totals"

Try it live in Swagger — click Authorize, paste your key, hit Try It. No terminal needed.

24 sports available

Hit /sports/ to see what's available on your tier.

US Major
NBA · MLB · NFL · NHL
College + WNBA
NCAAB · NCAAF · WNBA
Combat
UFC · Boxing
Soccer
EPL · Champions League · La Liga · Bundesliga · Serie A · Ligue 1 · MLS · Liga MX · Europa League · Eredivisie · Championship
International
Cricket · Tennis · Euroleague · AFL (live-only) · NRL (live-only)
FREE: NBA + MLB PRO: All 24 sports BUSINESS: + Historical + Props + Intelligence + Edges

Endpoints

GET /sports/ List sports for your tier
GET /odds/?sport_key= Live odds from 50 books
GET /events/?sport_key= Upcoming events
GET /best-lines/?sport_key= Best price per outcome across books
GET /historical/odds?sport_key= Historical snapshots for backtesting BIZ
GET /props/?sport_key= NBA player props (4 markets) BIZ
GET /edges/?sport_key= Pinnacle-anchored edge detection BIZ
GET /intelligence/fair-odds Vig-removed fair prices BIZ
GET /intelligence/arbitrage Cross-book arb detection BIZ
GET /me/ Your usage, tier, and quota

Markets

Market key
Also known as
Description
h2h
Moneyline
Who wins the game
spreads
Run line / Puck line / Handicap
Point spread
totals
Over/Under
Total points, runs, or goals

Query parameters

Param
Example
Description
sport_key
basketball_nba
Required on most endpoints
markets
h2h,spreads
Filter markets (default: all)
event_id
abc123
Filter to one event

Rate limits

Tier
Daily
Monthly
FREE
25
~750
PRO $29
667
~20,000
BIZ $99
6,667
~200,000

Rate limit headers on every response: X-RateLimit-Remaining, X-RateLimit-Reset

50 sportsbooks

DraftKings, FanDuel, BetMGM, Caesars, BetRivers, Fanatics, Pinnacle, Betfair Exchange, William Hill, Marathonbet, Paddy Power, Sky Bet, Ladbrokes, Unibet, Coolbet, Matchbook, and more. Coverage varies by sport — US sports include EU sharp books, European soccer includes UK books.

Troubleshooting

Issue
Fix
401 / Missing key
Pass your key as a header (x-api-key: YOUR_KEY) or query param (?x-api-key=YOUR_KEY). Check base URL is api.theoddsapi.com
403 on a sport
Free tier only gets NBA + MLB. Upgrade to Pro for all sports.
Empty response
Sport may be off-season. Check /sports/ for active sports.
Only seeing moneylines
All 3 markets return by default. Filter with &markets=spreads,totals
Rate limit hit
Check /me/ for usage. Resets at midnight UTC. Upgrade for more.

Ready to build?

Get your API key and start pulling live odds in seconds.