MLB team_starting_lineups API
team_starting_lineups
mlb.team_starting_lineupsEach MLB team's starting lineup for each game — the nine batters in batting order plus the starting pitcher (and DH where applicable).
GET/api/v1/mlb/team_starting_lineupsList team_starting_lineups for MLB
Requires one of:
team_id or game_id — requests satisfying none of these return 400.Parameters
team_idquerybigintoptionalFilter by team.
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/team_starting_lineups?team_id=1'Responses
200team_starting_lineups rows matching the declared filter set, wrapped in { team_starting_lineups, 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(6 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
idkey | bigint | — | Primary Key |
game_id | bigint | — e.g. 64 | |
pitcher_id | bigintnullable | — e.g. 50028 | |
team_id | bigint | — e.g. 27 | |
batter_status | integer | — | — e.g. 1 |
pitcher_status | integer | — | — e.g. 1 |
GET/api/v1/mlb/team_starting_lineups/{id}Get a single team_starting_lineup by id
Parameters
idpathbigintrequiredPrimary key (id) of the team_starting_lineup 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/team_starting_lineups/{pk_value}'Responses
200Single team_starting_lineup row.application/jsonshow example ▸
404Row not found.
Response Schema(6 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
idkey | bigint | — | Primary Key |
game_id | bigint | — e.g. 64 | |
pitcher_id | bigintnullable | — e.g. 50028 | |
team_id | bigint | — e.g. 27 | |
batter_status | integer | — | — e.g. 1 |
pitcher_status | integer | — | — e.g. 1 |