---
title: "Get live stream stats"
method: GET
path: "/streams/{id}/live-stats"
tags: ["streams"]
---

# Get live stream stats

`GET /streams/{id}/live-stats`

Fetches an object given its ID.

## Path parameters

- `id` string, required

## Response `200`

Successful response.

- StreamLiveStats
  - `id` string, required
  - `name` string, nullable
  - `youtubeLiveStats` object — Live YouTube viewer + cumulative stats for this stream. Returns null when the stream's destination isn't a YouTube channel, or when no broadcast has been provisioned yet (the row is still pre-EnsureBroadcast). Otherwise routes through destinations-gateway, which caches the underlying videos.list response in JetStream KV for 10 minutes.
    - `concurrentViewers` integer, required — Concurrent live viewers from videos.list(part=liveStreamingDetails). Always 0 when the broadcast is not LIVE.
    - `fetchedAt` string, date-time, required — Server time the gateway last hit YouTube for this row. Stale up to ~10 minutes; surface as 'updated …' in the UI.
    - `lifecycle` 'CREATED' | 'READY' | 'TESTING' | 'LIVE' | 'COMPLETE' | 'REVOKED' | 'ERRORED' | 'UNSPECIFIED', required — Current YouTube broadcast lifecycle (CREATED / READY / TESTING / LIVE / COMPLETE / REVOKED / ERRORED). Use this to gate UI: concurrentViewers is only meaningful while LIVE.
    - `likeCount` integer, required — Cumulative likes from videos.list(part=statistics). Survives post-VOD.
    - `mirrorLastError` string, nullable — Translated streaming-error code for the most recent mirror RPC failure, or null on MIRRORED / IDLE. Drives banner copy in the UI (see docs/youtube-schedule-mirror/graphql.md). Surfaced as a free-form string code (e.g. YOUTUBE_REAUTH_REQUIRED, YOUTUBE_QUOTA_EXCEEDED, YOUTUBE_CHANNEL_BUSY, MIRROR_NOT_POSSIBLE, STUDIO_DRIFT) — there is no canonical GraphQL enum for streaming errors today.
    - `mirrorStatus` 'IDLE' | 'PENDING' | 'MIRRORED' | 'OUT_OF_SYNC' | 'NEEDS_REAUTH' | 'BLOCKED', required — Current state of the YouTube schedule mirror for this stream. IDLE when the toggle is off; PENDING from intent receipt until the first successful YouTube call returns; MIRRORED on success; OUT_OF_SYNC / NEEDS_REAUTH / BLOCKED on the corresponding terminal failures. See MirrorStatus for full semantics.
    - `totalViews` integer, required — Cumulative video views from videos.list(part=statistics). Survives post-VOD.
    - `watchUrl` string, required — Stable public watch URL of the broadcast on YouTube.

## Other responses

- `401` — Missing or invalid access token.
- `403` — The token lacks the required scope or access to the resource.
- `404` — The resource does not exist or is not visible to the caller.
- `422` — The request body or parameters are invalid.
- `429` — Rate limit exceeded. Retry after the indicated delay.
- `502` — The upstream data service returned an error.

---

[API](https://skmtc.dev/streamloop/apis/streamloop-api.md) · [All operations](https://skmtc.dev/streamloop/apis/streamloop-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/streamloop/streamloop-api/revisions/7f30ccbac1b1/schema)
