API Endpoints

Local data served by sportspuff-v6 (teams, stadiums, etc.).

For live game data (scores, schedules, standings) call sportspuff-api directly.

JSON  ·  /api/v1/

Versioned, envelope-shaped JSON. All responses include count, total, limit, offset, and a filters echo.

GET/api/v1/teams

All teams with their league, city, abbreviation, win/loss record, and linked stadium.

  • league=mlb — filter by league (case-insensitive)
  • linked=true|false — only teams with / without a stadium
  • search=yankee — match team name or city
  • limit=N (max 500, default 200), offset=N
GET/api/v1/stadiums

All stadiums with city/state/country and the count of teams that play there.

  • city=chicago — substring match on city
  • has_teams=true|false — only stadiums with / without linked teams
  • search=... — match stadium name or city
  • limit=N, offset=N
GET/api/status-check

Proxies sportspuff-api /api/v1/status; returns upstream health + per-endpoint freshness. Renders at /api-status.

Terminal  ·  /curl/v1/

Plain-text columnar output, intended for curl from a shell. Same query params as the JSON variants above.

GET/curl/v1/teams

Aligned columns: LEAGUE ABBR TEAM CITY STADIUM

GET/curl/v1/stadiums

Aligned columns: ID STADIUM CITY STATE TEAMS

Legacy

Pre-versioned endpoints. Still functional; prefer the /api/v1/ equivalents above for new use.

GET/api/teams

Bare JSON array of teams. No envelope, no filters.

GET/api/stadiums

Bare JSON array of stadiums. No envelope, no filters.