> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streampixel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Project Live Stats

> Viewers streaming and viewers queued right now.

Real-time counts of viewers in a live session and viewers waiting for a free streaming server. Same numbers as [Project User Stats](/resources/api-reference/project-user-stats), on the REST path; both are read from the region's live session store and are cheap to poll every few seconds.

<Info>
  Scope: `read`.
</Info>

## Path parameters

<ParamField path="projectId" type="string" required>
  The project.
</ParamField>

## Headers

<ParamField header="x-api-key" type="string" required>
  Your Streampixel API key.
</ParamField>

## Response

<ResponseField name="liveUser" type="number">Viewers in an active session.</ResponseField>
<ResponseField name="queueUser" type="number">Viewers waiting for a streaming server.</ResponseField>

<RequestExample>
  ```bash cURL theme={"dark"}
  curl https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/live-stats \
    -H "x-api-key: $STREAMPIXEL_API_KEY"
  ```

  ```javascript Node.js theme={"dark"}
  const { liveUser, queueUser } = await (await fetch(
    'https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/live-stats',
    { headers: { 'x-api-key': process.env.STREAMPIXEL_API_KEY } }
  )).json();
  ```

  ```python Python theme={"dark"}
  import os, requests

  r = requests.get(
      "https://platform.streampixel.io/api/v1/projects/664f1a2b3c4d5e6f7a8b9c0d/live-stats",
      headers={"x-api-key": os.environ["STREAMPIXEL_API_KEY"]},
  )
  print(r.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={"dark"}
  { "liveUser": 3, "queueUser": 1 }
  ```
</ResponseExample>

<Tip>
  A non-zero `queueUser` for more than a minute means demand exceeds the project's concurrent-user allowance. [Queue Analytics](/resources/api-reference/queue-analytics) shows how often that happens and how long viewers wait.
</Tip>
