API Endpoints

HypeAuditor For Snapchat

Endpoint

Get the report of a Snapchat channel:

GET https://hypeauditor.com/api/method/auditor.snapchat/?channel={channel}

Channel is Snapchat username (nasa) from the url of Snapchat channel (https://www.snapchat.com/add/nasa).

Returns the report if it’s ready or requests the report if it’s not ready. First check of the username costs 1 credit and the report will be accessible for 1 year. Note: Next check after 365 days will also cost 1 credit.

📘

Note:

nasa report is free, use it to test the API.


Changelog

❗️

Important:


Error codes

You will receive error if requested channel is not found, has no videos or no views.

  • CHANNEL_NOT_FOUND channel not found on Snapchat
  • REPORT_CALCULATING come back later

Response Object

AttributesType
reportobjectSnapchat report data

Report Object

AttributesType
basicobjectgeneral information about the channel
metricsobjectchannel metrics and calculated metrics
featuresobjectrich data about channel

Basic Object

AttributesType
idstringchannel id
usernamestringchannel username
titlestringchannel title
avatar_urlstringchannel avatar url
descriptionstringchannel description

Metrics Object

Each metric object may contain value field and performance object. Performance object contains 3 periods of data: (30d for 30 days, 90d for 90 days, and 180d for 180 days). Each period object may contain value computed for current period (30/90/180d).

subscribers_count

AttributesType
valueintNumber of total subscribers
performance.valueintnumber of new subscribers in a given period

subscribers_growth_prc

AttributesType
performance.valuefloatvalue in a given period
performance.markstringquality mark
performance.similarfloatvalue for similar accounts in a given period

Marks:

  • poor
  • fair
  • average
  • good
  • excellent

views_count

AttributesType
valueintvalue of views count
markstringquality mark
similarsintvalue for similar accounts
performance.valuefloatvalue in a given period
performance.markstringquality mark in a given period
performance.similarfloatvalue for similar accounts in a given period

views_avg

AttributesType
valueintvalue of views average
performance.valueintvalue in a given period
performance.minintmax. value in a given period
performance.maxintmin. value in a given period

media_count

AttributesType
performance.valueintvalue in a given period

media_per_week

AttributesType
performance.valueintvalue in a given period

Features Object

most_media

Lists of most media ids. Object media_ids includes spotlights , snaps and all. Each media_ids object contains sorting by views_desc and time_posted_desc where performance object is included for given periods.

AttributesType
data.media_ids.{media_type}.views_descobject with array of media_idsMedia IDs desc. sorted by views
data.media_ids.{media_type}.time_posted_descobject with array of media_idsMedia IDs desc. sorted by time posted
data.media_ids.{media_type}.{sort}.performance.{period}.media_idsArray of media_idsMedia IDs

blogger_emails

List of blogger contact emails

AttributesType
dataarrayarray of emails.

blogger_geo

Blogger geo if available

AttributesType
data.countrystringISO Alpha-2 two letter country code.
data.cityintcity id from https://www.geonames.org
data.stateintstate id from https://www.geonames.org

blogger_languages

AttributesType
dataarrayarray of 2 letter lang codes

blogger_hashtags

blogger_hashtags object contains performance object for given periods

AttributesType
data.performance.{period}arrayarray of hashtag objects {text: string, media_count: int, er_avg: float}

social_networks

AttributesType
dataarrayarray of {type: int, id: string} objects.

Social networks ids map:

IdSocial network
1Instagram
2YouTube
3TikTok
4Twitch
5Twitter
7Snapchat

Requests

Set YOUR_ID and YOUR_TOKEN from HypeAuditor.

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

📘

Note:

You don’t need to pre-request the report from web, you can request it directly from API.

Sample request

GET https://hypeauditor.com/api/method/auditor.snapchat/?channel=nasa

Sample response

{
    "result": {
        "report": {
            "basic": {
                "id": "nasa",
                "username": "nasa",
                "title": "NASA",
                "avatar_url": "https://cf-st.sc-cdn.net/aps/bolt/aHR0cHM6Ly9jZi1zdC5zYy1jZG4ubmV0L2QvUVg2VHZkaDBHNUMzcXVidWhWaTJhP2JvPUVnMGFBQm9BTWdFRVNBSlFHV0FCJnVjPTI1._RS0,90_FMjpeg",
                "description": "Explore the universe and discover our home planet with official NASA snaps."
            },
            "metrics": {
                "subscribers_count": {
                    "value": 829000,
                    "performance": {
                        "30d": {
                            "value": 0
                        },
                        "90d": {
                            "value": 0
                        },
                        "180d": {
                            "value": 0
                        }
                    }
                },
                "subscribers_growth_prc": {
                    "performance": {
                        "30d": {
                            "value": 0,
                            "mark": "fair",
                            "similar": 0.280833
                        },
                        "90d": {
                            "value": 0,
                            "mark": "fair",
                            "similar": 0.280833
                        },
                        "180d": {
                            "value": 0,
                            "mark": "fair",
                            "similar": 0.280833
                        }
                    }
                },
                "views_count": {
                    "value": 0,
                    "mark": "poor",
                    "similar": 75,
                    "performance": {
                        "30d": {
                            "value": 0,
                            "mark": "poor",
                            "similar": 27199
                        },
                        "90d": {
                            "value": 0,
                            "mark": "poor",
                            "similar": 89880
                        },
                        "180d": {
                            "value": 0,
                            "mark": "poor",
                            "similar": 158037
                        }
                    }
                },
                "views_avg": {
                    "value": 0,
                    "performance": {
                        "30d": {
                            "value": 0,
                            "min": null,
                            "max": null
                        },
                        "90d": {
                            "value": 0,
                            "min": null,
                            "max": null
                        },
                        "180d": {
                            "value": 0,
                            "min": null,
                            "max": null
                        }
                    }
                },
                "media_count": {
                    "performance": {
                        "30d": {
                            "value": 0
                        },
                        "90d": {
                            "value": 12
                        },
                        "180d": {
                            "value": 12
                        }
                    }
                },
                "media_per_week": {
                    "performance": {
                        "30d": {
                            "value": 0
                        },
                        "90d": {
                            "value": 1
                        },
                        "180d": {
                            "value": 0
                        }
                    }
                }
            },
            "features": {
                "most_media": {
                    "data": {
                        "media_ids": {
                            "spotlights": {
                                "views_desc": {
                                    "performance": {
                                        "30d": {
                                            "media_ids": []
                                        },
                                        "90d": {
                                            "media_ids": []
                                        },
                                        "180d": {
                                            "media_ids": []
                                        }
                                    }
                                },
                                "time_posted_desc": {
                                    "performance": {
                                        "30d": {
                                            "media_ids": []
                                        },
                                        "90d": {
                                            "media_ids": []
                                        },
                                        "180d": {
                                            "media_ids": []
                                        }
                                    }
                                }
                            },
                            "snaps": {
                                "views_desc": {
                                    "performance": []
                                },
                                "time_posted_desc": {
                                    "performance": {
                                        "30d": {
                                            "media_ids": []
                                        },
                                        "90d": {
                                            "media_ids": [
                                                "1685113667_0",
                                                "1685113667_1",
                                                "1685113667_2",
                                                "1685113667_3",
                                                "1685113667_4",
                                                "1685113667_5",
                                                "1685113667_6",
                                                "1685113667_7"
                                            ]
                                        },
                                        "180d": {
                                            "media_ids": [
                                                "1685113667_0",
                                                "1685113667_1",
                                                "1685113667_2",
                                                "1685113667_3",
                                                "1685113667_4",
                                                "1685113667_5",
                                                "1685113667_6",
                                                "1685113667_7"
                                            ]
                                        }
                                    }
                                }
                            },
                            "all": {
                                "views_desc": {
                                    "performance": {
                                        "30d": {
                                            "media_ids": []
                                        },
                                        "90d": {
                                            "media_ids": []
                                        },
                                        "180d": {
                                            "media_ids": []
                                        }
                                    }
                                },
                                "time_posted_desc": {
                                    "performance": {
                                        "30d": {
                                            "media_ids": []
                                        },
                                        "90d": {
                                            "media_ids": [
                                                "1685113667_0",
                                                "1685113667_1",
                                                "1685113667_2",
                                                "1685113667_3",
                                                "1685113667_4",
                                                "1685113667_5",
                                                "1685113667_6",
                                                "1685113667_7"
                                            ]
                                        },
                                        "180d": {
                                            "media_ids": [
                                                "1685113667_0",
                                                "1685113667_1",
                                                "1685113667_2",
                                                "1685113667_3",
                                                "1685113667_4",
                                                "1685113667_5",
                                                "1685113667_6",
                                                "1685113667_7"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "blogger_emails": {
                    "data": null
                },
                "blogger_geo": {
                    "data": null
                },
                "blogger_languages": {
                    "data": [
                        "en"
                    ]
                },
                "blogger_hashtags": {
                    "data": null
                },
                "social_networks": {
                    "data": [
                        {
                            "type": 7,
                            "id": "nasa"
                        },
                        {
                            "type": 1,
                            "id": "8_n20"
                        }
                    ]
                }
            }
        },
        "restTokens": 871
    }
}

highDemand field is “true” when HypeAuditor experiences unexpected high load that effects report generation time negatively. When you receive that field you may want to inform your users that the delay is temporary and we’re fixing it. Everything will go back to normal and all requests are safe.

Errors