The Odds API¶
Summary¶
The Odds API is a sports betting odds aggregation API that provides real-time and historical odds from over 80 bookmakers across major sports. It is one of the most widely used data sources for sports betting model development because it offers a simple REST interface, broad bookmaker coverage, and a free tier suitable for prototyping and small-scale backtesting.
The API covers NFL, NBA, MLB, NHL, soccer (multiple leagues), tennis, MMA, and more. Each request fetches odds for a specific sport key and region (US, UK, EU, AU). Odds are returned as American or decimal formats with timestamps. The API does not provide results, statistics, or lineups — only betting odds.
The service uses a credit-based pricing model. A single request (one sport key, one region) costs 1 credit. Historical odds requests cost additional credits. Rate limits apply per tier, and the free tier allows 500 credits per month.
Key Concepts¶
- Sport key: Unique identifier per sport (e.g.,
americanfootball_nfl,soccer_epl) - Region: Geographic filter (us, uk, eu, au) — controls which bookmakers appear
- Bookmaker: Individual sportsbook with its own odds; the API aggregates across all
- Market type:
h2h(head-to-head/moneyline),spreads,totals,futures,player_props - Odds formats: American (-110, +240) or decimal (1.91, 3.40) — configurable per request
- Last update: Timestamp for when odds were last refreshed by the bookmaker
Data Available¶
| Data | Available | Notes |
|---|---|---|
| Pre-game odds | ✅ | Moneyline, spread, totals, props, futures |
| Live odds | ✅ | Refresh intervals vary by bookmaker |
| Historical odds | ✅ | Paid plans; opening and closing odds |
| Match results | ❌ | Not provided — combine with other sources |
| Statistics | ❌ | Not provided |
| Lineups | ❌ | Not provided |
Pricing Tiers¶
- Free tier: 500 credits/month, 500 requests/hour. No credit card required. Suitable for prototyping and small projects.
- Starter: $99/month — higher request limits and historical odds access
- Pro: Higher volumes, faster refresh rates, more bookmakers
- Credits reset monthly; unused credits do not roll over
- Each request = 1 credit per sport key per region; historical data requests cost more
Rate Limits¶
- Free: 500 requests/hour
- Paid plans: 1,000–5,000+ requests/hour depending on tier
- HTTP 429 response when rate limited; retry after spacing requests by several seconds
- Usage credits reset on the 1st of every month
Python Integration¶
import requests
API_KEY = "your-api-key"
SPORT = "soccer_epl" # English Premier League
REGION = "uk" # UK bookmakers
MARKET = "h2h" # Moneyline
url = f"https://api.the-odds-api.com/v4/sports/{SPORT}/odds"
params = {
"apiKey": API_KEY,
"regions": REGION,
"markets": MARKET,
"oddsFormat": "decimal",
}
response = requests.get(url, params=params)
data = response.json()
for event in data:
print(f"{event['home_team']} vs {event['away_team']}")
for bookmaker in event["bookmakers"]:
for market in bookmaker["markets"]:
for outcome in market["outcomes"]:
print(f" {bookmaker['title']}: {outcome['name']} @ {outcome['price']}")
Notes¶
- The Odds API is an aggregator, not a bookmaker — it does not accept bets
- Bookmaker coverage is strongest for US-facing sports (NFL, NBA, MLB); soccer coverage is good for major leagues but thinner for lower divisions
- For model backtesting, the key value is accessing historical odds (paid feature) to compute closing line value (CLV) and validate model predictions
- No match statistics or xG data — pair with API-Football or Football-Data.co.uk for match-level data
- Sharp bookmakers (Pinnacle, BetCRIS) are included in the aggregation, useful for market efficiency analysis