YouTube Search Hashtag API
Videos or Shorts carrying a hashtag, as YouTube ranks them on the hashtag landing page. type=shorts switches to the Shorts tab, which is a different result set rather than a filter over the same one. Calls cost 1 credit each. A cache hit is free, and a failed or empty response is never charged.
Try it
Prefilled with the request that produced the example below. No key yet? Get a free key.
Request
GET
/v1/youtube/search/hashtag| Parameter | Type | Required | Description |
|---|---|---|---|
| hashtag | string | yes | Hashtag, with or without the leading # |
| type | all | shorts | no | defaults to all |
| cursor | string | no | pagination.cursor from a previous response |
Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).
curl
curl "$API/v1/youtube/search/hashtag?hashtag=nasa&cache_max_age=7d" \
-H "x-api-key: $KEY"JavaScript
const query = new URLSearchParams({
hashtag: 'nasa',
cache_max_age: '7d',
});
const response = await fetch(`${API}/v1/youtube/search/hashtag?${query}`, {
headers: { 'x-api-key': KEY },
});
const body = await response.json();
if (!body.success) throw new Error(body.error.code);
// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);Python
import os, httpx
r = httpx.get(
f"{os.environ['API']}/v1/youtube/search/hashtag",
params={
"hashtag": "nasa",
"cache_max_age": "7d",
},
headers={"x-api-key": os.environ["KEY"]},
timeout=30,
)
body = r.json()
if not body["success"]:
raise RuntimeError(body["error"]["code"])
print(body["data"], body["meta"]["creditsCharged"])Example response
Captured on , with raw removed and lists cut to two items. A live call returns current data.
response
{
"success": true,
"data": {
"items": [
{
"platform": "youtube",
"id": "_cgTVTwu4nw",
"type": "video",
"url": "https://www.youtube.com/watch?v=_cgTVTwu4nw",
"title": "NASA Rocket Engine Fireplace - 8 Hours in 4K",
"text": null,
"authorId": "UCLA_DiR1FfKNvjuUpBHmylQ",
"authorHandle": null,
"authorName": "NASA",
"thumbnailUrl": "https://i.ytimg.com/vi/_cgTVTwu4nw/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAHq3riV3QDRXShajl1JQBw4ZogoA",
"mediaUrls": [],
"durationSeconds": 28829,
"viewCount": 632091,
"likeCount": null,
"commentCount": null,
"shareCount": null,
"hashtags": [],
"mentions": [],
"isSponsored": null,
"publishedAt": null,
"fetchedAt": "2026-10-21T01:55:27.905Z"
},
{
"platform": "youtube",
"id": "ZOTNlODxD1g",
"type": "video",
"url": "https://www.youtube.com/watch?v=ZOTNlODxD1g",
"title": "NASA captures image of massive solar flare #NASA #space #solarflare",
"text": null,
"authorId": "UCgVZ0mrM3liHNhRYC5Mchgg",
"authorHandle": null,
"authorName": "WPLG Local 10",
"thumbnailUrl": "https://i.ytimg.com/vi/ZOTNlODxD1g/hq2.jpg?sqp=-oaymwE2CNACELwBSFXyq4qpAygIARUAAIhCGABwAcABBvABAfgBtgiAAoAPigIMCAAQARgPIGUoXTAP&rs=AOn4CLD7VmFvUVEXsDdzBNyVRIjl5sFAdw",
"mediaUrls": [],
"durationSeconds": 33,
"viewCount": 13568,
"likeCount": null,
"commentCount": null,
"shareCount": null,
"hashtags": [
"NASA",
"space"
],
"mentions": [],
"isSponsored": null,
"publishedAt": null,
"fetchedAt": "2026-10-21T01:55:27.905Z"
}
]
},
"pagination": {
"cursor": "eyJ0IjoiNHFtRnNnTHJCUklKUmtWb1lYTm9kR0ZuR3NZRlEwTlNObWRCVWtSUk1VWlNVVlZLY0dOSE5YZGFia3B6VEZaTmQyVlZPWFpSYTJSTFpGUmtjR05zVVRKYWVtTjVVakpvYmxKV2JETlBWMnhxVFZVMU1rNHpSbUZsUkVKSVZGUk9TV0pXYkhSV1ZqbDNZMjV3U21GSGJEUmpSRlkxVlROa1NsbHVSblJaTURGRFVqRkJNbUpFU2s5YWJXOHlUMFJaZWxkR1NuRldXRVl5V2xoR2MxUkZPWFZrTWs1S1VXdGtTMlJ1VG5SVWJHUnVUVmhaTWxkSFJqUmhiWEI0VjIxd1UyTllSa3hoZWtsNlVsWnJkRlF3T0hoTlIxSllURmhhWVUxVVdraFVSMFp1V0RKS1VWRlhhREJp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qTm9MVWwxTm5ZNVVGaDVjV1pIVFdad1RVTnJXVTg1ZG5sb1R6UkhiMHBXVTBkRVZEVkhORm96YVcxNU5uWmhjbGxKWnpWQ2MwUlNaM2xrUm14emFpMXVZMWN3ZVVodloxZHNZbVkwVVc1VVJsaEZkMnhWWTNSdWFUUnVNRloyUjE5aVltSnZTbDlJYzBwMVRXaHNVRU5DUjJOUVJGbEZSa1JMT0RaUldTMHdXREIyWldKMlltZGxTbnB2Y2tSalRFZE5hbUpRWkROa1YzTkNaRjlCWW1OZlZuaFlZWE5NWHpKZllXeHdPWEZoY0hacWRWWnBaMFpOYTFWQ00zRnRaRlE1TXpNNU5HZGlTVTl4TUZJMUxVTjZRMWxwVnkxRFJtSkNWR3AxWnpsQ2EwOHhNRkpDV21nNFQyeFlTRTFvTUZGelYwTktORWhMZVZKUlZWOTZOR0psV2tSdFJVdDJSakZVTlZSUVoxODRUbEZNUWpWM1VRJTNEJTNEIn0",
"hasMore": true,
"count": 36
},
"meta": {
"platform": "youtube",
"endpoint": "youtube.searchHashtag",
"creditsCharged": 1,
"cached": false,
"cacheAgeSeconds": null,
"durationMs": 529,
"requestId": "req_rhgcfnmi1qhvspjj64qj"
}
}Returns
Returns a list of Post in data.items.
Cost and behaviour
| Credits | 1 per live request, 0 on a cache hit |
| Cacheable | yes: cache_max_age accepts a cached copy |
| Batchable | yes: usable as a target in POST /v1/jobs/batch |
| Subscribable | no |
Other YouTube endpoints
- /v1/youtube/channel Channel details
- /v1/youtube/channel-videos Channel videos
- /v1/youtube/channel/community-posts Channel community posts
- /v1/youtube/channel/lives Channel live streams
- /v1/youtube/channel/playlists Channel playlists
- /v1/youtube/channel/shorts Channel shorts
- /v1/youtube/community-post Community post details
- /v1/youtube/playlist Playlist contents