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
https://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&season=2026&sportId=1&limit=5const 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
| Name | Type | Required | Description |
|---|---|---|---|
stats | seasoncareeryearByYearseasonAdvancedstatSplitsgameLog | yes | Stat type. |
group | hittingpitchingfielding | no | Stat group. |
season | number | no | Four-digit year. |
sportId | number | no | Sport id. |
teamId | number | no | Restrict to a team. |
limit | number | no | Page size (max 1000). |
offset | number | no | 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/offsetto 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