HypeAuditor For Twitch
Endpoint
Get the report of a Twitch channel:
GET https://hypeauditor.com/api/method/auditor.twitch/?channel={channel}
Channel
is Twitch username (nasa
) from the url of Twitch channel (https://www.twitch.tv/nasa
).
Returns the report if it’s ready or requests the report if it’s not ready. First check of the username costs 1 credit and the report will be accessible for 1 year. Note: Next check after 365 days will also cost 1 credit.
Note:
nasa
report is free, use it to test the API.- Next check after 365 days will also cost 1 credit. To check the number of remaining credits, please refer to
restTokens
field in the fetched response.
Error codes
You will receive error if requested channel is not found, has no videos or no views.
CHANNEL_NOT_FOUND
channel not found on TwitchNO_VIDEOS
channel has no videosNO_VIEWS
channel has no viewsREPORT_CALCULATING
come back later
Response Object
Attributes | Type | |
---|---|---|
report | object | Twitch report data |
Report Object
Attributes | Type | |
---|---|---|
basic | object | general information about the channel |
metrics | object | channel metrics and calculated metrics |
features | object | rich data about channel |
Basic Object
Attributes | Type | |
---|---|---|
id | string | channel id |
username | string | channel username |
title | string | channel title |
avatar_url | string | channel avatar url |
description | string | channel description |
Metrics Object
Each metrics objects may contain value
field and performance
object. Performance object contains 4 periods of data: (30d
for 30 day data, 90d
for 90, 180d
for 180 and all
for all-time data). Each period object contains value
computed for current period (30/90/180d) and value_prev
computed for the same period before current. For example: on 4th of July value
shows data for Jun 5 - Jul 4 and value_prev
shows data for May 4 - Jun 4. Note: value
and values in performance are not the same. all
objects contain last two years data.
subscribers_count
Attributes | Type | |
---|---|---|
value | int | Number of total subscribers |
performance.value | int | number of new subscribers in a given period |
following_count
Attributes | Type | |
---|---|---|
value | int | Number of total following |
performance.value | int | number of new following in a given period |
views_avg
Attributes | Type | |
---|---|---|
performance.value | int | number of average views in a given period |
performance.max | int | number of max. average views in a given period |
performance.min | int | number of min. average views in a given period |
performance.value_prev | int | number of average views in the previous period |
subscribers_growth_prc
Attributes | Type | |
---|---|---|
performance.value | float | value in a given period |
performance.mark | string | quality mark |
performance.similar | float | value for similar accounts in a given period |
views_count
Attributes | Type | |
---|---|---|
value | int | Views count value |
live_viewers_avg
Attributes | Type | |
---|---|---|
performance.value | int | value in a given period |
performance.value_prev | int | value for similar accounts in a given period |
videos_per_week
Attributes | Type | |
---|---|---|
performance.value | int | value in a given period |
performance.value_prev | int | value for similar accounts in a given period |
video_views_count
Attributes | Type | |
---|---|---|
performance.value | float | value in a given period |
performance.value_prev | float | value for similar accounts in a given period |
video_views_avg
Attributes | Type | |
---|---|---|
performance.value | float | value in a given period |
performance.value_prev | float | value for similar accounts in a given period |
views_rate
Attributes | Type | |
---|---|---|
performance.value | float | value in a given period |
performance.value_prev | float | value for similar accounts in a given period |
hours_streamed
Attributes | Type | |
---|---|---|
performance.value | float | value in a given period |
performance.value_prev | float | value for similar accounts in a given period |
active_days_per_week
Attributes | Type | |
---|---|---|
performance.value | int | value in a given period |
performance.value_prev | int | value for similar accounts in a given period |
chat_messages_per_hour
Attributes | Type | |
---|---|---|
performance.value | float | value in a given period |
performance.similar | float | value for similar accounts in a given period |
performance.mark | string | quality mark |
performance.mark_tittle | string | quality tittle for mark |
Mark
poor
fair
average
good
excellent
Features Object
audience_age_gender
Audience age gender distribution. If object is null that means no data available for channel.
Attributes | Type | |
---|---|---|
data | object | Dict of age objects. Each age object contains two genders (male and female). |
Age objects are: 13-17
, 18-24
, 25-34
, 35-44
, 45-54
, 55-64
, 65+
audience_geo
Audience geo. If object is null that means no data available for channel.
Attributes | Type | |
---|---|---|
data | array | array of {code: string, prc: float} objects. Code is ISO Alpha-2 two letter country code. |
stream_viewers
Stream viewers
Attributes | Type | |
---|---|---|
data | array | array of objects |
data.{ }.video_id | string | video ID |
data.{ }.chart | array | array of {value: int, time_iso: string} . value is number of stream viewers, time_iso is date in ISO format |
audience_languages
Audience languages. If object is null that means no data available for channel.
Attributes | Type | |
---|---|---|
data | array | array of {title: string, prc: float} objects. Code is ISO Alpha-2 two letter lang code. |
audience_sentiments
Attributes | Type | |
---|---|---|
data.sentiments.POSITIVE.count | int | count of positive comments |
data.sentiments.POSITIVE.prc | float | prc of positive comments |
data.sentiments.NEUTRAL.count | int | count of neutral comments |
data.sentiments.NEUTRAL.prc | float | prc of neutral comments |
data.sentiments.NEGATIVE.count | int | count of negative comments |
data.sentiments.NEGATIVE.prc | float | prc of negative comments |
data.score | int | final score |
data.comments_count | int | count of comments |
data.posts_count | int | count of posts |
most_media
Lists of most (in some parameters) media ids
Attributes | Type | |
---|---|---|
data | object | {most_hours_streamed: array of media ids for a given period, most_views: array of media ids for a given period} . |
blogger_geo
List of influencer auditory geo with percentage of total auditory
Attributes | Type | |
---|---|---|
data.countries | array | array of {"id": "es", "code": "es", "prc": 28.39} objects. |
blogger_emails
List of blogger contact emails
Attributes | Type | |
---|---|---|
data | array | array of emails. |
blogger_languages
List of blogger languages
Attributes | Type | |
---|---|---|
data | array | array of blogger languages in two-cars code format. |
games
Games played
Attributes | Type | |
---|---|---|
data | array | array of {basic: object, metrics: object} objects. |
data.basic.id | string | Game ID |
data.basic.tittle | string | Tittle of game |
data.basic.avatar_url | string | Game avatar URL |
data.metrics.subscribers_count | int | Subscribers count |
data.metrics.streams_count | object | Streams count object for given period {performance.{period}.value: int} |
data.metrics.views_avg | object | Views average object for given period {performance.{period}.value: int} |
data.metrics.hours_streamed | object | Hours streamed object for given period {performance.{period}.value: float} |
social_networks
Attributes | Type | |
---|---|---|
data | array | array of {type: int, id: string} objects. |
Social networks ids map:
Id | Social network |
---|---|
1 | |
2 | YouTube |
3 | TikTok |
4 | Twitch |
5 | |
7 | Snapchat |
Requests
Set YOUR_ID
and YOUR_TOKEN
from HypeAuditor.
curl -X POST \
https://hypeauditor.com/api/method/auditor.twitch \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'x-auth-id: %YOUR_ID%' \
-H 'x-auth-token: %YOUR_TOKEN%' \
-d channel=nasa \
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://hypeauditor.com/api/method/auditor.twitch',
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => [
'channel' => 'nasa'
],
CURLOPT_HTTPHEADER => [
'x-auth-id: YOUR_ID',
'x-auth-token: YOUR_TOKEN'
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo 'cURL Error #:' . $err;
} else {
echo $response;
}
Note:
You don’t need to pre-request the report from web, you can request it directly from API.
Sample request
GET https://hypeauditor.com/api/method/auditor.twitch/?channel=nasa
Sample response
{
"result": {
"report": {
"basic": {
"id": "151920918",
"username": "nasa",
"title": "NASA",
"avatar_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/nasa-profile_image-739106d9e1948b76-300x300.png",
"description": "Explore the universe and discover our home planet with the official NASA channel on Twitch. "
},
"metrics": {
"subscribers_count": {
"value": 1172469,
"performance": {
"30d": {
"value": -1100
},
"90d": {
"value": 1309
},
"180d": {
"value": 2147
}
}
},
"following_count": {
"value": 0,
"performance": null
},
"views_avg": {
"performance": {
"7d": {
"value": 0,
"max": 0,
"min": 0,
"value_prev": 0
},
"30d": {
"value": 0,
"max": 0,
"min": 0,
"value_prev": 13418
},
"90d": {
"value": 18642,
"max": 91420,
"min": 1454,
"value_prev": 58029
},
"180d": {
"value": 42132,
"max": 108692,
"min": 1454,
"value_prev": 83683
},
"365d": {
"value": 67099,
"max": 325854,
"min": 1454,
"value_prev": 48987
},
"all": {
"value": 37078,
"max": 1579173,
"min": 101
}
}
},
"subscribers_growth_prc": {
"performance": {
"30d": {
"value": -0.09,
"mark": "good",
"similar": -0.072222
},
"90d": {
"value": 0.11,
"mark": "good",
"similar": 1.852935
},
"180d": {
"value": 0.18,
"mark": "average",
"similar": 6.479253
}
}
},
"views_count": {
"value": 15403785
},
"live_viewers_avg": {
"performance": {
"7d": {
"value": 0,
"value_prev": null
},
"30d": {
"value": 0,
"value_prev": 5688
},
"90d": {
"value": 1734,
"value_prev": 5071
},
"180d": {
"value": 4319,
"value_prev": 6115
},
"365d": {
"value": 5785,
"value_prev": 11126
},
"all": {
"value": 9530,
"value_prev": null
}
}
},
"videos_per_week": {
"performance": {
"7d": {
"value": 0,
"value_prev": 0
},
"30d": {
"value": 0,
"value_prev": 1
},
"90d": {
"value": 0,
"value_prev": 0
},
"180d": {
"value": 0,
"value_prev": 0
},
"365d": {
"value": 0,
"value_prev": 0
},
"all": {
"value": 0,
"value_prev": 0
}
}
},
"video_views_count": {
"performance": {
"7d": {
"value": 0,
"value_prev": 0
},
"30d": {
"value": 0,
"value_prev": 162223
},
"90d": {
"value": 204906,
"value_prev": 410842
},
"180d": {
"value": 615748,
"value_prev": 2294950
},
"365d": {
"value": 2910698,
"value_prev": 11149105
},
"all": {
"value": 15652673,
"value_prev": 0
}
}
},
"video_views_avg": {
"performance": {
"7d": {
"value": 0,
"value_prev": 0
},
"30d": {
"value": 0,
"value_prev": 13418
},
"90d": {
"value": 18642.5,
"value_prev": 58029
},
"180d": {
"value": 42131.5,
"value_prev": 83683
},
"365d": {
"value": 67099,
"value_prev": 48987
},
"all": {
"value": 37078,
"value_prev": 0
}
}
},
"views_rate": {
"performance": {
"7d": {
"value": 0,
"value_prev": 0
},
"30d": {
"value": 0,
"value_prev": 1.14
},
"90d": {
"value": 1.59,
"value_prev": 4.95
},
"180d": {
"value": 3.59,
"value_prev": 7.14
},
"365d": {
"value": 5.72,
"value_prev": 4.18
},
"all": {
"value": 3.16,
"value_prev": 0
}
}
},
"hours_streamed": {
"performance": {
"7d": {
"value": 0,
"value_prev": 0
},
"30d": {
"value": 0,
"value_prev": 1.81
},
"90d": {
"value": 2.88,
"value_prev": 10.96
},
"180d": {
"value": 13.84,
"value_prev": 49.07
},
"365d": {
"value": 62.91,
"value_prev": 86.56
},
"all": {
"value": 230.9,
"value_prev": 0
}
}
},
"active_days_per_week": {
"performance": {
"7d": {
"value": 0,
"value_prev": 0
},
"30d": {
"value": 0,
"value_prev": 0
},
"90d": {
"value": 0,
"value_prev": 0
},
"180d": {
"value": 0,
"value_prev": 1
},
"365d": {
"value": 0,
"value_prev": 1
},
"all": {
"value": 0,
"value_prev": 0
}
}
},
"chat_messages_per_hour": {
"performance": {
"7d": {
"value": 0,
"similar": 691.6,
"mark": "poor",
"mark_title": "poor"
},
"30d": {
"value": 0,
"similar": 760.172573,
"mark": "poor",
"mark_title": "poor"
},
"90d": {
"value": 0,
"similar": 770.762756,
"mark": "poor",
"mark_title": "poor"
},
"180d": {
"value": 0,
"similar": 773.16985,
"mark": "poor",
"mark_title": "poor"
},
"365d": {
"value": 2550,
"similar": 773.135512,
"mark": "very_good",
"mark_title": "very_good"
},
"all": {
"value": 2550,
"similar": 772.942,
"mark": "very_good",
"mark_title": "very_good"
}
}
}
},
"features": {
"audience_age_gender": {
"data": {
"13-17": {
"male": 0,
"female": 0
},
"18-24": {
"male": 25,
"female": 0
},
"25-34": {
"male": 25,
"female": 0
},
"35-44": {
"male": 0,
"female": 0
},
"45-54": {
"male": 25,
"female": 0
},
"55-64": {
"male": 25,
"female": 0
},
"65+": {
"male": 0,
"female": 0
}
}
},
"audience_geo": {
"data": {
"countries": [
{
"id": "us",
"code": "us",
"prc": 75
},
{
"id": "tn",
"code": "tn",
"prc": 25
},
{
"id": "gb",
"code": "gb",
"prc": 0
}
],
"groups": {
"africa": 25,
"america": 75,
"imea": 25
}
}
},
"stream_viewers": {
"data": []
},
"audience_languages": {
"data": [
{
"title": "en",
"prc": 76.47
},
{
"title": "pt",
"prc": 2.94
},
{
"title": "ja",
"prc": 2.94
}
]
},
"audience_sentiments": null,
"most_media": {
"data": {
"most_hours_streamed": {
"performance": {
"7d": {
"media_ids": []
},
"30d": {
"media_ids": []
},
"90d": {
"media_ids": [
"1530833235",
"1316037901",
"1316011671",
"1529669395",
"1529693643"
]
},
"180d": {
"media_ids": [
"1468115731",
"1468784381",
"1449879853",
"1412359057",
"1428691057"
]
},
"365d": {
"media_ids": [
"1146490329",
"1201763641",
"1468115731",
"1256985985",
"1221781700"
]
},
"all": {
"media_ids": [
"636407963",
"947658044",
"698106525",
"1146490329",
"496207349"
]
}
}
},
"most_views": {
"performance": {
"7d": {
"media_ids": []
},
"30d": {
"media_ids": []
},
"90d": {
"media_ids": [
"1530833235",
"1529669395",
"1316011671",
"1316037901",
"1529663473"
]
},
"180d": {
"media_ids": [
"1468115731",
"1530833235",
"1449879853",
"1468784381",
"1450965945"
]
},
"365d": {
"media_ids": [
"1242970534",
"1256985985",
"1146490329",
"1201763641",
"1214401965"
]
},
"all": {
"media_ids": [
"919215638",
"937725331",
"924423369",
"1057906957",
"1062015879"
]
}
}
}
}
},
"blogger_geo": {
"data": null
},
"blogger_emails": {
"data": []
},
"blogger_languages": {
"data": [
"en"
]
},
"games": {
"data": [
{
"basic": {
"id": "509670",
"title": "Science & Technology",
"avatar_url": "https://static-cdn.jtvnw.net/ttv-boxart/509670-300x300.jpg"
},
"metrics": {
"subscribers_count": 693836,
"streams_count": {
"performance": {
"7d": {
"value": 0
},
"30d": {
"value": 0
},
"90d": {
"value": 0
},
"180d": {
"value": 0
},
"365d": {
"value": 6
},
"all": {
"value": 13
}
}
},
"views_avg": {
"performance": {
"7d": {
"value": 0
},
"30d": {
"value": 0
},
"90d": {
"value": 0
},
"180d": {
"value": 0
},
"365d": {
"value": 6846
},
"all": {
"value": 11268
}
}
},
"hours_streamed": {
"performance": {
"7d": {
"value": 0
},
"30d": {
"value": 0
},
"90d": {
"value": 0
},
"180d": {
"value": 0
},
"365d": {
"value": 16.1
},
"all": {
"value": 40.8
}
}
}
}
}
]
},
"social_networks": {
"data": [
{
"type": 4,
"id": "nasa"
}
]
}
}
},
"restTokens": 1208
}
}
highDemand
field is “true” when HypeAuditor experiences unexpected high load that effects report generation time negatively. When you receive that field you may want to inform your users that the delay is temporary and we’re fixing it. Everything will go back to normal and all requests are safe.