HypeAuditor For Discovery - Twitter
JSON Example
Here you can find request with all available filters
{
"social_network": "twitter",
"er": {
"from": 0,
"to": 13
},
"subscribers_count": {
"from": 1000,
"to": 10000000
},
"account_languages": [
"en"
],
"verified": 0,
"account_has_contacts": true,
"search": [
"adidas"
],
"account_geo": {
"country": [
"us",
"gb"
]
},
"last_media_time": {
"from": 1626072318
},
"twitter_tweet": {
"from": 0,
"to": 50
},
"twitter_replies": {
"from": 0,
"to": 50
},
"twitter_likes": {
"from": 0,
"to": 50
},
"twitter_retweet": {
"from": 0,
"to": 50
},
"growth": {
"period": "365d",
"from": 0,
"to": 100
},
"sort": {
"field": "subscribers_count",
"order": "desc"
},
"page": 1
}
Requests
Set YOUR_ID
and YOUR_TOKEN
from HypeAuditor.
$postFields = [
'social_network' => 'twitter',
'twitter_tweet' => ['from' => 100],
];
$opts = [
CURLOPT_URL => 'https://hypeauditor.com/api/method/auditor.searchSandbox',
CURLOPT_TIMEOUT => 10,
CURLOPT_POSTFIELDS => $postFields,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Auth-Id: CLIENT_ID_HERE',
'X-Auth-Token: API_TOKEN_HERE',
],
];
$ch = curl_init();
curl_setopt_array($ch, $opts);
$response = curl_exec($ch);
var_dump($response);
$postFields = json_encode([
'social_network' => 'twitter',
'twitter_tweet' => ['from' => 100],
]);
$opts = [
CURLOPT_URL => 'https://hypeauditor.com/api/method/auditor.searchSandbox',
CURLOPT_TIMEOUT => 10,
CURLOPT_POSTFIELDS => $postFields,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Auth-Id: CLIENT_ID_HERE',
'X-Auth-Token: API_TOKEN_HERE',
'Content-Type: application/json',
'Content-Length: '.strlen($postFields),
],
];
$ch = curl_init();
curl_setopt_array($ch, $opts);
$response = curl_exec($ch);
var_dump($response);
Response Object
Response can contain search_results
array. Please, check Change Log for further information.
{
"result": {
"search_results": [
{
"basic": {
"username": "cristiano",
"title": "Cristiano Ronaldo",
"avatar_url": "https://pbs.twimg.com/profile_images/1594446880498401282/o4L2z8Ay_400x400.jpg"
},
"metrics": {
"er": {
"value": 7.649999999999999e-5
},
"subscribers_count": {
"value": 114482008
},
"avg_tweets": {
"value": 7
},
"avg_retweets": {
"value": 55525
}
},
"features": {
"social_networks": [
{
"type": "twitter",
"title": "Cristiano Ronaldo",
"social_id": "155659213",
"username": "cristiano",
"avatar_url": "https://pbs.twimg.com/profile_images/1594446880498401282/o4L2z8Ay_400x400.jpg",
"subscribers_count": 114482008,
"er": 7.649999999999999e-5,
"state": "READY"
}
],
"search_content": []
}
},
"current_page": 1,
"total_pages": 50195,
"queries_left": 99954
}
}