MLB Stats API Docs

Type to search endpoints by name, path, or keyword.

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/gameTypes
const 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 gameType codes accepted by /schedule and 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