Get a single list of viewers for all live inputs


Our project uses your streaming service, thank you!

We need to know the number of viewers of the broadcast at all inputs in real time. We found a way `{videoUid}/views", but we don’t want to make a request for each individual video and update the data frequently (we see performance problems). Is there any common endpoint with the information? Can metrics (getting mass analytics) help us by getting them through GraphQL?

Hi Alex, I would try using the GraphQL API to get bulk metrics for all of your videos: GraphQL Analytics API · Cloudflare Stream docs

Hi Zaid, Thanks for your answer.

What is the name of this metric for the number of online viewers? I didn’t find anything except timeViewedMinutes

Ah, GraphQL API does not include the live viewer count at the moment. Are you unable to use the view count metric for your use case? It would not be that accurate for super long live streams (like live-linear) but could serve as a less-precise proxy for live viewer count for shorter live streams.

Unfortunately, this does not suit us.

Is there information about the maximum available RPS in your service?

@alexnalivayko The{videoUid}/views URL (documented here: Watch a live stream · Cloudflare Stream docs) is designed to accommodate every single viewer for every live input making this call every few seconds. There is no RPS limit to it.


Thank you very much for your helpful answers!

1 Like