MLB Stats API Docs

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

GET/api/v1/stats

Stats

Flexible stat queries across players/teams.

The general-purpose stats endpoint. Combine stats (type), group, and filters like season, sportId, teamId, or playerPool.

On this page

Try it

Query
https://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&season=2026&sportId=1&limit=5
const res = await fetch('https://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&season=2026&sportId=1&limit=5')
const data = await res.json()
curl -s 'https://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&season=2026&sportId=1&limit=5'

Reference

Query parameters

NameTypeRequiredDescription
statsseasoncareeryearByYearseasonAdvancedstatSplitsgameLogyes

Stat type.

grouphittingpitchingfieldingno

Stat group.

seasonnumberno

Four-digit year.

sportIdnumberno

Sport id. 1 is MLB.

teamIdnumberno

Restrict to a team.

limitnumberno

Page size (max 1000).

offsetnumberno

Pagination offset.

Response

Type: StatsResponse

/**
 * `GET /api/v1/stats`, `/people/{personId}/stats`, and
 * `/people/{personId}/stats/game/{gamePk}`.
 */
export interface StatsResponse extends WithCopyright {
	stats: StatGroup[]
}

Notes

  • Results cap at 1000 per call; use limit/offset to page.

Build with it

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

Season stat table

A searchable, sortable table of season hitting lines across the league.

Loading stats…

Example URLs

  • Top season hitting (2026): https://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&season=2026&sportId=1&limit=5