GET/api/v1/gameTypes
Game types (enum)
Game type codes (R, S, P, …) and descriptions.
On this page
Try it
https://statsapi.mlb.com/api/v1/gameTypesconst res = await fetch('https://statsapi.mlb.com/api/v1/gameTypes')
const data = await res.json()curl -s 'https://statsapi.mlb.com/api/v1/gameTypes'
Reference
Response
Type: GameTypesResponse
/** `GET /api/v1/gameTypes` */
export type GameTypesResponse = Array<{ id: string; description: string }>Notes
Returns a bare array. These are the
gameTypecodes accepted by/scheduleand stats endpoints.
Build with it
Live examples powered by this endpoint with real data. Inspiration — restyle and remix freely.
Game-type codes
Every game-type code (R, S, P, …) and what it means.
Loading game types…
Example URLs
- All game types:
https://statsapi.mlb.com/api/v1/gameTypes