MLB team_starting_lineup_batters API
team_starting_lineup_batters
mlb.team_starting_lineup_battersEach batter in each MLB starting lineup — position in the order (1 through 9), defensive position, and batting handedness for the day.
GET/api/v1/mlb/team_starting_lineup_battersList team_starting_lineup_batters for MLB
Requires one of:
team_starting_lineup_id — requests satisfying none of these return 400.Parameters
team_starting_lineup_idquerybigintoptionalFilter to a single starting lineup.
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_lineup_batters?team_starting_lineup_id=1'Responses
200team_starting_lineup_batters rows matching the declared filter set, wrapped in { team_starting_lineup_batters, 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(5 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
idkey | bigint | — | Primary Key |
player_id | bigint | — e.g. 1040 | |
team_starting_lineup_id | bigint | — e.g. 1 | |
batting_order | string | — | — e.g. 1 |
position | string | — | — Values:SS3BRF2BCF1BLFCDHPPHPR |
GET/api/v1/mlb/team_starting_lineup_batters/{id}Get a single team_starting_lineup_batter by id
Parameters
idpathbigintrequiredPrimary key (id) of the team_starting_lineup_batter 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_lineup_batters/{pk_value}'Responses
200Single team_starting_lineup_batter row.application/jsonshow example ▸
404Row not found.
Response Schema(5 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
idkey | bigint | — | Primary Key |
player_id | bigint | — e.g. 1040 | |
team_starting_lineup_id | bigint | — e.g. 1 | |
batting_order | string | — | — e.g. 1 |
position | string | — | — Values:SS3BRF2BCF1BLFCDHPPHPR |