STAT-API

MLB game_lines API

game_linesmlb.game_lines
MLB 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_lines
Requires one of: game_id — requests satisfying none of these return 400.
Parameters
game_idquerybigintoptional
Filter to a single game.
limitqueryintegeroptionaldefault 50
Page size. Defaults to 50; max 5000.
from_idquerybigintoptional
Return 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/json
Response Schema(18 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
game_id
bigint—
e.g. 168105
operator_id
bigintData source (consensus, DraftKings, FanDuel, etc.)
e.g. 6
season_id
bigintDenormalized 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}
Parameters
idpathbigintrequired
Primary 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 ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
game_id
bigint—
e.g. 168105
operator_id
bigintData source (consensus, DraftKings, FanDuel, etc.)
e.g. 6
season_id
bigintDenormalized 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