API Endpoints

HypeAuditor For Discovery - Twitch

Endpoint

Get games for Twitch Discovery:

GET https://hypeauditor.com/api/method/auditor.games/?search={game}

Where game is Twitch game to search.

📘

Note:

  • Endpoint returns a list of available games for Discovery filter twitch_games

Changelog

❗️

Important:

  • Twitch Games endpoint has added to HypeAuditor API since January, 30th 2024.

Response Object

AttributesType
basic.idintUnique game identifier
basic.titlestrGame tittle
basic.avatar_urlstrGame cover avatar

Requests

Set YOUR_ID and YOUR_TOKEN from HypeAuditor.

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

Sample response

{
    "result": [
            {
                "basic": {
                    "id": 1468,
                    "title": "Resident Evil 4",
                    "avatar_url": "https://static-cdn.jtvnw.net/ttv-boxart/Resident%20Evil%204-300x300.jpg"
                }
            },
            ...,
            {...} 
     ]
}