Overview
BetFlux continuously scrapes US sportsbooks, stores every raw response, and normalizes changes into versioned analytical tables. What the API serves are per-game Parquet artifacts of those tables — immutable, precomputed files, one per (dataset, game), streamed byte-for-byte. Nothing is computed at request time; you (or the SDK) query the files locally.
Four datasets are live, all at GET /v1/games/{game_id}/{dataset}:
| Dataset | Grain | Rows / game (typ.) |
|---|---|---|
| closing-lines | (game, operator, market, selection, side) | ≈ 12,000 |
| market-results | graded (game, operator, market, selection) | ≈ 12,000 |
| sportsbook-lines | every change-only line observation | ≈ 190,000 |
| game-state-timeline | state observation (ts, field, value) |
small |
The workflow is uniform: discover game ids via
/v1/games (league, ET date range,
team, status), fetch each game’s file, query locally. The
CLI and SDK wrap that loop behind familiar
query interfaces.
Discovery endpoints
Section titled “Discovery endpoints”The registry is queryable, so you can enumerate datasets and their schemas without leaving the API (both endpoints are public — no key needed):
curl -s https://api.betflux.ai/v1/datasetscurl -s https://api.betflux.ai/v1/datasets/closing-lines/schema/v1/datasets lists each dataset’s name, covered leagues, content type, and
column names. /v1/datasets/{name}/schema returns the row shape as JSON
Schema — the same column descriptions rendered in these docs.
Change-only storage
Section titled “Change-only storage”Odds are recorded change-only: a new record exists only when something
meaningful moved. Counts like pre_game_records and line_move_count count
those change records, not polls — a market that never moved has one record no
matter how long it was live. This is also why sportsbook-lines is the size it
is: ~190k rows per game is every observed change across every market a book
offered, not a fixed-interval sampling.
Artifacts are immutable and versioned
Section titled “Artifacts are immutable and versioned”Each artifact is derived from a versioned analytical table and regenerated —
never edited — when upstream data or logic changes. Responses carry an ETag
(the artifact’s content hash) so you can cheaply detect a regeneration.
Artifacts appear shortly after a game settles; before that, the dataset
endpoint returns an honest 404
(see errors).