Home/Docs/Historical odds

Historical odds

Last updated 2026-10-30

GET /historical/odds returns timestamped price snapshots for completed and in-progress events, collected since 13 May 2026, on the Business plan. Request one market at a time, filter by date range and up to three bookmakers, and page with a cursor.

Request

# One market per request; up to 3 bookmakers; newest-first pages of up to 1,000 rows
curl -H "x-api-key: YOUR_API_KEY" \
  "https://api.bettingdataapi.com/historical/odds?sport_key=basketball_nba&market=h2h&bookmakers=pinnacle,draftkings&from=2026-10-01T00:00:00Z&to=2026-10-08T00:00:00Z&limit=1000"
ParameterNotes
sport_keyRequired.
from / toISO 8601 range. Defaults: 7 days ago to now.
marketOne market per request: h2h, spreads, totals, or a supported prop market. markets (plural) is rejected with 400 here.
bookmakersUp to 3 keys, comma-separated.
event_idOne game.
limitRows per page, default 100, maximum 1,000.
cursorPass meta.next_cursor from the previous page. Faster than offset at depth.
oddsFormatamerican (default) or decimal.

Walk every page in Python

import requests

def historical(api_key, **params):
    """Walk every page with keyset pagination (meta.next_cursor)."""
    params = {"limit": 1000, **params}
    while True:
        r = requests.get("https://api.bettingdataapi.com/historical/odds", headers={"x-api-key": api_key},
                         params=params, timeout=30)
        r.raise_for_status()
        body = r.json()
        yield from body["data"]
        nxt = (body.get("meta") or {}).get("next_cursor")
        if not nxt:
            break
        params = {k: v for k, v in params.items() if k != "offset"}
        params["cursor"] = nxt

rows = list(historical("YOUR_API_KEY", sport_key="icehockey_nhl", market="totals",
                       **{"from": "2026-10-01T00:00:00Z", "to": "2026-10-08T00:00:00Z"}))

Settlements: graded results with final scores

GET /historical/settlements?sport_key=... returns graded edge snapshots (hit, miss, push or void) with the final score of each event, from 25 April 2026. Filter with market, result and event_id; limit goes up to 500. Settlements publish once final scores are confirmed, typically within a few hours of the game ending.

Plan

Both historical endpoints are Business plan ($99/mo). Free and Professional keys receive 403.

Strategy walkthrough: backtesting with historical odds.

Try it with a free key

25 requests per day, NFL, NBA and MLB moneylines, no credit card.

Get a free API key