MLB Stats API Docs

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

GET/api/v1/attendance

Attendance

Attendance totals for a team and season(s).

On this page

Try it

Query
https://statsapi.mlb.com/api/v1/attendance?teamId=119&season=2026
const 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

NameTypeRequiredDescription
teamIdnumberno

Team id.

leagueIdcsvno

One or more league ids.

seasonnumberno

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