---
title: "API overview"
description: "The Betwatch Racing API — base URL, authentication, conventions, and the bootstrap-then-follow workflow."
---

> Documentation Index
> Fetch the complete documentation index at: https://beta.betwatch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# API overview

Australian, New Zealand, and international racing, as JSON over HTTP: every race, every runner, and every bookmaker, tote, and exchange price we track, live.

Manage keys and plans in the app at [Account → API](https://beta.betwatch.com/account/api). For pricing and product context, see [Odds API](https://beta.betwatch.com/odds-api).

## Base URL

```
https://api-beta.betwatch.com/v2
```

Every path in these docs is relative to that.

> **Looking for every parameter and field?**
>
> These pages explain how the API works and how to use it well. The [interactive API reference](https://beta.betwatch.com/api/docs) lists every endpoint, parameter, response field, and error, generated from the contract the server actually serves — with a request builder to try calls. The raw OpenAPI document is at [`/openapi.json`](https://api-beta.betwatch.com/openapi.json) on the API host.

## For AI agents

To let your assistant query races and prices directly, connect the
[Betwatch MCP server](/docs/api/mcp) using your API key.

Give your coding agent these machine-readable docs. No sign-in is required to read them:

- [API index (llms.txt)](/docs/api/llms.txt): Start here for API guides and the contract.
- [Full documentation (llms-full.txt)](/docs/llms-full.txt): All public documentation in one file.
- [OpenAPI schema (JSON)](https://api-beta.betwatch.com/openapi.json): Endpoints, parameters, and response schemas.

## Your first request

Send your key in the `X-API-Key` header. Nothing else is required.

```bash
curl 'https://api-beta.betwatch.com/v2/events?limit=5' \
  --header 'X-API-Key: YOUR_API_KEY'
```

```json
{
  "items": [
    {
      "id": "evt_7Kd2mQx4TnPbW9sVfHjLcR",
      "meetingId": "mtg_3Nb8xKpQ2mVfTdRcHjW5Ls",
      "venueId": "ven_9Rq4TmXkPb2NdVfHcJsW7L",
      "sport": "thoroughbred",
      "status": "scheduled",
      "name": "Randwick R1",
      "startAt": "2026-08-17T04:15:00Z",
      "racing": { "number": 1 }
    }
  ],
  "next": "lst_eyJjb2xsZWN0aW9uIjoiZXZlbnRzIiwicG9zaXRpb24iOiJldnRfN0tkMm1..."
}
```

`next` pages this collection; it is not a stream cursor. Use a snapshot endpoint for the `stream` continuation, including its ready-to-connect `stream.url`.

## Snapshot, then follow

The API is built around one workflow, and following it is the difference between a fast integration and a slow one.

1. **Snapshot the races you want**

   `GET /events/snapshot?sport=thoroughbred&country=au` returns current state for a page of races — field, every source's price, and coverage — plus the `cursor` to follow them. Page until `next` is absent. For one race, `GET /events/{id}/snapshot` does the same thing.
2. **Follow the changes instead of polling**

   Connect to `GET /stream` with `snapshot=none`, that `cursor`, and the filters the snapshot named. You receive changes from exactly the instant the snapshot was taken, with no gap and no missed price. Frames are not metered. See [Streaming](/docs/api/streaming).
3. **Query when you need to, not on a loop**

   `GET /events` for discovery and `GET /odds` for prices are there when you need a specific answer — a search, a page load, a backfill. They are not how you stay current; the stream is.

Polling is the expensive way to stay current and the slowest to see a move. Snapshot once, then follow.

This recommendation applies to live prices and the core changes the stream carries, not every REST enrichment field. Keep form, silks, breeding and dividends fresh with separate [racing enrichment reads](/docs/api/races#includeracing) when your application needs them. Periodic snapshots are also valid when periodic observations are sufficient; budget their quota cost.

Using Python? The [Python SDK on GitHub](https://github.com/betwatch/betwatch-sdk-python/tree/beta) provides installation instructions, snapshot and streaming usage, and runnable examples.

## Conventions

- **JSON** — request and response bodies are JSON. Send `Accept: application/json`.
- **Identifiers are opaque.** `evt_`, `ent_`, `cmp_`, `ven_`, `mtg_`, and `odd_` prefixes tell you what kind of thing an id names. Everything after the prefix is ours: do not parse, split, validate, or construct one. Pass back exactly what we gave you.
- **Timestamps** are RFC 3339 in UTC, for example `2026-08-17T04:15:00Z`.
- **Errors** are RFC 9457 problem documents with a stable `code` to branch on. See [Errors](/docs/api/errors).
- **Collections** are cursor-paginated. Follow `next` rather than building page parameters. See [Pagination](/docs/api/pagination).
- **Empty collections are `[]`, never `null`.** Every array in every response is present and initialised, so you never have to model absent-versus-empty-versus-null. The contract declares this, so a generated client can rely on it.
- **Unknown fields** may appear at any time. Ignore the ones you do not recognise.

## Guides

- **API reference** — Every endpoint, parameter, and field.
  [API reference →](https://beta.betwatch.com/api/docs)
- **Authentication** — Keys, plans, and scopes.
  [Authentication →](/docs/api/authentication)
- **Errors** — The problem document and every error code.
  [Errors →](/docs/api/errors)
- **Rate limits and quota** — What you can ask for, how fast, and how to back off.
  [Limits →](/docs/api/limits)
- **Pagination** — Cursors, ordering, and page size.
  [Pagination →](/docs/api/pagination)
- **Races and runners** — Events, entrants, and competitors.
  [Races →](/docs/api/races)
- **Prices** — Odds, coverage, and price history.
  [Prices →](/docs/api/prices)
- **Catalogue** — Meetings, venues, and sources.
  [Catalogue →](/docs/api/catalogue)
- **Streaming** — Live changes over Server-Sent Events.
  [Streaming →](/docs/api/streaming)
- **Stability** — What we promise not to change.
  [Stability →](/docs/api/stability)
- **Changelog** — Every contract change and what to do about it.
  [Changelog →](/docs/api/changelog)

Source: https://beta.betwatch.com/docs/api/index.mdx
