YouTube API
Hashtag Videos
Get videos for any YouTube hashtag with metadata.
POST
$0.01/call/v1/youtube/hashtagUsage
const res = await fetch('https://api.yepapi.com/v1/youtube/hashtag', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ tag: 'programming' }),
});
const { data } = await res.json();
console.log(data.meta, data.data);curl -X POST https://api.yepapi.com/v1/youtube/hashtag \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tag": "programming"}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
tag | string | Yes | Hashtag (without #) | — |
token | string | No | Continuation token for pagination | — |
Response
{
"ok": true,
"data": {
"meta": {
"hashtag": "#programming",
"hashtagInfoText": "1.5M videos \u00b7 253K channels"
},
"continuation": "4qmF...",
"data": [
{
"type": "video",
"videoId": "naNcmnKskUE",
"title": "Programming Basics Explained",
"channelTitle": "Programming with Mosh",
"channelId": "UCWv7vMbMWH4-V0ZXdmDpPBA",
"channelHandle": "@programmingwithmosh",
"channelBadges": ["Verified"],
"isVerifiedChannel": true,
"description": "",
"viewCount": "500000",
"viewCountText": "500K views",
"publishDate": "2026-01-13",
"publishedAt": "2026-01-13T00:00:00Z",
"publishedTimeText": "3 months ago",
"lengthText": "11:31",
"thumbnail": [
{ "url": "https://i.ytimg.com/vi/naNcmnKskUE/hqdefault.jpg", "width": 168, "height": 94 }
],
"richThumbnail": [
{ "url": "https://i.ytimg.com/an_webp/naNcmnKskUE/mqdefault_6s.webp", "width": 320, "height": 180 }
],
"channelThumbnail": [
{ "url": "https://yt3.ggpht.com/...=s68-c-k-c0x00ffffff-no-rj", "width": 68, "height": 68 }
]
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.meta | object | Metadata about the hashtag |
data.meta.hashtag | string | The hashtag including the # prefix |
data.meta.hashtagInfoText | string | Summary of total videos and channels for this hashtag |
data.continuation | string | Token to fetch the next page of results |
data.data | object[] | Array of video results for this hashtag |
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[].channelId | string | Unique identifier for the channel |
data.data[].channelHandle | string | Channel handle (e.g. @programmingwithmosh) |
data.data[].channelBadges | string[] | Channel verification badges |
data.data[].isVerifiedChannel | boolean | Whether the channel is verified |
data.data[].description | string | Video description snippet |
data.data[].viewCount | string | Raw view count as a numeric string |
data.data[].viewCountText | string | Human-readable view count (e.g. 500K views) |
data.data[].publishDate | string | Publish date in YYYY-MM-DD format |
data.data[].publishedAt | string | Publish date as ISO 8601 timestamp |
data.data[].publishedTimeText | string | Relative publish time (e.g. 3 months ago) |
data.data[].lengthText | string | Video duration in H:MM:SS or MM:SS format |
data.data[].thumbnail | object[] | Video thumbnail images at various resolutions |
data.data[].richThumbnail | object[] | Animated preview thumbnail (webp format) |
data.data[].channelThumbnail | object[] | Channel avatar images |