MLB Stats API Docs

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

GET/api/v1/game/{gamePk}/boxscore

Boxscore

Per-team batting/pitching/fielding box score.

On this page

Try it

Path
Query
https://statsapi.mlb.com/api/v1/game/744914/boxscore
const res = await fetch('https://statsapi.mlb.com/api/v1/game/744914/boxscore')
const data = await res.json()
curl -s 'https://statsapi.mlb.com/api/v1/game/744914/boxscore'

Reference

Path parameters

NameTypeRequiredDescription
gamePknumberyes

Game id from the schedule endpoint.

Query parameters

NameTypeRequiredDescription
timecodestringno

Snapshot at a past moment.

Response

Type: BoxscoreResponse

/** `GET /api/v1/game/{gamePk}/boxscore` — partial. */
export interface BoxscoreResponse extends WithCopyright {
	teams: Record<string, unknown>
	officials: unknown[]
	info: unknown[]
	pitchingNotes: unknown[]
	topPerformers?: unknown[]
}

Build with it

Live examples powered by this endpoint with real data. Inspiration — restyle and remix freely.

Flip-board boxscore

A Fenway-style split-flap batting line for either side — toggle between the two teams.

Finding a game…

Example URLs

  • Boxscore for a game: https://statsapi.mlb.com/api/v1/game/744914/boxscore