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.
Endpoints
Markets
Query parameters
Rate limits
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
x-api-key: YOUR_KEY) or query param (?x-api-key=YOUR_KEY). Check base URL is api.theoddsapi.com/sports/ for active sports.&markets=spreads,totals/me/ for usage. Resets at midnight UTC. Upgrade for more.