Skip to navigation

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: Manage streams

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.

  • Username: Access Token ID
  • Password: Secret Key

Activate your FastPix account to generate your API credentials. See the guide here

Path parameters

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

Response

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