MLB season_team_stats API
season_team_stats
mlb.season_team_statsSeason totals for each MLB team — wins and losses, runs scored and allowed, batting and pitching aggregates, fielding stats, and advanced team metrics (BaseRuns, pythagorean expectation, run differential).
GET/api/v1/mlb/season_team_statsList season_team_stats for MLB
Requires one of:
season_id — requests satisfying none of these return 400.Parameters
season_idquerybigintoptionalFilter to a season. Defaults to the current season.
team_idquerybigintoptionalFilter by team.
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/season_team_stats?season_id=2027'Responses
200season_team_stats rows matching the declared filter set, wrapped in { season_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/jsonResponse Schema(36 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
idkey | bigint | — | Primary Key |
season_id | bigint | — e.g. 2024 | |
team_id | bigint | — e.g. 16 | |
at_bats | integer | — | — e.g. 5522 |
batting_average | decimal | — | — e.g. 0.2440 |
blown_saves | integer | — | — e.g. 28 |
caught_stealing | integer | — | — e.g. 30 |
complete_games | integer | — | — e.g. 1 |
double_plays | integer | — | — e.g. 125 |
doubles | integer | — | — e.g. 264 |
earned_run_average | decimal | — | — e.g. 4.0400 |
earned_runs | integer | — | — e.g. 602 |
errors | integer | — | — e.g. 97 |
fielding_percentage | decimal | — | — e.g. 0.9840 |
games_played | integer | — | — e.g. 162 |
hits | integer | — | — e.g. 1423 |
holds | integer | — | — e.g. 83 |
home_runs | integer | — | — e.g. 182 |
innings_pitched | decimal | — | Innings pitched in MLB notation (6.2 = 6 and 2/3 innings) e.g. 1442.0000 |
losses | integer | — | — e.g. 73 |
on_base_percentage | decimal | — | — e.g. 0.3150 |
on_base_plus_slugging | decimal | — | — e.g. 0.7070 |
runs_allowed | integer | — | — e.g. 699 |
runs_batted_in | integer | — | — e.g. 696 |
runs_scored | integer | — | — e.g. 739 |
save_opportunities | integer | — | — e.g. 64 |
saves | integer | — | — e.g. 46 |
shutouts | integer | — | — e.g. 8 |
slugging_percentage | decimal | — | — e.g. 0.3960 |
stolen_bases | integer | — | — e.g. 88 |
strikeouts | integer | — | — e.g. 1461 |
ties | integer | — | — e.g. 0 |
triples | integer | — | — e.g. 18 |
walks | integer | — | — e.g. 478 |
whip | decimal | — | — e.g. 1.2400 |
wins | integer | — | — e.g. 77 |
GET/api/v1/mlb/season_team_stats/{id}Get a single season_team_stat by id
Parameters
idpathbigintrequiredPrimary key (id) of the season_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/season_team_stats/{pk_value}'Responses
200Single season_team_stat row.application/jsonshow example ▸
404Row not found.
Response Schema(36 fields)show schema ▸
| Field | Type | References | Description |
|---|---|---|---|
idkey | bigint | — | Primary Key |
season_id | bigint | — e.g. 2024 | |
team_id | bigint | — e.g. 16 | |
at_bats | integer | — | — e.g. 5522 |
batting_average | decimal | — | — e.g. 0.2440 |
blown_saves | integer | — | — e.g. 28 |
caught_stealing | integer | — | — e.g. 30 |
complete_games | integer | — | — e.g. 1 |
double_plays | integer | — | — e.g. 125 |
doubles | integer | — | — e.g. 264 |
earned_run_average | decimal | — | — e.g. 4.0400 |
earned_runs | integer | — | — e.g. 602 |
errors | integer | — | — e.g. 97 |
fielding_percentage | decimal | — | — e.g. 0.9840 |
games_played | integer | — | — e.g. 162 |
hits | integer | — | — e.g. 1423 |
holds | integer | — | — e.g. 83 |
home_runs | integer | — | — e.g. 182 |
innings_pitched | decimal | — | Innings pitched in MLB notation (6.2 = 6 and 2/3 innings) e.g. 1442.0000 |
losses | integer | — | — e.g. 73 |
on_base_percentage | decimal | — | — e.g. 0.3150 |
on_base_plus_slugging | decimal | — | — e.g. 0.7070 |
runs_allowed | integer | — | — e.g. 699 |
runs_batted_in | integer | — | — e.g. 696 |
runs_scored | integer | — | — e.g. 739 |
save_opportunities | integer | — | — e.g. 64 |
saves | integer | — | — e.g. 46 |
shutouts | integer | — | — e.g. 8 |
slugging_percentage | decimal | — | — e.g. 0.3960 |
stolen_bases | integer | — | — e.g. 88 |
strikeouts | integer | — | — e.g. 1461 |
ties | integer | — | — e.g. 0 |
triples | integer | — | — e.g. 18 |
walks | integer | — | — e.g. 478 |
whip | decimal | — | — e.g. 1.2400 |
wins | integer | — | — e.g. 77 |