YouTube Hashtag Search API
Videos from youtube.com/hashtag/{name} — nested channel{}, viewCountIsApproximate. Not keyword search.
GET request to /v1/youtube/hashtag-search that responds with clean JSON and costs ~20 credits (1/result). Pass cache=true for a free 24h cache hit; default is always fresh. Start with 100 free credits — no credit card.What is the YouTube Hashtag Search API?
Pass a hashtag (with or without #) and get the videos listed on YouTube's hashtag page as clean JSON. This is the /hashtag/{name} feed — not a search?q= keyword query. A query with spaces (travel blog) is 400 HASHTAG_HAS_SPACES — YouTube hashtag pages are one token; nothing is fetched. Use /v1/youtube/search for a keyword phrase. Titles often omit the #tag (it may live only in the description); association is the hashtag page itself. Envelope field is hashtag (the normalized tag). Each result includes type (video|short|live), id, url, title, nested channel{id,title,handle?,url}, viewCount + viewCountIsApproximate, and durationSeconds when YouTube exposes them. Returns a single window; use limit to size it. No cursor. Billed per returned result (~1 credit each).
What you get
- Hashtag page feed (not keyword search)
- type: video | short | live on every row
- Nested channel{} — no flat channelName/channelId twins
- viewCountIsApproximate on every row with viewCount
- Returns a single window; use limit to size it. No cursor.
Try it
Fill in the parameters below and copy a ready-to-run request, or open the live Playground to run it against your account (no API key paste).
Parameters
curl "https://api.captapi.com/v1/youtube/hashtag-search?q=structured%20data%20api" \
-H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."Edit the parameters and the code updates instantly. Switch languages and hit copy.
Example response
{
"success": true,
"data": {
"hashtag": "music",
"totalReturned": 2,
"results": [
{
"type": "video",
"id": "O40ruQpZogY",
"url": "https://www.youtube.com/watch?v=O40ruQpZogY",
"title": "Seriously This is One of The Most Beautiful Songs Ever Made 🥹😭",
"publishedTimeApprox": "2026-05-21T00:00:00.000Z",
"publishedTimeIsApproximate": true,
"publishedTimeText": "5mo ago",
"viewCount": 1246689,
"viewCountText": "1,246,689 views",
"viewCountIsApproximate": false,
"durationSeconds": 274,
"thumbnailUrl": "https://i.ytimg.com/vi/O40ruQpZogY/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBC0XgAcnqjC4tJjLDnhGB-6j47pQ",
"channel": {
"id": "UC0nOQ1R3Z-vRO7K6g-W7Jkg",
"title": "Fearless Soul",
"url": "https://www.youtube.com/channel/UC0nOQ1R3Z-vRO7K6g-W7Jkg",
"thumbnail": "https://yt3.ggpht.com/ytc/AIdro_lAqUplsi-NTA6PEHA-j_xrqt4yZmaBBbzrDbflSgIDeSQ=s68-c-k-c0x00ffffff-no-rj"
},
"badges": [
"Verified"
]
},
{
"type": "video",
"id": "YWZyuz7o8cw",
"url": "https://www.youtube.com/watch?v=YWZyuz7o8cw",
"title": "Best Hillsong Worship Songs 2026 ✝️ Nonstop Christian Praise & Worship Music",
"publishedTimeApprox": "2026-03-22T00:00:00.000Z",
"publishedTimeIsApproximate": true,
"publishedTimeText": "7mo ago",
"viewCount": 1630160,
"viewCountText": "1,630,160 views",
"viewCountIsApproximate": false,
"durationSeconds": 5092,
"thumbnailUrl": "https://i.ytimg.com/vi/YWZyuz7o8cw/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLAOuOpQLSJGcGK6DjO8MRUpZRk1sg",
"channel": {
"id": "UCoVIa3ZXcRl3OqG6V10juOA",
"title": "Best Worship Songs",
"url": "https://www.youtube.com/channel/UCoVIa3ZXcRl3OqG6V10juOA",
"thumbnail": "https://yt3.ggpht.com/UsU3lqlf-c1ovAX2xyQCzmsto40ZGtPu0bgPwhdzRYUPJlD3yp5Xz_LE2ZVJ8d_htOrx4YkgkA=s68-c-k-c0x00ffffff-no-rj"
},
"badges": null
}
]
}
}Billing metadata is returned in response headers: X-Captapi-Credits (credits charged), X-Captapi-Cache (hit or miss), and X-Captapi-Request-Id (include it when contacting support). Where the response has a source field, it names the path that served the data: native, extended, cache or asr. Failed requests (4xx/5xx) are never charged. See the full list of error codes in the error reference.
Response structure
A successful call returns success and a data object with the following fields:
Top-level fields
hashtagHashtag. Example: "music".totalReturnedNumber of items returned in this response.
Results
Each item in results contains:
typeContent type of the item.idId of this results item.urlCanonical URL of the item.titleTitle of this results item.publishedTimeApproxApproximate ISO-8601 derived from publishedTimeText, truncated to the label's precision (day/hour/minute). Not an observed instant — see publishedTimeIsApproximate.publishedTimeIsApproximatetrue when publishedTimeApprox was derived from a relative label rather than an absolute timestamp YouTube exposed.publishedTimeTextOriginal relative publish label from the platform when an exact timestamp was not available (e.g. "1 year ago").viewCountView count.viewCountTextCompact view label as YouTube shows it (e.g. 750K).viewCountIsApproximateTrue when viewCount was parsed from a compact UI label (e.g. 2.5B / 894M) rather than an exact integer.durationSecondsLength in seconds for this item (full media length, or a segment span when the endpoint documents a start/end).thumbnailUrlThumbnail image URL.channelChannel name or channel object — shape depends on the endpoint (see that page's field notes).badgesPlatform badges on the result (SoundCloud pro/verified; YouTube 4K/LIVE/New; etc.).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| q | string | Yes | Hashtag with or without the # (min 2 characters). One token — spaces are 400 HASHTAG_HAS_SPACES. |
| limit | integer | No | Max items to return (default 20, max 200). Returns a single window; use limit to size it. No cursor. Billed per result. |
| cache | boolean | No | Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. |
Authentication: send your key as Authorization: Bearer capt_live_.... A typical call costs ~20 credits (1/result) — billed per result, so the exact amount scales with how many items you request. Pass cache=true for a free 24h cache hit; default is always fresh (metrics refresh within ~1 hour).
youtube_hashtag_search via @captapi/mcp. Set it up →How it works
- 1. Sign up — get 100 free credits, no card required.
- 2. Create a key from your dashboard.
- 3. Send one request to
/v1/youtube/hashtag-searchand parse the JSON response.
Use cases
Trend Discovery
Find trending content by keyword or hashtag.
Content Sourcing
Build feeds and playlists programmatically.
Monitoring
Track topics, brands, and competitors.
Research
Sample large sets of content for analysis.
Frequently asked questions
What does the YouTube Hashtag Search API do?+
The YouTube Hashtag Search API lets you search and return matching results from a public YouTube query using one GET request to /v1/youtube/hashtag-search. It returns clean JSON — no OAuth or infrastructure setup required.
How many credits does the YouTube Hashtag Search API cost?+
At the default limit this endpoint costs 20 credits (1 per result). Billing scales with how many results you request. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Failed or empty results are never charged.
Do I need a YouTube API key or OAuth?+
No. A single Captapi key works across every platform Captapi supports — YouTube, TikTok, Instagram, Facebook, Twitter/X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Rumble, Spotify, Kwai, and more. We handle access, rate limits, retries, and authentication for you.
I sent "travel blog" and got 400 HASHTAG_HAS_SPACES. Is that a scrape miss?+
No — YouTube hashtag pages are a single token. A space means this is not /hashtag/{name}, so we reject it immediately (0 credits). Nothing is fetched. Use travel or #travel, or /v1/youtube/search for a keyword phrase.
Is the YouTube Hashtag Search API suitable for production use?+
Yes. It is a stable REST endpoint with predictable JSON and automatic retries. Pass cache=true to serve from the 24h cache (0 credits on hit); default is always fresh. Selected profile endpoints also accept cacheMaxAge=1d|3d|7d|14d|30d. Use it for analytics, monitoring, and content automation.
More YouTube APIs
Ready to use the YouTube Hashtag Search API?
Sign up, grab your key, and make your first call in 60 seconds.