HypeAuditor For TikTok
Endpoint
Get metrics history of TikTok channel
GET https://hypeauditor.com/api/method/auditor.tiktokHistory/?channel={channel}
Channel
is TikTok username (littlebig
) from the url of TikTok channel (https://www.tiktok.com/@littlebig
). Returns the metrics history if it’s ready.
Note:
- By requesting Metrics History, user UNLOCKS report (
auditor.tiktok
method).littlebig
report is free, use it to test the API.- Disclaimer: HypeAuditor only provides historical data from the moment when the account to be searched was added to our database.
Response Object
Attributes | Type | |
---|---|---|
metrics_history | object | Metrics history data |
Metrics History Object
Contains subscribers_count
, following_count
, likes_count
, posts_count
and er
metrics history.
Attributes | Type | |
---|---|---|
value | integer | Last observed value of metric (value not included for er ) |
history | array | array of {value: int/float, time: int} objects. Time is unix timestamp. |
Requests
Set YOUR_ID
and YOUR_TOKEN
from HypeAuditor.
curl -X POST \
https://hypeauditor.com/api/method/auditor.tiktokHistory \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'x-auth-id: %YOUR_ID%' \
-H 'x-auth-token: %YOUR_TOKEN%' \
-d channel=littlebig \
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://hypeauditor.com/api/method/auditor.tiktokHistory',
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => [
'channel' => 'littlebig'
],
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;
}
Sample request
GET https://hypeauditor.com/api/method/auditor.tiktokHistory/?channel=littlebig
Sample response
{
"result": {
"metrics_history": {
"subscribers_count": {
"value": 3300000,
"history": [
{
"value": 1302199,
"timestamp": 1580428800
},
...
]
},
"following_count": {
"value": 2,
"history": [
{
"value": 1,
"timestamp": 1580428800
},
...
]
},
"likes_count": {
"value": 16200000,
"history": [
{
"value": 5867841,
"timestamp": 1580428800
},
...
]
},
"posts_count": {
"value": 33,
"history": [
{
"value": 15,
"timestamp": 1580428800
},
...
]
},
"er": {
"history": [
{
"value": 5.17,
"timestamp": 1677974400
},
...
]
}
},
"restTokens": 6
}
}