Discovery

Events of a sport

The events on the matched boards under one sport key or prefix, with the boards carrying each. Free. Paged 250 at a time in (kick-off, id) order; a cursor resumes strictly after the last event it saw, so an event whose kick-off moves across the cursor during a walk can appear twice or be missed: dedupe by id and take a missed event on the next walk. A cursor expires 300 s after it was issued. region missing means uk.

get/v2/events

Request

  • Base URL: https://api.oddsrelay.io
  • URL: https://api.oddsrelay.io/v2/events
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Query parameters

regionstring

ONE lowercase region code (/v2/regions lists yours). Missing means uk: on a data route only when your key covers uk, else 400 region_required naming a code your key has; on discovery and keyless routes always. A comma list, the parameter sent twice or an uppercase code is 400 bad_request; an unknown code, or one with no live bookmaker here, is 404 unknown_region.

format'envelope' | 'bare'

envelope (default): {meta, data}. bare: the data array alone, meta moved to X-* headers.

dateFormat'iso' | 'unix'

iso (default, ISO-8601 UTC) or unix (integer epoch seconds) for commence_time, processed_at and last_update. standard and dutching serve iso only: anything else is 400.

cursorstring

The previous page's meta.next_cursor (or X-Next-Cursor). A cursor is bound to no account and expires 300 s after it was issued: 400 cursor expired: start again from the first page; any other shape 400 cursor not recognised: start again from the first page.

sportstring required

Required: a sport key or a prefix of one as /v2/sports lists them. A competition key (an event's competition_key, listed on /v2/sports) returns every event of that competition, whatever its venues call it. Any other key returns what it returned before, plus every event a venue files under a key it begins (each venue names its league its own way), and, when every event that key has ever named belongs to ONE competition, the rest of that competition. Missing is 400 missing_param; unknown 400 unknown_sport with valid.

eventIdsstring

Comma-separated, at most 50 event ids.

commenceTimeFromstring

Events kicking off at or after this ISO-8601 instant (no offset = UTC; a fraction of a second rounds up). Not ISO-8601 is 400; on the matched boards a From after To is 400.

commenceTimeTostring

Events kicking off at or before this ISO-8601 instant (no offset = UTC).

Response

A page. Gzip unless refused (over 1 kB).

OR

Changes

No recorded changes to this operation across all 1 revision of this API.