STAT-API

MLB game_team_rosters API

game_team_rostersmlb.game_team_rosters
The active gameday roster for each MLB team in each game — the 26 players in uniform that day, with positions and any pre-game lineup designations.
GET/api/v1/mlb/game_team_rosters
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_team_rosters?game_id=1'
Responses
200game_team_rosters rows matching the declared filter set, wrapped in { game_team_rosters, 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(9 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
game_id
bigint—
e.g. 14259
player_id
bigint—
e.g. 1365
team_id
bigint—
e.g. 27
batting_order
integernullable——
e.g. 9
comment
stringnullable——
e.g. — (all-null in sample)
position
stringnullable——
Values:PC2BLF1BCF3BRFSSPHDHPR
starter
boolean——
Values:falsetrue
status
stringnullable——
e.g. Active
GET/api/v1/mlb/game_team_rosters/{id}
Parameters
idpathbigintrequired
Primary key (id) of the game_team_roster 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_team_rosters/{pk_value}'
Responses
200Single game_team_roster row.application/jsonshow example ▸
404Row not found.
Response Schema(9 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
game_id
bigint—
e.g. 14259
player_id
bigint—
e.g. 1365
team_id
bigint—
e.g. 27
batting_order
integernullable——
e.g. 9
comment
stringnullable——
e.g. — (all-null in sample)
position
stringnullable——
Values:PC2BLF1BCF3BRFSSPHDHPR
starter
boolean——
Values:falsetrue
status
stringnullable——
e.g. Active