Person

View a players stats

get/api/v1/people/{personId}/stats

Request

  • Base URL: https://statsapi.mlb.com
  • URL: https://statsapi.mlb.com/api/v1/people/{personId}/stats
  • Auth: none declared

Path parameters

personIdinteger required

Unique Player Identifier. Format: 434538, 429665, etc

Query parameters

statsStatType[] required

Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes

groupStatGroup[]

Comma delimited list of categories of statistic to return. Available types in /api/v1/statGroups

seasonstring

Season of play

seasonsstring[]

Comma delimited list of Seasons of play

sportIdinteger

Top level organization of a sport

opposingTeamIdinteger

A unique identifier for the opposing team. Must be used with Team ID

opposingPlayerIdinteger

A unique identifier for the opposing team

metricsMetricType[]

Name of metric(s) for metric log stats. Available metrics in /api/v1/metrics

leagueIdinteger

Unique League Identifier

leagueListId'MILB_FULL' | 'MILB_SHORT' | 'MILB_COMPLEX' | 'MILB_ALL' | 'MILB_ALL_NOMEX' | 'MILB_ALL_DOMESTIC' | 'MILB_NONCOMP' | 'MILB_NONCOMP_NOMEX' | 'MILB_DOMCOMP' | 'MILB_INTCOMP' | 'WIN_NOABL' | 'WIN_CARIBBEAN' | 'WIN_ALL' | 'ABL' | 'MEX_ALL' | 'MLB' | 'MLB_HIST' | 'MLB_MILB' | 'MLB_MILB_HIST' | 'MLB_MILB_WIN' | 'BASEBALL_ALL' | 'MLB_SPRING'

Unique League List Identifier

sitCodesstring[]

Situation code for a given stat split.

combineSitsboolean

If true, gathers stats where all of the situational criteria are met. If false, returns stats where any of the situational criteria are met. Default: false

startDatestring date

Start date for range of data (must be used with end date). Format: MM/DD/YYYY

endDatestring date

End date for range of data (must be used with start date). Format: MM/DD/YYYY

daysBackinteger

Returns results from the last 'X' days (Starting from yesterday).

gamesBackinteger

Returns results from the last 'X' games played.

limitinteger

Number of results to return

eventTypeEventType[]

Type of event

pitchTypestring[]

Classification of pitch (fastball, curveball, etc...)

hitTrajectoryHitTrajectory[]

Trajectory of hit (line drive, fly ball, etc...)

batSidestring

Bat side of hitter

gameTypeGameTypeEnum[]

Type of Game. Available types in /api/v1/gameTypes

groupByGroupByEnum[]
fieldsstring[]

Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute

Response

OK

Changes

No recorded changes to this operation across all 1 revision of this API.