Historical

Download one bulk file

Changed on

The file's bytes, application/gzip (a gzip CSV: save it as it comes, do not decompress in transit), with Content-Disposition: attachment; every bookmaker and exchange of its sport (BETDAQ never; its listing's bookmakers_only says whether it holds bookmakers alone). A day file never changes once cut, so it is sent with a long private cache, Cache-Control: private, max-age=86400, immutable (a re-cut changes its ETag). A day before 2026-10-15 is 400 date_out_of_range; an unknown file 404 not_found. A day file holds every bookmaker and market of its sport, so an account whose scope narrows historical, or whose plan names a bookmaker list, is 403 files_need_whole_scope (contact OddsRelay to arrange files). THE DOWNLOAD CAP: a download is sent at a capped rate, and only so many run at once for an account and in all; one more is 429 too_many_downloads with Retry-After, answered at once (it never waits): retry after that many seconds.

Price: /v2/pricing regions.uk.historical.file_per_mb (an international region: its own regions.<code>.historical.file_per_mb) tokens per started 1,000,000 bytes served (the listing's size); quote=true prices it, free; a 304 is free.

get/v2/historical/files/{tier}/{sport}/{file}

Request

  • Base URL
    https://api.oddsrelay.io
  • Auth
    • HTTP bearer
    • or API key in header x-api-key

Path parameters

tier, 'closing' | '60s' | '5s' | '1s' | 'changes' required

closing, 60s and changes nightly; 5s and 1s where cut by arrangement.

sport, string required
file, string required

Query parameters

region, 'uk' | 'za' | 'ng' | 'us' | 'tz' | 'ke' | 'gh' | 'au' | 'ca' | 'zm' | 'ug' | 'cm' | 'ci' | 'sn' | 'cd' | 'mz' | 'mw' | 'nz' | 'rw' | 'global' | 'gr' | 'cz'

uk, the archive's own region (default), or one international code. Each international code 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 <key>_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), cz from its first rows in December 2026 (likewise empty, and free, before them), with uk's tiers, release lag and rules. Outside the regions your key reads: 403 region_not_in_scope; any other code is 404 unknown_region.

quote, string

true (also 1, yes, on): price this exact request instead of serving it. 200 {cost, remaining, rate_card}, free, every check before the price still applies; any other value is an ordinary request.

Response

The file (application/gzip, sent at the download cap's rate), or under quote=true its price.

Quote required

quote=true: this request's price. Free.

cost, integer required
remaining, union required

Tokens left, unlimited, or null when unknown.

rate_card, string required

Changes

    • info

      added the new enum value cz to the query request parameter region

    • info

      added the new enum value au to the query request parameter region

    • info

      added the new enum value ca to the query request parameter region

    18 more changes in this revision