Backtesting data

Historical Football Odds API

Backtest football models with stored opening and last-seen odds alongside match results, team stats, player data, and xG.

Bet365, Pinnacle, Betfair Exchange, and Kambi coverage
1X2, BTTS, totals, corners, and Asian handicap markets
Opening and last-seen prices for supported matches
Related football data endpoints for fixtures, xG, teams, and players

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

Data type
Stored opening and last-seen prices
Best use
Backtesting, CLV, model validation
Context data
Scores, match stats, xG, teams, players
Availability
Supported matches where odds were captured or stored

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
Endpoint

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.

football odds history APIhistorical betting odds APIodds backtesting API
REST JSON
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" }
          }
        }
      }
    ]
  }
}
FAQ

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.

Pricing_Plans

Simple, Transparent Pricing

Every plan includes stats, odds, xG, history, and every documented endpoint.

Starter

$50/month

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
Most Popular

Growth

$129/month

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

$379/month

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
No odds, xG, or history add-ons
Cancel anytime
7-day free trial on all plans

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.