YouTube API
YouTube Hype
Get the trending hype leaderboard by category on YouTube.
POST
$0.01/call/v1/youtube/hypeUsage
const res = await fetch('https://api.yepapi.com/v1/youtube/hype', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ geo: 'US' }),
});
const { data } = await res.json();
console.log(data.filters, data.data);curl -X POST https://api.yepapi.com/v1/youtube/hype \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"geo": "US"}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
geo | string | No | Country code | US |
lang | string | No | Language code | — |
token | string | No | Pagination token | — |
Response
{
"ok": true,
"data": {
"data": [
{
"type": "video",
"videoId": "jNM0fCbU7mU",
"title": "Street Catz (Pilot)",
"channelTitle": "GameBoyCat",
"hypeText": "#1 hyped",
"lengthText": "6:11",
"thumbnail": [
{ "url": "https://i.ytimg.com/vi_webp/jNM0fCbU7mU/mqdefault.webp", "width": 320, "height": 180 }
]
},
{
"type": "video",
"videoId": "X6dUhg44Ph0",
"title": "Criminal Ties | Season 1 - Ep. 9",
"channelTitle": "drikathebaby",
"hypeText": "#2 hyped",
"lengthText": "59:10",
"thumbnail": [
{ "url": "https://i.ytimg.com/vi_webp/X6dUhg44Ph0/mqdefault.webp", "width": 320, "height": 180 }
]
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.data | object[] | Array of hyped video results ordered by rank |
data.data[].type | string | Content type (typically video) |
data.data[].videoId | string | Unique YouTube video identifier |
data.data[].title | string | Video title as displayed on YouTube |
data.data[].channelTitle | string | Name of the channel that uploaded the video |
data.data[].hypeText | string | Hype ranking position (e.g. #1 hyped, #2 hyped) |
data.data[].lengthText | string | Video duration in H:MM:SS or MM:SS format |
data.data[].thumbnail | object[] | Video thumbnail images at various resolutions |