GET/api/v1/attendance
Attendance
Attendance totals for a team and season(s).
On this page
Try it
https://statsapi.mlb.com/api/v1/attendance?teamId=119&season=2026const res = await fetch('https://statsapi.mlb.com/api/v1/attendance?teamId=119&season=2026')
const data = await res.json()curl -s 'https://statsapi.mlb.com/api/v1/attendance?teamId=119&season=2026'
Reference
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
teamId | number | no | Team id. |
leagueId | csv | no | One or more league ids. |
season | number | no | Four-digit year. |
Response
Type: AttendanceResponse
/** `GET /api/v1/attendance` */
export interface AttendanceResponse extends WithCopyright {
records: AttendanceRecord[]
aggregateTotals?: Record<string, unknown>
}Build with it
Live examples powered by this endpoint with real data. Inspiration — restyle and remix freely.
Attendance card
A team’s season attendance totals, average, and single-game high.
Loading attendance…
Example URLs
- Dodgers attendance (2026):
https://statsapi.mlb.com/api/v1/attendance?teamId=119&season=2026