Skip to content
Product Documentation

Download a dataset's per-game Parquet artifact.

GET
/v1/games/{game_id}/{dataset}
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.

game_id
required

Public game id (e.g. NBA_GSW_MIA_20250408, case-insensitive).

string

Public game id (e.g. NBA_GSW_MIA_20250408, case-insensitive).

dataset
required

Dataset name from /v1/datasets.

string
Allowed values: closing-lines game-state-timeline market-results sportsbook-lines

Dataset name from /v1/datasets.

Range

Standard HTTP byte range, e.g. bytes=0-65535. Satisfiable ranges return 206.

string
Example
bytes=0-65535

Standard HTTP byte range, e.g. bytes=0-65535. Satisfiable ranges return 206.

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).

Media typeapplication/vnd.apache.parquet
string format: binary

The requested byte range of the artifact (Content-Range set). Never served from the edge cache.

Media typeapplication/vnd.apache.parquet
string format: binary

Validation failed — unknown or invalid query parameter, or a malformed range (problem type validation-error).

Media typeapplication/problem+json

RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.

object
type
required

Stable problem type URI.

string
title
required

Short human-readable summary.

string
status
required

HTTP status code.

integer
detail

Explanation specific to this occurrence.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example"
}

Missing, malformed, or unrecognized API key (problem type invalid-key).

Media typeapplication/problem+json

RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.

object
type
required

Stable problem type URI.

string
title
required

Short human-readable summary.

string
status
required

HTTP status code.

integer
detail

Explanation specific to this occurrence.

string
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).

Media typeapplication/problem+json

RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.

object
type
required

Stable problem type URI.

string
title
required

Short human-readable summary.

string
status
required

HTTP status code.

integer
detail

Explanation specific to this occurrence.

string
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).

Media typeapplication/problem+json

RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.

object
type
required

Stable problem type URI.

string
title
required

Short human-readable summary.

string
status
required

HTTP status code.

integer
detail

Explanation specific to this occurrence.

string
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 for this game’; artifacts appear shortly after a game settles), or a game still being served live (problem type not-final, with game_id and the live.segments / live.board URLs).

Media typeapplication/problem+json

RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.

object
type
required

Stable problem type URI.

string
title
required

Short human-readable summary.

string
status
required

HTTP status code.

integer
detail

Explanation specific to this occurrence.

string
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.

Media typeapplication/problem+json

RFC 9457 problem details. Dispatch on the stable type URI (https://api.betflux.ai/problems/*), never on the English title.

object
type
required

Stable problem type URI.

string
title
required

Short human-readable summary.

string
status
required

HTTP status code.

integer
detail

Explanation specific to this occurrence.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example"
}