Stats

View metric stats

get/api/v1/stats/metrics

Request

  • Base URL: https://statsapi.mlb.com
  • URL: https://statsapi.mlb.com/api/v1/stats/metrics
  • Auth: none declared

Query parameters

personIdinteger

Unique Player Identifier. Format: 434538, 429665, etc

personIdsinteger[]

Unique Player Identifier. Format: 434538, 429665, etc

batterIdinteger

Unique Player Identifier. Format: 434538, 429665, etc

pitcherIdinteger

Unique Player Identifier. Format: 434538, 429665, etc

teamIdinteger

Unique Team Identifier. Format: 141, 147, etc

statsStatType[] required

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

groupStatGroup[]

Category 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

positionBaseballPosition[]

All of the details of a player's position

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

pitchHandstring

Handedness of pitcher

venueIdinteger[]

All of the details of a venue

metricsMetricType[] required

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

gamePkinteger

Unique Primary Key Representing a Game

minValuenumber double

Minimum value to filter on

maxValuenumber double

Maximum value to filter on

percentileinteger

Only return averages above this percentile. used for best effort plays

minOccurrencesinteger

Minimum occurrences to filter upon

offsetinteger

The pointer to start for a return set; used for pagination

limitinteger

Number of results to return

order'ASC' | 'DESC'

The order of sorting, ascending or descending

datestring date

Date of Game. Format: YYYY-MM-DD

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

gameType'SPRING_TRAINING' | 'REGULAR_SEASON' | 'FIRST_ROUND' | 'DIVISION_SERIES' | 'LEAGUE_CHAMPIONSHIP_SERIES' | 'WORLD_SERIES' | 'CHAMPIONSHIP' | 'NINETEENTH_CENTURY_SERIES' | 'PLAYOFFS' | 'ALL_STAR' | 'INTRASQUAD' | 'EXHIBITION'

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

batterTeamIdinteger[]

A unique identifier for the batter's team

pitcherTeamIdinteger[]

A unique identifier for the pitcher's team

fieldsstring[]

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

debugboolean

Response

OK

Changes

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