STAT-API

MLB seasons API

seasonsmlb.seasons
Each MLB season — spring training, the 162-game regular season, the Wild Card Series, the Division Series, the League Championship Series, and the World Series.
GET/api/v1/mlb/seasons
Parameters
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/seasons?limit=3'
Responses
200seasons rows matching the declared filter set, wrapped in { seasons, 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(7 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
league_id
stringnullable—Official MLB season identifier
e.g. — (all-null in sample)
end_date
timestamptznullable——
e.g. 2018-10-28T04:00:00.000Z
post_season_start_date
timestamptznullable——
e.g. 2018-10-02T04:00:00.000Z
regular_season_start_date
timestamptznullable——
e.g. 2018-03-29T04:00:00.000Z
start_date
timestamptz——
e.g. 2018-02-21T05:00:00.000Z
start_year
integer——
e.g. 2018
GET/api/v1/mlb/seasons/{id}
Parameters
idpathbigintrequired
Primary key (id) of the season 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/seasons/{pk_value}'
Responses
200Single season row.application/jsonshow example ▸
404Row not found.
Response Schema(7 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
league_id
stringnullable—Official MLB season identifier
e.g. — (all-null in sample)
end_date
timestamptznullable——
e.g. 2018-10-28T04:00:00.000Z
post_season_start_date
timestamptznullable——
e.g. 2018-10-02T04:00:00.000Z
regular_season_start_date
timestamptznullable——
e.g. 2018-03-29T04:00:00.000Z
start_date
timestamptz——
e.g. 2018-02-21T05:00:00.000Z
start_year
integer——
e.g. 2018