STAT-API

MLB team_starting_lineup_batters API

team_starting_lineup_battersmlb.team_starting_lineup_batters
Each 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_batters
Requires one of: team_starting_lineup_id — requests satisfying none of these return 400.
Parameters
team_starting_lineup_idquerybigintoptional
Filter to a single starting lineup.
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/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/json
Response Schema(5 fields)show schema ▸
FieldTypeReferencesDescription
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}
Parameters
idpathbigintrequired
Primary 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 ▸
FieldTypeReferencesDescription
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