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 readable public id (e.g. NBA_GSW_MIA_20250408, case-insensitive) — discover ids via /v1/games.
HTTP Range requests are honored (206 with Content-Range; partial responses are never cached). Metering: each request debits the artifact’s full row count from the monthly quota — a partial (Range) read is still a read.
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”Public game id (e.g. NBA_GSW_MIA_20250408, case-insensitive).
Public 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 (also the amount debited from the monthly quota).
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 has no entitled tier — subscription lapsed or absent (problem type subscription-required; the body carries an 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), or the requested range exceeds the tier’s history window (history-restricted).
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’), 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, monthly row quota, or ops throttle — the problem type distinguishes rate-limited, quota-exhausted, and throttled.
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"}