API Endpoints

HypeAuditor For Discovery

Endpoint

Get posts that contain specific keywords:

GET https://hypeauditor.com/api/method/auditor.searchKeywordsPosts/?socialNetwork={socialNetwork}&contentIds={contentIds}

📘

Note:

{socialNetwork} parameter is the string name of the social network: instagram, youtube, tiktok or twitter, and {contentIds} is the string set of IDs separated by commas .

Content IDs can be retrieved in path result.search_results.features.search_content from Discovery search response by previously using search_content parameter.

Response Object

AttributesType
postsobjectHash map where keys is posts id and value is posts object

Posts Object

AttributesType
basicobjectMain data about posts
metricsobjectMetrics data about posts

Posts basic Object

AttributesType
idstringPost identifier, can be used to map with metrics
codestringInstagram post URL
captionstringPost caption
preview_urlstringLink to image stored in our cdn
time_postedtimestampPublication date of the post
typestringType of content, e.g. ‘post’, ‘reel’, ‘igtv’
is_deletedboleanPost is deleted

Posts metrics Object

Every metric is object with value e.g. { "value": 1062173 }

AttributesType
likes_countintAmount of likes
comments_countintAmount of comments
video_views_countintAmount of views
erintEngaging rate
er_markstringEngaging rate mark. E.g. average

Requests

Set YOUR_ID and YOUR_TOKEN from HypeAuditor.

curl -X GET \
	https://hypeauditor.com/api/auditor.searchKeywordsPosts\
  -H 'content-type: application/x-www-form-urlencoded'\
  -H 'x-auth-id: %YOUR_ID%' \
  -H 'x-auth-token: %YOUR_TOKEN%' \
  -d socialNetwork= instagram  \
  -d contentIds= 2967308681525079321,2952174452835476751
<?php
$curl = curl_init();
curl_setopt_array($curl, [
   CURLOPT_URL => 'https://hypeauditor.com/api/auditor.searchKeywordsPosts',
   CURLOPT_CUSTOMREQUEST => 'GET',
   CURLOPT_POSTFIELDS => [
       'socialNetwork' => 'instagram',
       'contentIds' => '2967308681525079321,2952174452835476751'
   ],
   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;
}

Response

{
    "result": {
        "posts": {
            "2952174452835476751": {
                "basic": {
                    "id": "2952174452835476751",
                    "code": "Cj4OwYIPeUP",
                    "caption": "Can’t believe it’s already been a week since my birthday party! Thank you to every single person who came out to celebrate especially all the fine ass women who showed up in their sexy burlesque outfits 😋. And of course thank you @whip_shots , @vitaminwater and @shakeshack for making sure ppl were lit and fed lol. I still can’t believe I’m 30 with two kids 😳🤯",
                    "preview_url": "https://cdn.hypeauditor.com/img/instagram/post/2952174452835476751.jpg?w=200&till=1673188885&sign=f50b2d4623216fcb3d2bef472807e5c0",
                    "time_posted": 1666146744,
                    "type": "reel",
                    "is_deleted": null
                },
                "metrics": {
                    "likes_count": 1062173,
                    "comments_count": 10229,
                    "video_views_count": 6198760,
                    "er": 0.74,
                    "er_mark": "average"
                }
            },
            "2967308681525079321": {
                "basic": {
                    "id": "2967308681525079321",
                    "code": "Ckt_4Y9PC0Z",
                    "caption": "get yo watch party ready 👀🍾",
                    "preview_url": "https://cdn.hypeauditor.com/img/instagram/post/2967308681525079321.jpg?w=200&till=1673188885&sign=683b8364855dfcc1e2d0abfeb57b071d",
                    "time_posted": 1667950781,
                    "type": "post",
                    "is_deleted": false
                },
                "metrics": {
                    "likes_count": 3346769,
                    "comments_count": 12779,
                    "video_views_count": 0,
                    "er": 2.42,
                    "er_mark": "good"
                }
            }
        },
        "queries_left": 390
    }
}