What are closing lines?
The closing line is the final price a bookmaker offered before an event started. It is the most informative number a bookmaker publishes, because it reflects every bet taken and every adjustment made right up to kick-off. Most quantitative work starts here: you compare your model’s price, or the price you actually got, against the close. Odds-API.io stores closing odds for settled events across every bookmaker and market we cover.Which endpoint should I use?
There are two ways to get closing lines, and picking the right one matters.
If you are building a dataset, use
/v3/historical/closing-lines. Pulling a season through the per-event endpoint means one request per match, which for five leagues over a season is roughly 1,900 requests. The same data comes back from the bulk endpoint in about 20.
Fetching closing lines in bulk
/v3/historical/closing-lines takes a sport, up to 10 leagues, a date range and the markets you care about, and returns every settled event in that window with its closing odds attached.
Query Parameters
markets and bookmakers are both required here. A single call can otherwise cover 100 events across 30 bookmakers and every market, which produces a response nobody wants to download.
Example
/v3/historical/odds:
bookmakers object. That is deliberate: you can tell the difference between a match we have no prices for and a match that never happened.
scores.periods is keyed by period: p1, ft, ot and so on. Cricket instead uses inning1, inning2, and adds cricket-only wickets and overs pairs; see Cricket Scores for the shape.
Paginating a full season
The span limit is 366 days, so a whole season fits in one date range. Page through it withskip:
limit=100.
Fetching a single event
If you already have an event ID,/v3/historical/odds returns the closing odds for that one event.
Query Parameters
markets is worth doing even when you do not strictly need it. A busy football match carries hundreds of markets per bookmaker, so filtering server-side keeps responses small.
Finding events
/v3/historical/events returns settled events for one league and date range, with final scores. Use it when you want results and fixtures rather than odds.
Events also carry numeric homeId and awayId team ids, matching /v3/participants and the live /v3/events ids. Coverage: roughly 90% of events from March 2026 onward, partial for February 2026, and not available before that. Rows without a resolved id omit the two fields.
Query Parameters
Searching events by team
/v3/historical/events/search finds settled events by team name across all leagues, so you don’t need to know which league a match was in. Results come back newest first with final scores, in the same shape as /v3/historical/events.
Query Parameters
/v3/historical/odds to pull closing odds for a match you found by name.
Limits
Plan access
/v3/historical/events, /v3/historical/events/search and /v3/historical/odds are available on every plan, including the free one, so you can evaluate the data before committing.
/v3/historical/closing-lines is a paid feature. Free plans calling it get a 403 explaining the alternative. You can upgrade in the dashboard.
Notes on the data
Closing odds go back to December 2025. Events before that are returned by/v3/historical/events with their scores, but carry no odds, so they come back with an empty bookmakers object.
Only events with a status of settled are returned. If a match has finished but has not settled in our pipeline yet, it will not appear.
The core market names are the same across sports: ML, Totals and Spread, each with half-time variants such as ML HT and Totals HT.
Beyond those, availability depends on the sport. Football adds Correct Score, Both Teams To Score, Double Chance, Half Time / Full Time and European Handicap. Basketball adds Player Props and 3-Way Result. Tennis uses Totals (Games) and Spread (Games) alongside per-set markets like ML 1st Set. Baseball names its first five innings in full rather than with the HT suffix: First 5 Innings ML, First 5 Innings Spread and First 5 Innings Totals.
Matching is case-insensitive, so ml and ML both work, but the name must match in full. There is no market called “Match Winner”, and no bare “Over/Under” or “Asian Handicap”, though longer names such as Goals Over/Under and Alternative Corners do exist. Call GET /v3/markets?sport=<sport> for the exact names a sport serves.
To see exactly which markets an event carries, call /v3/historical/odds for it without a markets filter.