---
title: "Live game counts per league"
method: GET
path: "/api/events/live"
tags: ["Events"]
---

# Live game counts per league

`GET /api/events/live`

## Request

- Base URL: `https://app.d-sports.org`
- URL: `https://app.d-sports.org/api/events/live`
- Auth: none required

Public cheap live-per-league read for the HQ sport screen. Source is persisted GameEvent rows (status live), never the vendor fan-out; demo fixtures excluded. A row counts only when startTime is within the last 6 hours (LIVE_STALE_AFTER_MS); older kickoffs and a null startTime are excluded so a finished or vendor-stuck game cannot light the LIVE pill (#909). League resolves via homeTeam.leagueId ?? awayTeam.leagueId; leagueId values are League.id (cuid) matching GET /api/leagues. Default shape { leagues: [{ leagueId, live }], games: null }; ?include=games adds per-game rows { id, leagueId, homeTeamId, awayTeamId } with ids only (no scores/clocks). Cache: CDN s-maxage=30, stale-while-revalidate=60, stale-if-error=300. (#898)

## Query parameters

- `sport` 'basketball' | 'soccer' | 'football' | 'hockey' | 'baseball'
- `include` 'games'

## Response `200`

{ success, data: { leagues, games } }

## Other responses

- `400`: Invalid sport or include.
- `502`: Live read failed (UPSTREAM_ERROR, retriable).

## Changes

- **2026-11-18** `6de639c52609`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/changes/api/events/live/get.md)

---

[API](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api.md) - [All operations](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/llms.txt) - [OpenAPI document](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/revisions/63735cf90a04?raw)
