STAT-API

MLB players API

playersmlb.players
Every individual who has played in Major League Baseball — current 26-man and 40-man rosters, minor-league call-ups, players on the injured list, free agents, and retired players.
GET/api/v1/mlb/players
Requires one of: team_id or roster_status — requests satisfying none of these return 400.
Parameters
team_idquerybigintoptional
Filter to players whose current team_id matches. Null team_id rows (free agents, retired) are excluded when this filter is applied.
roster_statusquerystringoptional
Filter by canonical roster status. The "on a team now" set is {active, injured_reserve, non_roster} (active 26-man, injured list, and 40-man-but-optioned); free_agent/retired/inactive are off-roster. Values: active, injured_reserve, non_roster, free_agent, retired, inactive.
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/players?team_id=1'
Responses
200players rows matching the declared filter set, wrapped in { players, 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(29 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
league_id
stringnullable—Official MLB player identifier
e.g. — (all-null in sample)
league_player_id
integer—Official MLB player ID (issued by the league)
e.g. 613534
team_id
bigintnullable—
e.g. 16
bats
stringnullable——
Values:RLS
birth_city
stringnullable——
e.g. Santo Domingo
birth_country
stringnullable——
e.g. USA
birth_date
datenullable——
e.g. 1994-07-14
birth_state
stringnullable——
e.g. CA
debut_date
timestamptznullable——
e.g. 2023-03-30T00:00:00.000Z
display_fi_last
stringnullable——
e.g. J. Rodríguez
display_last_comma_first
stringnullable——
e.g. Davis, Jonathan
draft_number
stringnullable——
e.g. — (all-null in sample)
draft_round
stringnullable——
e.g. — (all-null in sample)
draft_year
stringnullable——
e.g. 2019
first_name
string——
e.g. Ryan
full_name
string——
e.g. Luis Ortiz
full_position_list
stringnullable——
Values:PitcherOutfielderCatcherSecond BaseThird BaseFirst BaseShortstopOutfieldDesignated HitterInfieldTwo-Way Player
height
integernullable——
e.g. 74
jersey
stringnullable——
e.g. 52
last_name
string——
e.g. Rodriguez
league_slug
stringnullable——
e.g. austin-adams-613534
position_category
stringnullable——
Values:PitcherInfielderOutfielderCatcherUtility
primary_position
string——
e.g. P
profile_pic_url
stringnullable—URL to player profile picture image
e.g. — (all-null in sample)
roster_status
stringnullable—Canonical roster status, shared across leagues. Derived from team_player_rosters: "active" (26-man), "non_roster" (on the 40-man but optioned), "injured_reserve" (IL); "inactive"/"free_agent" off-roster. The "on a team now" set is {active, injured_reserve, non_roster}.
Values:inactiveactivenon_rosterinjured_reserve
school
stringnullable——
e.g. — (all-null in sample)
throws
stringnullable——
Values:RLS
weight
integernullable——
e.g. 215
GET/api/v1/mlb/players/{id}
Parameters
idpathbigintrequired
Primary key (id) of the player 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/players/{pk_value}'
Responses
200Single player row.application/jsonshow example ▸
404Row not found.
Response Schema(29 fields)show schema ▸
FieldTypeReferencesDescription
idkey
bigint—Primary Key
league_id
stringnullable—Official MLB player identifier
e.g. — (all-null in sample)
league_player_id
integer—Official MLB player ID (issued by the league)
e.g. 613534
team_id
bigintnullable—
e.g. 16
bats
stringnullable——
Values:RLS
birth_city
stringnullable——
e.g. Santo Domingo
birth_country
stringnullable——
e.g. USA
birth_date
datenullable——
e.g. 1994-07-14
birth_state
stringnullable——
e.g. CA
debut_date
timestamptznullable——
e.g. 2023-03-30T00:00:00.000Z
display_fi_last
stringnullable——
e.g. J. Rodríguez
display_last_comma_first
stringnullable——
e.g. Davis, Jonathan
draft_number
stringnullable——
e.g. — (all-null in sample)
draft_round
stringnullable——
e.g. — (all-null in sample)
draft_year
stringnullable——
e.g. 2019
first_name
string——
e.g. Ryan
full_name
string——
e.g. Luis Ortiz
full_position_list
stringnullable——
Values:PitcherOutfielderCatcherSecond BaseThird BaseFirst BaseShortstopOutfieldDesignated HitterInfieldTwo-Way Player
height
integernullable——
e.g. 74
jersey
stringnullable——
e.g. 52
last_name
string——
e.g. Rodriguez
league_slug
stringnullable——
e.g. austin-adams-613534
position_category
stringnullable——
Values:PitcherInfielderOutfielderCatcherUtility
primary_position
string——
e.g. P
profile_pic_url
stringnullable—URL to player profile picture image
e.g. — (all-null in sample)
roster_status
stringnullable—Canonical roster status, shared across leagues. Derived from team_player_rosters: "active" (26-man), "non_roster" (on the 40-man but optioned), "injured_reserve" (IL); "inactive"/"free_agent" off-roster. The "on a team now" set is {active, injured_reserve, non_roster}.
Values:inactiveactivenon_rosterinjured_reserve
school
stringnullable——
e.g. — (all-null in sample)
throws
stringnullable——
Values:RLS
weight
integernullable——
e.g. 215