Download a dataset's per-game Parquet artifact.
const url = 'https://api.betflux.ai/v1/games/example/closing-lines';const options = { method: 'GET', headers: {Range: 'bytes=0-65535', Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.betflux.ai/v1/games/example/closing-lines \ --header 'Authorization: Bearer <token>' \ --header 'Range: bytes=0-65535'Streams the game’s Parquet file (application/vnd.apache.parquet) for the named dataset. The server serves bytes only — query the file locally with DuckDB or pyarrow; filtering happens client-side.
Datasets: closing-lines, game-state-timeline, market-results, sportsbook-lines (discover via /v1/datasets). Per-dataset row schemas are published as the OpenAPI components ClosingLinesRow, GameStateTimelineRow, MarketResultsRow, SportsbookLinesRow and served by /v1/datasets/{name}/schema.
game_id is the game id (e.g. NBA_GSW_MIA_20250408, case-insensitive) — discover ids via /v1/games. A trial key (the free sample) reads only games dated the first Saturday of a month or the Sunday after it, by the date in the id; any other date is 403 history-restricted with upgrade_url and sample: "first-weekend", answered before the cache or the file is touched.
HTTP Range requests are honored (206 with Content-Range; partial responses are never cached). Metering: a successful read counts the game once per billing period, whatever the dataset, byte range or cache state, and every later read of a counted game is free. On a capped plan the response reports what it cost: X-Betflux-Game (new, already or exempt) and X-Betflux-Games-Remaining.
Live games: sportsbook-lines is also served before it settles. When the final artifact does not exist yet but the game is being served live, the 404 carries problem type not-final with the game’s /sportsbook-lines/segments and /sportsbook-lines/board URLs. The final artifact wins the moment it exists.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Game id (e.g. NBA_GSW_MIA_20250408, case-insensitive).
Game id (e.g. NBA_GSW_MIA_20250408, case-insensitive).
Dataset name from /v1/datasets.
Dataset name from /v1/datasets.
Header Parameters
Section titled “Header Parameters”Standard HTTP byte range, e.g. bytes=0-65535. Satisfiable ranges return 206.
Example
bytes=0-65535Standard HTTP byte range, e.g. bytes=0-65535. Satisfiable ranges return 206.
Responses
Section titled “Responses”The complete Parquet artifact. ETag is the artifact’s content hash; Accept-Ranges: bytes; X-Betflux-Rowcount is the artifact’s row count; X-Betflux-Dataset-Version is the version the game’s file was built at — games in one pull can differ within a compatibility line (see versions on /v1/datasets; the file’s dataset_version column says the same).
The requested byte range of the artifact (Content-Range set). Never served from the edge cache.
Validation failed — unknown or invalid query parameter, or a malformed range (problem type validation-error).
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}Missing, malformed, or unrecognized API key (problem type invalid-key).
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}The key is valid, but the account has no active subscription (problem type subscription-required). The response includes upgrade_url.
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}API key revoked or suspended (problem type key-disabled); a feature the plan does not include (problem type plan-excludes, with feature — live for the live sportsbook-lines routes, league_datasets for league-scoped datasets — required_tiers and upgrade_url; never worth retrying on the same key); or a game outside the key’s history window (problem type history-restricted): a trial key reads only games dated the first Saturday of a month or the Sunday after it, and its 403 carries upgrade_url and sample: "first-weekend".
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}Unknown dataset name (‘Unknown dataset’), a sports dataset (reason msf_dataset, with its snapshot route), unresolvable game id (‘Game not found’), a league outside the dataset’s coverage, a resolved game with no artifact (‘No not-final, with game_id and the live.segments / live.board URLs).
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}Rate limit, games allowance, or ops throttle — the problem type distinguishes rate-limited, quota-exhausted and throttled. quota-exhausted refuses only a new game past the period’s allowance (games already counted stay readable) and carries reset_at, upgrade_url, game_id, games_used and games_allowance.
RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.
object
Stable problem type URI.
Short human-readable summary.
HTTP status code.
Explanation specific to this occurrence.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}