MLB game_lines API
game_lines
mlb.game_linesMLB game betting lines — moneylines, run lines (the baseball point-spread equivalent), and over/under totals from sportsbooks, captured over time as the lines move from opening to closing. In MLB, spread = run line (typically +/- 1.5).
GET/api/v1/mlb/game_linesList game_lines for MLB
Requires one of:
game_id — requests satisfying none of these return 400.Parameters
game_idquerybigintoptionalFilter to a single game.
limitqueryintegeroptionaldefault 50Page size. Defaults to 50; max 5000.
from_idquerybigintoptionalReturn rows with id strictly greater than this value; page using the previous response's `next_from_id`. Omit on the first page.
Restores the documented defaults (trial keys only accept the unchanged defaults).
Request
curl -sS --compressed \
-H 'Authorization: Bearer YOUR_API_KEY' \
'https://api.stat-api.com/api/v1/mlb/game_lines?game_id=1'Responses
200game_lines rows matching the declared filter set, wrapped in { game_lines, limit, next_from_id }. next_from_id is the last row's id on a full page — pass it back via ?from_id= to walk the full result; null marks the terminal page.application/jsonshow example ▸
400No declared filter set was satisfied — response body matches MissingRequiredFiltersError; pick one combo from the accepted-sets hint and resend.
application/jsonResponse Schema(18 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
idkey | bigint | — | Primary Key |
game_id | bigint | — e.g. 168105 | |
operator_id | bigint | Data source (consensus, DraftKings, FanDuel, etc.) e.g. 6 | |
season_id | bigint | Denormalized for efficient season-level queries e.g. 2026 | |
captured_at | timestamptz | — | When this snapshot was captured e.g. 2026-06-21T16:09:37.291Z |
implied_away_score | decimalnullable | — | — e.g. 5.0000 |
implied_away_win_pct | decimalnullable | — | — e.g. 0.4695 |
implied_home_score | decimalnullable | — | Calculated from spread + total e.g. 3.5000 |
implied_home_win_pct | decimalnullable | — | From moneyline, 0-1 e.g. 0.5671 |
is_opening | boolean | — | True if this is the opening line Values:falsetrue |
moneyline_away | integernullable | — | American odds for away team win e.g. 113 |
moneyline_home | integernullable | — | American odds for home team win e.g. -131 |
over_odds | integernullable | — | American odds for over e.g. -110 |
spread | decimalnullable | — | Home team run line (e.g., -1.5 means home favored by 1.5 runs) e.g. 1.5000 |
spread_away_odds | integernullable | — | American odds for away run line e.g. -110 |
spread_home_odds | integernullable | — | American odds for home run line (e.g., -130) e.g. -110 |
total | decimalnullable | — | Combined run total line (e.g., 8.5) e.g. 8.0000 |
under_odds | integernullable | — | American odds for under e.g. -110 |
GET/api/v1/mlb/game_lines/{id}Get a single game_line by id
Parameters
idpathbigintrequiredPrimary key (id) of the game_line row.
Restores the documented defaults (trial keys only accept the unchanged defaults).
Request
curl -sS --compressed \
-H 'Authorization: Bearer YOUR_API_KEY' \
'https://api.stat-api.com/api/v1/mlb/game_lines/{pk_value}'Responses
200Single game_line row.application/jsonshow example ▸
404Row not found.
Response Schema(18 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
idkey | bigint | — | Primary Key |
game_id | bigint | — e.g. 168105 | |
operator_id | bigint | Data source (consensus, DraftKings, FanDuel, etc.) e.g. 6 | |
season_id | bigint | Denormalized for efficient season-level queries e.g. 2026 | |
captured_at | timestamptz | — | When this snapshot was captured e.g. 2026-06-21T16:09:37.291Z |
implied_away_score | decimalnullable | — | — e.g. 5.0000 |
implied_away_win_pct | decimalnullable | — | — e.g. 0.4695 |
implied_home_score | decimalnullable | — | Calculated from spread + total e.g. 3.5000 |
implied_home_win_pct | decimalnullable | — | From moneyline, 0-1 e.g. 0.5671 |
is_opening | boolean | — | True if this is the opening line Values:falsetrue |
moneyline_away | integernullable | — | American odds for away team win e.g. 113 |
moneyline_home | integernullable | — | American odds for home team win e.g. -131 |
over_odds | integernullable | — | American odds for over e.g. -110 |
spread | decimalnullable | — | Home team run line (e.g., -1.5 means home favored by 1.5 runs) e.g. 1.5000 |
spread_away_odds | integernullable | — | American odds for away run line e.g. -110 |
spread_home_odds | integernullable | — | American odds for home run line (e.g., -130) e.g. -110 |
total | decimalnullable | — | Combined run total line (e.g., 8.5) e.g. 8.0000 |
under_odds | integernullable | — | American odds for under e.g. -110 |