Historical Football Odds API
Backtest football models with stored opening and last-seen odds alongside match results, team stats, player data, and xG.
Quick Answer
TheStatsAPI provides stored football odds for supported matches, including opening and last-seen values where odds were captured or stored. Use this with match results and stats to backtest prediction models.
- Endpoint:
/football/matches/{match_id}/odds - Best for: Backtesting, CLV, model validation.
- Availability varies by match, competition, bookmaker, and market.
At a glance
Why historical odds matter
A model cannot be evaluated only against final scores. Historical odds show what the market believed before the match and how prices changed between opening and last-seen values. That makes them essential for realistic betting analytics.
- Compare model probability to market probability
- Measure whether picks beat the closing price
- Separate predictive skill from lucky outcomes
Backtesting workflow
Pull finished matches, fetch their odds, convert odds to implied probabilities, then join that data with match results and statistics. This gives you a clean dataset for model evaluation.
- Fetch matches by competition and season
- Join odds by match_id
- Calculate implied probability and CLV
Historical odds response
Odds responses stay focused on bookmaker prices. Match context comes from related football endpoints, so your app can join odds to fixtures, results, xG, team stats, and player data by match ID.
GET https://api.thestatsapi.com/api/football/matches/{match_id}/odds
Authorization: Bearer YOUR_API_KEY
{
"data": {
"match_id": "mt_14502",
"bookmakers": [
{
"bookmaker": "Pinnacle",
"markets": {
"match_odds": {
"home": { "opening": "2.150", "last_seen": "2.080" },
"draw": { "opening": "3.400", "last_seen": "3.500" },
"away": { "opening": "3.200", "last_seen": "3.300" }
},
"total_goals": {
"over": { "opening": "1.890", "last_seen": "1.900" },
"under": { "opening": "1.930", "last_seen": "1.920" }
}
}
}
]
}
}Related Odds API Pages
Current topic: Opening and last-seen prices for backtesting and model analysis.
Closing odds API
Latest stored pre-kickoff prices for CLV and prediction benchmarking.
Closing line value API
Closing line value workflows using Bet365, Pinnacle, and Betfair prices.
Odds comparison API
Multi-bookmaker football odds for comparison apps and price screens.
Pinnacle odds API
Sharp reference prices for CLV and model validation.
Frequently Asked Questions
Can I use TheStatsAPI for odds backtesting?
Yes. Stored opening and last-seen odds can be joined with match results and statistics for supported matches.
Does historical odds coverage vary?
Yes. Odds availability depends on the match, competition, bookmaker, and whether odds were captured or stored.
Do I need another API for match results?
No. TheStatsAPI also provides fixture, match result, match stats, player, team, and xG endpoints.
Simple, Transparent Pricing
Every plan includes stats, odds, xG, history, and every documented endpoint.
Starter
For growing applications and side projects
- All football data endpoints included
- Pre-match & live odds endpoints
- Bet365, Pinnacle, Betfair Exchange & Kambi odds
- 1X2, Asian handicap, totals, BTTS, DNB & corners
- Fixtures, results, match stats, teams & players
- xG, player season stats & team stats
- 10 years of historical match data
- Build with AI
- 80 competitions by default, up to 1,196 on request
- 100,000 requests/month
- 30 requests/min
- Email & chat support
Growth
For professional applications at scale
- All football data endpoints included
- Pre-match & live odds endpoints
- Bet365, Pinnacle, Betfair Exchange & Kambi odds
- 1X2, Asian handicap, totals, BTTS, DNB & corners
- Fixtures, results, match stats, teams & players
- xG, player season stats & team stats
- 10 years of historical match data
- Build with AI
- 80 competitions by default, up to 1,196 on request
- 500,000 requests/month
- 60 requests/min
- Priority support
Scale
For high-volume, production-grade usage
- All football data endpoints included
- Pre-match & live odds endpoints
- Bet365, Pinnacle, Betfair Exchange & Kambi odds
- 1X2, Asian handicap, totals, BTTS, DNB & corners
- Fixtures, results, match stats, teams & players
- xG, player season stats & team stats
- 10 years of historical match data
- Build with AI
- 80 competitions by default, up to 1,196 on request
- 5,000,000 requests/month
- 300 requests/min
- Dedicated support & SLA
Build with football odds and match context in one API.
Start a 7-day free trial with odds, fixtures, match stats, player data, team data, and xG endpoints available on every plan.