Fetch viewer analytics data for the most viewed live streams
(Available from version 1.11) This operation returns viewer data for the top 100 live streams in an account.
Querying data
To get viewer data for the top 100 streams that ran previously, send from and to values.
If you do not send from and to values, the last five minutes' worth of live stream viewer data is returned.
If the time range between from and to query parameters is:
<ul><li>Less than 60 minutes, the cache time between responses is 10 seconds.</li> <li>More than 60 minutes, the cache time between responses is 60 seconds.</li>Query parameters
Use this parameter, along with to, to return historic viewer data.
The start of the range of time you want to view. Specify YYYY-DD-MMT HH:MM:SSZ where HH is a 24-hour clock in UTC. The range queried is rounded to the nearest second. If you set the from query parameter without setting the to query parameter, the data returned will reflect 30 days starting at the from date, or data up to to the current day, whichever is shorter.
Example: 2024-03-14T10:31:54.486Z
Use this parameter, along with from, to return historic viewer data.
The end of the range of time you want to view. Specify YYYY-DD-MMT HH:MM:SSZ where HH is a 24-hour clock in UTC. The range queried is rounded to the nearest second. If you set the to query parameter without setting the from query parameter, the data returned will be from the past 30 days.
Example: 2024-03-14T10:31:54.486Z
Response
Success
Example response
{
"live_streams": [
{
"id": "4Jjzstdt",
"viewers": 3
},
{
"id": "fFWxVsyj",
"viewers": 4
}
],
"limits": {
"from": "2023-04-14T10:31:54.486Z",
"to": "2023-07-13T10:31:54.486Z"
}
}