---
title: "Download one bulk file"
method: GET
path: "/v2/historical/files/{tier}/{sport}/{file}"
tags: ["Historical"]
---

# Download one bulk file

`GET /v2/historical/files/{tier}/{sport}/{file}`

## Request

- Base URL: `https://api.oddsrelay.io`
- URL: `https://api.oddsrelay.io/v2/historical/files/{tier}/{sport}/{file}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

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.

## Path parameters

- `tier` 'closing' | '60s' | '5s' | '1s' | 'changes', required
- `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'
- `quote` string

## Response `200`

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

- Quote: `quote=true`: this request's price. Free.
  - `cost` integer, required
  - `remaining` union, required: Tokens left, `unlimited`, or null when unknown.
    - integer
    - string
  - `rate_card` string, required

## Other responses

- `304`: Not modified (`If-None-Match` matched the file's `ETag`): no body, free, the same long cache.
- `400`: 400: a parameter this route does not read or sent twice, a malformed value, gzip refused on standard, dutching or raw, or a filter value the catalogue does not know.
- `401`: 401: no key, or a key that is not accepted. Carries `WWW-Authenticate`; no token or flood-cap headers.
- `402`: 402 `insufficient_tokens`: the price is above the balance. Price it first with `quote=true`.
- `403`: 403: the account, the key's scope, the region, the plan or the account's scope refuses this call.
- `404`: 404.
- `429`: 429 with `Retry-After`. `too_many_requests`: the account's flood cap or its in-flight cap (with `X-RateLimit-*`). `too_many_from_address`: the per-address shield, before authentication (no token or flood-cap headers). The front door's own per-address cap also answers 429 with `Retry-After`, but with an EMPTY body and no `code`. Both per-address caps sit well above an account's flood cap.
- `500`: 500 `internal_error`. If it came after a spend, `X-Tokens-Cost` reads 0 and the spend stands.
- `503`: 503 with `Retry-After`: `temporarily_unavailable` (a board, the key registry or a connection is not ready; retry) or `raw_not_enabled` (the key may use raw but the raw board is not held here).

## Changes

- **2026-12-03** `c9a116d43241`: 1 info
  - added the new enum value `cz` to the `query` request parameter `region`
- **2026-11-18** `e28e311eeb1e`: 20 info
  - added the new enum value `au` to the `query` request parameter `region`
  - added the new enum value `ca` to the `query` request parameter `region`
  - added the new enum value `cd` to the `query` request parameter `region`
  - added the new enum value `ci` to the `query` request parameter `region`
  - …16 more
- **2026-10-26** `9db71e3e29bb`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/oddsrelay/apis/oddsrelay-api/changes/v2/historical/files/:tier/:sport/:file/get.md)

---

[API](https://skmtc.dev/oddsrelay/apis/oddsrelay-api.md) - [All operations](https://skmtc.dev/oddsrelay/apis/oddsrelay-api/llms.txt) - [OpenAPI document](https://skmtc.dev/oddsrelay/apis/oddsrelay-api/revisions/c9a116d43241?raw)
