STAT-API

MLB game_team_stats API

game_team_statsmlb.game_team_stats
Each MLB team's stat line for each game — runs, hits, errors, batting averages, pitching lines, broken out per game with home/away context.
GET/api/v1/mlb/game_team_stats
Requires one of: game_id — requests satisfying none of these return 400.
Parameters
game_idquerybigintoptional
Filter to a single game.
team_idquerybigintoptional
Filter by team.
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_stats?game_id=1'
Responses
200game_team_stats rows matching the declared filter set, wrapped in { game_team_stats, 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(37 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
game_id
bigint—
e.g. 1454
team_id
bigint—
e.g. 27
assists
integer——
e.g. 9
balks
integer——
e.g. 0
batters_faced
integer——
e.g. 36
batting_average
decimal——
e.g. 0.2440
caught_stealing
integer——
e.g. 0
double_plays_turned
integer——
e.g. 0
doubles
integer——
e.g. 1
earned_run_average
decimal——
e.g. 3.7700
earned_runs
integer——
e.g. 2
errors
integer——
e.g. 0
grounded_into_double_play
integer——
e.g. 0
hit_by_pitch
integer——
e.g. 0
hits
integer——
e.g. 7
home_runs
integer——
e.g. 1
innings_pitched
decimal—Innings pitched in MLB notation (6.2 = 6 and 2/3 innings)
e.g. 9.0000
left_on_base
integer——
e.g. 6
loss
integer——
e.g. 0
on_base_percentage
decimal——
e.g. 0.3150
on_base_plus_slugging
decimal——
e.g. 0.7240
passed_balls
integer——
e.g. 0
pitches_thrown
integer——
e.g. 143
putouts
integer——
e.g. 27
runs
integer——
e.g. 3
runs_batted_in
integer——
e.g. 2
sacrifice_flies
integer——
e.g. 0
sacrifice_hits
integer——
e.g. 0
slugging_percentage
decimal——
e.g. 0.4070
stolen_bases
integer——
e.g. 0
strikeouts
integer——
e.g. 8
strikes
integer——
e.g. 93
triples
integer——
e.g. 0
walks
integer——
e.g. 2
wild_pitches
integer——
e.g. 0
win
integer——
e.g. 0
GET/api/v1/mlb/game_team_stats/{id}
Parameters
idpathbigintrequired
Primary key (id) of the game_team_stat 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_stats/{pk_value}'
Responses
200Single game_team_stat row.application/jsonshow example ▸
404Row not found.
Response Schema(37 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
game_id
bigint—
e.g. 1454
team_id
bigint—
e.g. 27
assists
integer——
e.g. 9
balks
integer——
e.g. 0
batters_faced
integer——
e.g. 36
batting_average
decimal——
e.g. 0.2440
caught_stealing
integer——
e.g. 0
double_plays_turned
integer——
e.g. 0
doubles
integer——
e.g. 1
earned_run_average
decimal——
e.g. 3.7700
earned_runs
integer——
e.g. 2
errors
integer——
e.g. 0
grounded_into_double_play
integer——
e.g. 0
hit_by_pitch
integer——
e.g. 0
hits
integer——
e.g. 7
home_runs
integer——
e.g. 1
innings_pitched
decimal—Innings pitched in MLB notation (6.2 = 6 and 2/3 innings)
e.g. 9.0000
left_on_base
integer——
e.g. 6
loss
integer——
e.g. 0
on_base_percentage
decimal——
e.g. 0.3150
on_base_plus_slugging
decimal——
e.g. 0.7240
passed_balls
integer——
e.g. 0
pitches_thrown
integer——
e.g. 143
putouts
integer——
e.g. 27
runs
integer——
e.g. 3
runs_batted_in
integer——
e.g. 2
sacrifice_flies
integer——
e.g. 0
sacrifice_hits
integer——
e.g. 0
slugging_percentage
decimal——
e.g. 0.4070
stolen_bases
integer——
e.g. 0
strikeouts
integer——
e.g. 8
strikes
integer——
e.g. 93
triples
integer——
e.g. 0
walks
integer——
e.g. 2
wild_pitches
integer——
e.g. 0
win
integer——
e.g. 0