The Streamroot Data API gives access to streams, platforms, ISPs and countries in a list format. This article explains how to obtain this data.
Query parameters
Parameter | Type | Description |
since | string |
Since given elapsed time - (s=seconds, d=days, h=hours, w=weeks). |
from | string | YYYY-MM-DD or Unix timestamp. Required if param 'to' present. |
to | string |
YYYY-MM-DD or Unix timestamp. Required if param 'from' present. |
sortBy | string |
Sort the data by one of its fields (ascending order). Add the Desc keyword to sort the data by descending order (eg: sortBy=maxViewersDesc). |
live* | boolean | Filter to get only live or only VoD. |
*: only available for streams and platforms
Streams
Endpoint
GET https://apiv2.streamroot.io/data/streams
Response
[
{
"cdn": 4.70158912e+08,
"p2p": 7.2717632e+07,
"total": 4.7743067e+13,
"percentage": 14,
"manifest": "http://edge.com/8g7h6j5k/playlist.m3u8",
"trafficPercentage": 3.138709845613234,
"viewers": 0,
"maxViewers": 153,
"averageViewers": 142.92592592592592,
"live": "false"
},
{
"cdn": 1.591616e+06,
"p2p": 1.983232e+06,
"total": 3.5747383e+12,
"percentage": 56,
"manifest": "http://edge.com/5cfgv4b3hj/playlist.m3u8",
"trafficPercentage": 0.020668438778910992,
"viewers": 0,
"maxViewers": 85,
"averageViewers": 63.629629629629626,
"live": "true"
}
]
Platforms
Endpoint
GET https://apiv2.streamroot.io/data/platform
Response
[
{
"platform": "web-desktop",
"cdn": 2.34137348941e+11,
"p2p": 4.433132624e+10,
"total": 2.78468675181e+11,
"upload": 4.9993121501e+10,
"percentage": 16,
"viewers": 5,
"maxViewers": 12,
"averageViewers": 2.31522025850699,
"trafficPercentage": 56.86791477886231,
"live": "unknown"
},
{
"platform": "android",
"cdn": 3.2359940628e+10,
"p2p": 5.249050392e+09,
"total": 3.760899102e+10,
"upload": 3.485214072e+09,
"percentage": 14,
"viewers": 1,
"maxViewers": 7,
"averageViewers": 1.5443592552026286,
"trafficPercentage": 7.680378753029257,
"live": "unknown"
}
]
ISPs
Endpoint
GET https://apiv2.streamroot.io/data/isp
Response
[
{
"cdn": 2588337692,
"p2p": 1703553164,
"total": 4291890856,
"percentage": 40,
"isp": "1&1 Internet AG"
},
{
"cdn": 854836,
"p2p": 0,
"total": 854836,
"percentage": 0,
"isp": "123 Internetworks Pty. Ltd."
}
]
Countries
Endpoint
GET https://apiv2.streamroot.io/data/country
Response
[
{
"cdn": 100604828987,
"p2p": 24480744300,
"total": 125085573287,
"percentage": 20,
"country": "BO"
},
{
"cdn": 10937445200,
"p2p": 3654261844,
"total": 14591707044,
"percentage": 26,
"country": "SR"
}
]