Baseball / Games

Get Games

Retrieve baseball games — scheduled, live and finished — with ballpark, status and runs.

GET/v1/baseball/games

Parameters

NameTypeRequiredDescription
x-api-keystringRequiredYour API key, sent as a header.
league_idintegerOptionalFilter by league ID.
seasonintegerOptionalFilter by season year.
datedateOptionalFilter by date (YYYY-MM-DD, UTC).
team_idintegerOptionalFilter by team ID.
statusstringOptionalNS, LIVE, HT, FT, PST or CANC.
pageintegerOptionalPage number. Default 1, 50 per page.

Response

  • dataarray<Game>
    Games matching your filters.
  • idinteger
    Unique game ID.
  • leagueobject
    id and name.
  • seasoninteger
    Season year.
  • datestring · ISO 8601
    First pitch in UTC.
  • statusobject
    short, inning, half and outs.
  • homeobject
    Home team: id, name, runs.
  • awayobject
    Away team: id, name, runs.
  • venueobject
    Ballpark name and city.
  • metaobject
    page, per_page and total.

Status codes

  • 200Games returned
  • 400Invalid parameter
  • 401Missing or invalid API key
  • 429Rate limit reached