MLB innings API
innings
mlb.inningsEach half-inning of every MLB game — runs scored, hits, errors, base traffic, plate appearances, who pitched, and how the offense ended each frame.
GET/api/v1/mlb/inningsList innings 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/innings?game_id=1'Responses
200innings rows matching the declared filter set, wrapped in { innings, 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(10 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
idkey | bigint | — | Primary Key |
game_id | bigint | — e.g. 357 | |
away_team_errors | integer | — | — e.g. 0 |
away_team_hits | integer | — | — e.g. 0 |
away_team_runs | integer | — | — e.g. 0 |
home_team_errors | integer | — | — e.g. 0 |
home_team_hits | integer | — | — e.g. 0 |
home_team_runs | integer | — | — e.g. 0 |
inning_half | string | — | — Values:TOPBOTTOM |
inning_number | integer | — | — e.g. 1 |
GET/api/v1/mlb/innings/{id}Get a single inning by id
Parameters
idpathbigintrequiredPrimary key (id) of the inning 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/innings/{pk_value}'Responses
200Single inning row.application/jsonshow example ▸
404Row not found.
Response Schema(10 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
idkey | bigint | — | Primary Key |
game_id | bigint | — e.g. 357 | |
away_team_errors | integer | — | — e.g. 0 |
away_team_hits | integer | — | — e.g. 0 |
away_team_runs | integer | — | — e.g. 0 |
home_team_errors | integer | — | — e.g. 0 |
home_team_hits | integer | — | — e.g. 0 |
home_team_runs | integer | — | — e.g. 0 |
inning_half | string | — | — Values:TOPBOTTOM |
inning_number | integer | — | — e.g. 1 |