GET/api/v1/game/{gamePk}/winProbability
Win probability
Per-play win probability across the game.
On this page
Try it
https://statsapi.mlb.com/api/v1/game/744914/winProbabilityconst res = await fetch('https://statsapi.mlb.com/api/v1/game/744914/winProbability')
const data = await res.json()curl -s 'https://statsapi.mlb.com/api/v1/game/744914/winProbability'
Reference
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
gamePk | number | yes | Game id from the schedule endpoint. |
Response
Type: WinProbabilityResponse
/** `GET /api/v1/game/{gamePk}/winProbability` — array of play states (partial). */
export type WinProbabilityResponse = Array<Record<string, unknown>>Notes
Returns a bare array (one entry per play), not an object wrapper.
Build with it
Live examples powered by this endpoint with real data. Inspiration — restyle and remix freely.
Win-probability graph
The momentum swing of the game plotted play-by-play as a single inline-SVG line.
Finding a game…
Example URLs
- Win probability for a game:
https://statsapi.mlb.com/api/v1/game/744914/winProbability