Docs

API & data surface

Internal map of what each page loads. Turso holds NFLverse team/player/schedule data. The Rundown is only used for odds.

Live site: www.buildparlays.com · Endpoint reference

Season model

  • CURRENT_NFL_SEASON in lib/season.ts is the single source for anything displayed as current (schedule, records, defaults).
  • Current-season W-L only counts games with game_date < today (ET) so last year finals or future/projected scores never show as live records.
  • History stays in Turso. Pass ?season=YYYY on schedule / teams / stats APIs to read older years on purpose.
  • Player week-stat endpoints request the current season first, then fall back to the latest year that actually has rows until Klon's 2026 calcs are loaded.

Global (every page)

Navbar search fires when someone types a query.

  • GET /api/search?q={query}Navbar search on every page (Turso players + teams)

Homepage

/

Turso (NFLverse)

League leaders, consistency, schedule rails, featured teams

  • GET /api/database/teams
  • GET /api/database/league-rankings
  • GET /api/players/consistency?position=&stat=&limit=&minGames=
  • GET /api/players/flag-magnets?filter=

    Empty until player penalty data exists

  • GET /api/schedule/next

    Current-season next game + W-L as of today ET

  • GET /api/schedule/today

    Current-season records as of today ET

  • GET /api/schedule/date?date=YYYY-MM-DD

    UpcomingGames look-ahead; records as of that date

  • CURRENT_NFL_SEASON (lib/season.ts) drives anything shown as current.
  • Historical seasons remain available via ?season=YYYY on schedule/teams/stats APIs.
  • Player stat endpoints fall back to latest season that has Turso rows when current-year stats are not loaded yet.

NFL Odds

/odds

The Rundown (external)

Live / near-live NFL event odds board

  • GET /api/rundown/nfl/events?date=YYYY-MM-DD

    Only page that spends Rundown quota (server-cached)

Schedule

/schedule

Turso (NFLverse)

Week-by-week NFL slate

  • GET /api/schedule/week?week=&season=

Teams index

/teams

Turso (NFLverse)

All NFL teams grid

  • GET /api/database/teams

Team page

/teams/[id]

Turso (NFLverse)

Roster, depth chart, schedule, leaders, game logs

  • GET /api/database/teams?season=
  • GET /api/database/players?team=
  • GET /api/database/team-seasons?team=
  • GET /api/database/team-schedule?team=&season=
  • GET /api/database/depth-chart?team=
  • GET /api/database/team-leaders?team=&season=
  • GET /api/database/team-stats?team=&season=

Players index

/players

Turso via server component

Browse player list

No browser `/api/*` calls.

  • Server component reads Turso via playerRepository (no public /api/* hop).

Player profile

/players/[slug]

Turso via server component

Bio, season totals, game log

No browser `/api/*` calls.

  • Server component reads Turso via playerRepository. No Rundown calls.

Rankings

/rankings

Turso (NFLverse)

Stat leaderboards across the league

  • GET /api/database/league-rankings
  • GET /api/database/teams

    Logos / context

Gameday Companion

/gameday-companion

Turso (NFLverse)

Full slate + depth context per team

  • GET /api/database/teams
  • GET /api/database/all-schedule?season=
  • GET /api/database/depth-chart?team=

    Called once per team (heavier page)

Turso (NFLverse)

Single-game matchup detail

  • GET /api/matchup/[gameId]

    Still queries legacy games table; may 404/500 until rewritten to schedules

About

/about

No data API

Static product copy

No browser `/api/*` calls.

Guides

/guides

No data API

Static content

No browser `/api/*` calls.

No data API

Static content

No browser `/api/*` calls.

Contact

/contact

No data API

Contact form (currently disabled in UI)

No browser `/api/*` calls.

  • Form does not POST. /api/contact exists but is unused.

Implemented but not on a page UI

  • GET /api/players/weekly-top

    Implemented, not wired to a page UI yet

  • GET /api/teammates

    Implemented, not wired to a page UI yet

  • POST /api/contact

    Route exists; form disabled

  • GET /api/rundown/sports

    Internal / admin-style

  • GET /api/rundown/usage

    Internal / admin-style