API Endpoints

HypeAuditor For Discovery - Twitch

JSON Example

Here you can find request with all available filters

{
    "social_network": "twitch",
    "subscribers_count": {
        "from": 1000,
        "to": 10000000
    },
    "account_languages": [
        "en"
    ],
    "account_has_contacts": true,
    "search": [
        "twitch"
    ],
    "account_geo": {
        "country": [
            "us",
            "gb"
        ]
    },
    "audience_geo": {
        "countries": [
            {
                "id": "us",
                "prc": 3
            }
        ]
    },
    "audience_gender": {
        "gender": "male",
        "prc": 50
    },
    "growth": {
        "period": "365d",
        "from": 0,
        "to": 100
    },
    "twitch_live_viewers_avg": {
        "from": 0,
        "to": 50
    },
    "twitch_active_days_per_week": {
        "from": 0,
        "to": 50
    },
    "twitch_games": {
        "games": [
            19156
        ],
        "period": 30
    },
    "twitch_hours_streamed": {
        "from": 10,
        "to": 1000
    },
    "sort": {
        "field": "subscribers_count",
        "order": "desc"
    },
    "page": 1
}

๐Ÿ“˜

Note:

  • To obtain game IDs, please refer to Endpoint Twitch Games.

Requests

Set YOUR_ID and YOUR_TOKEN from HypeAuditor.

$postFields = [
    'social_network'       => 'twitch',
    'twitch_live_viewers_avg' => ['from' => 1200],
];
$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'       => 'twitch',
    'twitch_live_viewers_avg' => ['from' => 1200],
]);
$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

{
    "result": {
        "search_results": [
            {
                "basic": {
                    "username": "ninja",
                    "title": "Ninja",
                    "avatar_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/90d40495-f467-4911-9035-72d8d10a49c5-profile_image-300x300.png"
                },
                "metrics": {
                    "subscribers_count": {
                        "value": 19187287
                    },
                    "live_viewers": [
                        0
                    ],
                    "hours_streamed": [
                        143.2
                    ],
                    "games": [
                        [
                            "Fortnite",
                            "Marvel Rivals",
                            "Call of Duty: Modern Warfare II"
                        ]
                    ]
                },
                "features": {
                    "social_networks": [
                        {
                            "type": "youtube",
                            "title": "Ninja",
                            "social_id": "UCAW-NpUFkMyCNrvRSSGIvDQ",
                            "username": "ninja",
                            "avatar_url": "https://yt3.googleusercontent.com/5oI9heBQT621qOEhp8xi3RMwNpV-B50Qkvrztu8joCzPo69FC3lQzorHGP0ZpJ8eDdNTMqsc7nc=s900-c-k-c0x00ffffff-no-rj",
                            "subscribers_count": 23848456,
                            "er": 3.865,
                            "state": "READY"
                        },
                        {
                            "type": "twitch",
                            "title": "Ninja",
                            "social_id": "19571641",
                            "username": "ninja",
                            "avatar_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/90d40495-f467-4911-9035-72d8d10a49c5-profile_image-300x300.png",
                            "subscribers_count": 19187287,
                            "er": 0,
                            "state": "READY"
                        },
                        {
                            "type": "instagram",
                            "title": "Tyler โ€œNinjaโ€ Blevins",
                            "social_id": "2077685663",
                            "username": "ninja",
                            "avatar_url": "https://cdn.hypeauditor.com/img/instagram/user/2077685663.jpg?w=150&till=1728338400&sign=170e9d7a23f95d5d6176e00eea51fe93",
                            "subscribers_count": 12194684,
                            "er": 0.088383,
                            "state": "READY"
                        },
                        {
                            "type": "tiktok",
                            "title": "Ninja",
                            "social_id": "6751467583184864261",
                            "username": "ninja",
                            "avatar_url": "https://cdn.hypeauditor.com/img/tiktok/user/6751467583184864261.jpg?w=150&till=1728338400&sign=5bc7f7fde3c47605b2af67c2d5d1aae3",
                            "subscribers_count": 10760121,
                            "er": 4.88,
                            "state": "READY"
                        },
                        {
                            "type": "twitter",
                            "title": "Ninja",
                            "social_id": "214201922",
                            "username": "ninja",
                            "avatar_url": "https://pbs.twimg.com/profile_images/1791181533233152000/JVNg74Vp_400x400.jpg",
                            "subscribers_count": 6600468,
                            "er": 2.0e-6,
                            "state": "READY"
                        }
                    ],
                    "search_content": []
                }
            },
          "current_page": 1,
          "total_pages": 37882,
          "queries_left": 99956
    }
}

Errors