Get stream views by ID

This endpoint retrieves the current number of viewers watching a specific live stream, identified by its unique `streamId`. The viewer count is an **approximate value**, optimized for performance. It provides a near-real-time estimate of how many clients are actively watching the stream. This approach ensures high efficiency, especially when the stream is being watched at large scale across multiple devices or platforms. #### Example Suppose a content creator is hosting a live concert and wants to display the number of live viewers on their dashboard. This endpoint can be queried to show up-to-date viewer statistics. Related guide: <a href="https://fastpix.com/docs/live-streaming/create-and-manage-live-streams#how-to-get-stream-viewers">Manage streams</a>

Authentication

AuthorizationBasic
FastPix APIs are secured with Basic Authentication. Use your Access Token ID as the username and Secret Key as the password in the Authorization header of each API request. - <b>Username:</b> Access Token ID - <b>Password:</b> Secret Key Activate your FastPix account to generate your API credentials. <a href="https://fastpix.com/docs/getting-started/activate-your-account" target="_blank">See the guide here</a>

Path parameters

streamIdstringRequired
After creating a new live stream, FastPix assigns a unique identifier to the stream.

Response

Stream viewer count retrieved successfully
successboolean
Shows the request status. Returns true for success and false for failure.
dataobject
Contains the view count details.