Historical odds, bookmakers and exchanges (`bookmakersOnly=true`: bookmakers alone): the board as of any instant since 2026-10-17 (nothing before 2026-10-15 is ever served), event histories, closing lines, bulk files. Released a UTC day at a time, the night after it (a later instant is 400 `date_out_of_range` with `latest`). Priced in tokens by /v2/pricing `regions.uk.historical` (an international region: its own `regions..historical` block). Each of the 20 international codes is its own archive of its own venues: bookmakers, and in `ca` also STX (`stx_ca`, Ontario's betting exchange, as /v2/odds/raw serves it there: its back prices under each market's key, its lay prices under `_lay`; `bookmakersOnly=true` leaves it out, and a file's `bookmakers_only` says whether the file holds its rows), recorded from 2026-11-16T05:50Z, the lane's first checkpoint (its first day 2026-11-16: an instant before that day is 400 `date_out_of_range` with `earliest` 2026-11-16T00:00:00.000Z, one inside it before the first checkpoint 404 `no_history`), `gr` from its switch-on at 2026-11-16T18:19Z (a `gr` page asked for before it is empty, and free), with uk's tiers, release lag and rules. Exchanges (Betfair Exchange, Smarkets and Matchbook) are recorded from 2026-10-17 (the first whole day is 2026-10-18): each outcome's best back price, best lay price and `available` (the stake at the best lay) — no ladder, no traded volume; snapshots of an instant from 2026-11-06 17:53 UTC on also carry `back_available` (the stake at the best back), change rows do not. BETDAQ, which closed on 2026-10-21, is in no answer. The bulk files and the closing lines hold exchanges too (a file's `bookmakers_only` says whether it holds bookmakers alone). The event `id` is the only safe join between a bulk file, a history reply and the live routes: a file row's `sport_key` is the league recorded when the row was cut, a reply's the league the id is served with, and the two can differ.
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: OddsRelay Historical API
version: '2026-07-08'
x-verified: '2026-11-25'
description: 'The OddsRelay odds API: matched boards, the raw board, discovery, coverage and status, as served at `https://api.oddsrelay.io`. Every route is `GET`; a trailing slash is ignored; an unknown path is 404 `not_found`; any other method is 405 `method_not_allowed` (a `HEAD`''s 405 has no body). A request that carries a body (none is read) is answered with `Connection: close`, and its connection ends. ## Keys
Send the key as `Authorization: Bearer ` or `x-api-key: `, never in the query string. Server keys start `or_live_`; browser and dashboard keys start `or_pub_`, answer only calls from their own website''s `Origin` (else 403 `origin_not_allowed`), and get `Access-Control-Allow-Origin` echoing that exact origin (never `*`). A browser''s CORS preflight (`OPTIONS` with an `Origin`) is answered 204. Keyless routes: `/healthz`, `/v2/status`, `/v2/spotlight`, `/v2/coverage` without a key header, `/v2/openapi.json`. ## Order of checks
The per-address shield (429 `too_many_from_address`), the key (401), the account''s flood cap (429 `too_many_requests`), a suspended account (403 `account_suspended`; `/v2/usage` still answers), a browser key''s website (403), then the route''s own checks, each described on its operation. Every refusal is free. ## Tokens
One token pool per account, reset monthly; a trial''s pool is one-off, so its reset is the trial''s end when that comes first. A call''s price comes from the request (the product and its filters), never from the reply''s size, with one exception: a historical odds file costs `regions..historical.file_per_mb` for every started 1,000,000 bytes of its size. `/v2/pricing` publishes the table, `quote=true` prices any data request for free, and discovery, `/v2/usage`, `/v2/pricing`, 304s, replies with no events and every refusal are free. A price above the balance is 402 `insufficient_tokens`. Every reply to a valid key carries `X-Tokens-Cost`, plus `X-Tokens-Used`, `-Remaining`, `-Limit` and `-Reset` whenever the balance is known (`unlimited` on an unlimited account). ## Flood cap
One cap per account, per 10 seconds and per minute (dashboard keys have their own), plus a cap on requests in flight; `GET /v2/usage` `flood_cap` gives your account''s numbers. Every reply to a valid key after authentication carries `X-RateLimit-Limit`, `-Remaining` and `-Reset` for the window with fewer left; over it is 429 `too_many_requests` with `Retry-After`. Poll as often as your cap allows: the per-address caps sit well above an account''s, so they refuse floods, never a client inside its own cap. The per-address shield answers 429 `too_many_from_address`; the front door''s own per-address cap answers 429 with `Retry-After` and an EMPTY body with no `code`, as does its 502. ## Errors
Every JSON error is `{"error": {"code", "message", "request_id"}}`, plus `type` on a scope 403, `valid` on the four unknown-value 400s and on the four `*_not_in_plan` 403s (`bookmaker_not_in_plan`, `sport_not_in_plan`, `market_not_in_plan`, `exchange_not_in_plan`: outside your plan''s bookmakers or your account''s scope; `GET /v2/usage` shows the scope), `products` on an `unknown_market` that another product carries (the products that carry it), the balance fields on 402 and `reason`/`dashboard_url` on `account_suspended`. Branch on `code`. `request_id` equals the reply''s `X-OddsRelay-Request-Id` (a 405 carries it in the body only). ## Account scope
An account can carry a scope: per product, the sports, markets, bookmakers and exchanges it may read (raw''s one `bookmakers` list names venues of both kinds). A product outside it is 403 `not_in_key_scope` for every key on the account; a value a call names outside it is 403 `sport_not_in_plan`, `market_not_in_plan`, `bookmaker_not_in_plan` or `exchange_not_in_plan` with `valid` (the scope''s list for that product), `quote=true` included; a filter the call leaves out is trimmed to the scope, before the price.'
servers:
- url: https://api.oddsrelay.io
security:
- bearerAuth: []
- apiKeyHeader: []
tags:
# --- truncated at 32 KB (146 KB total) ---
# Full source: https://artifacts.apis.io/oddsrelay/openapi/oddsrelay-historical-api-openapi.yml