STAT-API

MLB season_player_stats API

season_player_statsmlb.season_player_stats
Season totals for each MLB player — the full batting line (AVG, OBP, SLG, OPS), counting stats (HR, RBI, SB, R), and pitching line (W, L, ERA, WHIP, K, BB). Advanced run-value metrics (wRC+, FIP, WAR) are not carried here. Scope is not split by season type.
GET/api/v1/mlb/season_player_stats
Requires one of: season_id or player_id — requests satisfying none of these return 400.
Parameters
season_idquerybigintoptional
Filter to a season. Defaults to the current season.
player_idquerybigintoptional
Filter to a single player.
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/season_player_stats?season_id=2027'
Responses
200season_player_stats rows matching the declared filter set, wrapped in { season_player_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(69 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
player_id
bigint—
e.g. 1439
season_id
bigint—
e.g. 2024
assists
integer——
e.g. 0
at_bats
integer——
e.g. 0
balls
integernullable——
e.g. 0
batters_faced
integer——
e.g. 0
batting_average
decimal——
e.g. 0.0000
blown_saves
integer——
e.g. 0
caught_stealing
integer——
e.g. 0
caught_stealing_by
integer——
e.g. 0
complete_games
integer——
e.g. 0
double_plays
integer——
e.g. 0
doubles
integer——
e.g. 0
earned_run_average
decimal——
e.g. 0.0000
earned_runs
integer——
e.g. 0
errors
integer——
e.g. 0
fielding_games
integer——
e.g. 0
fielding_games_started
integer——
e.g. 0
fielding_percentage
decimal——
e.g. 0.0000
fielding_position
string——
Values:PC2BLFRFCF3B1BSSXDH
games_pitched
integer——
e.g. 0
games_played
integer——
e.g. 0
games_started
integer——
e.g. 0
games_started_pitching
integer——
e.g. 0
grounded_into_double_play
integer——
e.g. 0
hit_by_pitch
integer——
e.g. 0
hits
integer——
e.g. 0
hits_allowed
integer——
e.g. 0
hits_per_nine
decimal——
e.g. 0.0000
holds
integer——
e.g. 0
home_runs
integer——
e.g. 0
home_runs_allowed
integer——
e.g. 0
home_runs_per_nine
decimal——
e.g. 0.0000
innings_pitched
decimal—Innings pitched in MLB notation (6.2 = 6 and 2/3 innings)
e.g. 0.0000
intentional_walks
integernullable——
e.g. 0
left_on_base
integernullable——
e.g. 0
losses
integer——
e.g. 0
on_base_percentage
decimal——
e.g. 0.0000
on_base_plus_slugging
decimal——
e.g. 0.0000
passed_balls
integer——
e.g. 0
pitches_thrown
integernullable——
e.g. 0
plate_appearances
integer——
e.g. 0
putouts
integer——
e.g. 0
quality_starts
integernullable——
e.g. 0
runs
integer——
e.g. 0
runs_allowed
integer——
e.g. 0
runs_batted_in
integer——
e.g. 0
sacrifice_flies
integer——
e.g. 0
sacrifice_hits
integer——
e.g. 0
save_opportunities
integer——
e.g. 0
saves
integer——
e.g. 0
shutouts
integer——
e.g. 0
singles
integernullable—Derivable from hits - doubles - triples - home_runs
e.g. 0
slugging_percentage
decimal——
e.g. 0.0000
stolen_bases
integer——
e.g. 0
stolen_bases_allowed
integer——
e.g. 0
strikeouts
integer——
e.g. 0
strikeouts_per_nine
decimal——
e.g. 0.0000
strikeouts_pitched
integer——
e.g. 0
strikes
integernullable——
e.g. 0
total_bases
integernullable—Derivable: 1B + 2*2B + 3*3B + 4*HR
e.g. 0
total_chances
integer——
e.g. 0
triples
integer——
e.g. 0
walks
integer——
e.g. 0
walks_allowed
integer——
e.g. 0
walks_per_nine
decimal——
e.g. 0.0000
whip
decimal——
e.g. 0.0000
wins
integer——
e.g. 0
GET/api/v1/mlb/season_player_stats/{id}
Parameters
idpathbigintrequired
Primary key (id) of the season_player_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/season_player_stats/{pk_value}'
Responses
200Single season_player_stat row.application/jsonshow example ▸
404Row not found.
Response Schema(69 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
player_id
bigint—
e.g. 1439
season_id
bigint—
e.g. 2024
assists
integer——
e.g. 0
at_bats
integer——
e.g. 0
balls
integernullable——
e.g. 0
batters_faced
integer——
e.g. 0
batting_average
decimal——
e.g. 0.0000
blown_saves
integer——
e.g. 0
caught_stealing
integer——
e.g. 0
caught_stealing_by
integer——
e.g. 0
complete_games
integer——
e.g. 0
double_plays
integer——
e.g. 0
doubles
integer——
e.g. 0
earned_run_average
decimal——
e.g. 0.0000
earned_runs
integer——
e.g. 0
errors
integer——
e.g. 0
fielding_games
integer——
e.g. 0
fielding_games_started
integer——
e.g. 0
fielding_percentage
decimal——
e.g. 0.0000
fielding_position
string——
Values:PC2BLFRFCF3B1BSSXDH
games_pitched
integer——
e.g. 0
games_played
integer——
e.g. 0
games_started
integer——
e.g. 0
games_started_pitching
integer——
e.g. 0
grounded_into_double_play
integer——
e.g. 0
hit_by_pitch
integer——
e.g. 0
hits
integer——
e.g. 0
hits_allowed
integer——
e.g. 0
hits_per_nine
decimal——
e.g. 0.0000
holds
integer——
e.g. 0
home_runs
integer——
e.g. 0
home_runs_allowed
integer——
e.g. 0
home_runs_per_nine
decimal——
e.g. 0.0000
innings_pitched
decimal—Innings pitched in MLB notation (6.2 = 6 and 2/3 innings)
e.g. 0.0000
intentional_walks
integernullable——
e.g. 0
left_on_base
integernullable——
e.g. 0
losses
integer——
e.g. 0
on_base_percentage
decimal——
e.g. 0.0000
on_base_plus_slugging
decimal——
e.g. 0.0000
passed_balls
integer——
e.g. 0
pitches_thrown
integernullable——
e.g. 0
plate_appearances
integer——
e.g. 0
putouts
integer——
e.g. 0
quality_starts
integernullable——
e.g. 0
runs
integer——
e.g. 0
runs_allowed
integer——
e.g. 0
runs_batted_in
integer——
e.g. 0
sacrifice_flies
integer——
e.g. 0
sacrifice_hits
integer——
e.g. 0
save_opportunities
integer——
e.g. 0
saves
integer——
e.g. 0
shutouts
integer——
e.g. 0
singles
integernullable—Derivable from hits - doubles - triples - home_runs
e.g. 0
slugging_percentage
decimal——
e.g. 0.0000
stolen_bases
integer——
e.g. 0
stolen_bases_allowed
integer——
e.g. 0
strikeouts
integer——
e.g. 0
strikeouts_per_nine
decimal——
e.g. 0.0000
strikeouts_pitched
integer——
e.g. 0
strikes
integernullable——
e.g. 0
total_bases
integernullable—Derivable: 1B + 2*2B + 3*3B + 4*HR
e.g. 0
total_chances
integer——
e.g. 0
triples
integer——
e.g. 0
walks
integer——
e.g. 0
walks_allowed
integer——
e.g. 0
walks_per_nine
decimal——
e.g. 0.0000
whip
decimal——
e.g. 0.0000
wins
integer——
e.g. 0