API Reference
The racing twins of Events (EPK) and
Get Markets. Until now every racing call
(/v3/price) dispatched a scrape to your own running
session. These two read what the server already holds — no session, no
scrape on your account:
GET /v3/races — discover races. Returns each race's pk, the
identity string Place Bet,
Price Check and
/v3/price all prefer over spelled-out
track + race_num + race_type + date.GET /v3/race_markets — one bookie's win/place card on one race,
served from our own live cache.Ante-post markets (Melbourne Cup, Golden Slipper, ... before the day) are not races in this list: see Racing Futures.
Base URL: https://api.b337.ai · Header: X-API-Key: YOUR_API_KEY
GET /v3/races — find a race's pkA pk looks predictable — flemington/7/(R)/au/2026-10-01 — but building
one from names means guessing our track slugging. This endpoint makes it
something you select, not something you spell.
| Param | Type | Default | Description |
|---|---|---|---|
date | string | — | Race day, YYYY-MM-DD. |
country | string | — | e.g. au, nz, gb, us (Great Britain is gb, not uk). |
race_type | string | — | R thoroughbred, G greyhound, H harness ((R)/(G)/(H) also accepted). |
track | string | — | Case-insensitive substring, e.g. flemington. |
book | string | — | Only races this bookie has been matched onto. |
limit | int | 200 | Max rows (1–1000). truncated: true means there were more. |
Filters AND together. Results are next-to-go ordered: upcoming races first (soonest at the top), then already-jumped races most-recent first.
track is the display name ("Wentworth Park") — the slug lives in the
pk. race_num is a string ("5"); cast it if you compare numbers.
books is which bookmakers our system has matched onto this race — the
valid values for /v3/race_markets' bookie param.
GET /v3/race_markets — one book's card on one race| Param | Type | Required | Description |
|---|---|---|---|
pk | string | ✅ | From GET /v3/races. |
bookie | string | ✅ | e.g. sportsbet. One of the race's books. |
win/place null means we hold no live price from
this book right now (their card not scraped yet, or the runner is
scratched) — it does not mean the book refuses the bet.
Greyhound and harness cards are usually listed hours before the books
price them, so priced: 0 early in the day is normal: read the card
again closer to the jump.win/place are the book's fixed odds only. A book that sells a
race on the tote only never has a fixed price to show, so it stays
covered: true, priced: 0 right up to the jump. The common case is
TAB on Hong Kong racing: TAB offers no fixed odds there (tote only), so
use sportsbet, bet365 or another book for an HK win/place price.
Tote dividends are not served on this surface.number is the saddlecloth / box number from the official card;
null only when that card has not been read yet.covered: false means our system has never matched this bookie onto the
race at all — a different answer from "matched but nothing priced yet"
(covered: true, priced: 0).race_status SUSPENDED/CLOSED or in_play: true means the race
has jumped. OPEN means it has not (a late-running race stays OPEN
past its scheduled time). null means unknown — fall back to
time_until_secs.bookie
must be a bookmaker.paddypower, matchbook, smarkets, betwinner,
7betuk, wildz, sportsbetio, tenbetuk, sportiumes, betmorph, ladbrokesbe, skybet): we show its prices for comparison, but no account can bet it,
so bookie=paddypower answers 422 and it is never one of a race's books.bookie=tab, information only)With bookie=tab, the response also carries TAB's tote estimates when TAB
has published pools for the race: a top-level tote block and a tote field
on every runner. They are TAB's own approximate dividends per $1 (stake
included), one set per TAB tote pool (nsw, vic).
win, place, priced or covered, and
Place Bet does not take tote bets.win/place stay null and priced is 0, but tote is filled.tote is null when it is scratched or has no money on it yet.
The tote block is absent when TAB has no pools for the race (not a TAB tote
race, or its pools are not open yet). Coverage: AU, NZ and HK races.Prices here are a read of our cache, not a quote. To place, send
Place Bet with category: "racing",
the race identity (this pk works), the runner, and
market: "win" or "place" — placement still runs through one of
your sessions, which re-checks the live price against target_odds.
GET /v3/races/{pk}/extras — extra markets (Head to Head, Insure, Half vs Half ...)The markets that sit beside win/place on a race: Head to Head, Odds vs Evens,
Half vs Half, Favourite vs Field, Betting Without, the Insure family, Back the
Field, Diamond in the Roughies, Inside vs Outside. Served from our own store —
no session, no scrape on your account. Books that publish them today:
sportsbet, tab, tabtouch, betr, betright. One call returns every
book's version of a market merged together: the same bet at several books is
ONE market with a price per book on each selection, so you can compare prices
and pick the book. pk is the pk from GET /v3/races; it contains
slashes, so put it in the path as-is
(/v3/races/flemington/7/(R)/au/2026-10-01/extras).
market is our name for the market, the same for every book:
h2h, odds_vs_evens, half_vs_half, fav_vs_field, betting_without,
insure_2, insure_3, insure_2_3, inside_vs_outside,
diamond_in_the_roughies, back_the_field. insure_2_3 (one bet refunded
on a 2nd OR 3rd placing) is a different bet from insure_2 and insure_3
and is never merged with them. market is null for a market we have not
named yet; label always carries the bookmaker's own wording, and an unnamed
market is not merged across books (it carries a site field instead).group_key tells apart markets that share a name, and is built from the
runners, so every book's version of the same bet gets the same key. h2h:
"3v7" is the market between runners 3 and 7. betting_without: "w4" is
without runner 4 ("w?" when the book does not say which). half_vs_half:
the two halves, "1,2,3,4,5,6|7,8,9,10,12,13". fav_vs_field: "f4" is the
favourite, runner 4. insure_2 / insure_3 / insure_2_3: "2" / "3" /
"23". Identify a market by (market, group_key).runner_number / runner are null for outcomes that are not a runner.
Those carry outcome: odds, evens, field (the rest of the field), or
a half's runner numbers ("1,2,3,4,5,6").books.<bookie> is that book's own price and ids for the selection.
status is S for a scratched / excluded runner (its price is null),
A when open, U when the book has the selection suspended.
pp_price is the boosted price when the book is running one. rules is the
book's own rule text when it publishes one, else null. A book that does not
offer a selection is simply absent from books.sources lists which books contributed and when each was last read;
fetched_at is the newest.available: false with an empty markets means we hold nothing for this
race (not scraped yet, or the race is over). 404 is an unknown pk.Pick the book you want from a selection's books and send
Place Bet (POST /v3/place_bet) with
category: "racing", the race pk, and that book's ids:
| Field | Value |
|---|---|
extra_market | true |
extra_market_id | books.<bookie>.market_id |
extra_selection_id | books.<bookie>.selection_id |
extra_market_name | the market's label (labels.<bookie>) |
The ids are only valid at the book they came from. The bet is placed through one
of your sessions at that book (so you need an account there), which
re-checks the live price against your target_odds. auto_lay is not supported
on extra markets. Placing an extra is supported on Sportsbet sessions only. For
the other books, reading and comparing prices is live, but extra_market: true
through a session at any other book is refused with 400 ("racing extra-market
bets are only supported on Sportsbet sessions").
As a multi leg (Sportsbet only). An extra can also be one leg of a
category: "multi" bet, e.g. a "Diamond in the Roughies" leg plus a sports leg.
Send it as a racing leg with track, race_num, race_type, date,
runner (the selection's label), plus the same four extra_* fields on the
leg. It is always priced as a win leg. A multi carrying an extra leg is refused
with 400 on any session that is not Sportsbet, and a leg with no
extra_selection_id is refused too.
These endpoints are limited per API key (default 60 requests/min each).
Over the limit you get 429 with a Retry-After header and
{"error": "rate limit exceeded for ...", "retry_after_seconds": N}. A
race's card changes on a scrape cycle (seconds to minutes), not per second —
cache what you read.
| Status | When | Body |
|---|---|---|
401 / 403 | Invalid key / no valid subscription | {"detail": "..."} |
404 | race_markets: unknown pk | {"detail": {"error": "unknown pk: '...'", "hint": "list valid pks with GET /v3/races"}} |
422 | race_markets: bookie is an exchange (betfair) or a reference-only book; a required param missing; limit out of range | {"detail": {"error": "...", "hint": "..."}} |
429 | Rate limit | see above |
503 | Our race cache is temporarily unavailable | {"error": "redis unavailable"} |
/v3/races/v3/race_markets