YouTube · Guide

How to run a YouTube hashtag search

TL;DR
To run a YouTube hashtag search, sign up for a free Captapi key, then send one GET request to /v1/youtube/hashtag-search with your input. You get clean JSON back in seconds for ~20 credits (1/result) per call — no OAuth, scraping or platform SDKs. Run a YouTube hashtag search and get structured, ranked results as clean JSON.

How to run a YouTube hashtag search (step by step)

  1. 1

    Get a free API key

    Create a free Captapi account (100 credits, no card) and generate an API key from the dashboard.

  2. 2

    Call the YouTube Hashtag Search API

    Send an authenticated GET request to /v1/youtube/hashtag-search with your input. No OAuth, no scraping setup.

  3. 3

    Read the JSON response

    Parse the clean JSON response. Pass cache=true for a free 24h cache hit; default is always fresh.

Code example

curl "https://api.captapi.com/v1/youtube/hashtag-search?q=music" \
  -H "Authorization: Bearer capt_live_..."
# or: -H "x-api-key: capt_live_..."

What the response looks like

{
  "success": true,
  "data": {
    "query": "music",
    "totalReturned": 5,
    "results": [
      {
        "url": "https://www.youtube.com/watch?v=3iAiWIytqdw",
        "title": "Forever Young - Music Travel Love ft. Bugoy Drilon",
        "publishedAt": "2025-04-16T00:00:08.000Z",
        "viewCount": 31307210,
        "durationSeconds": 265,
        "thumbnailUrl": "https://i.ytimg.com/vi/3iAiWIytqdw/maxresdefault.jpg",
        "channelName": "Music Travel Love"
      },
      {
        "url": "https://www.youtube.com/watch?v=WpYPeL-gF5U",
        "title": "Stay Royalty - Official Music Video of The Royalty Family (2020)",
        "publishedAt": "2020-12-27T16:12:50.000Z",
        "viewCount": 14883690,
        "durationSeconds": 194,
        "thumbnailUrl": "https://i.ytimg.com/vi/WpYPeL-gF5U/maxresdefault.jpg",
        "channelName": "The Royalty Family"
      },
      {
        "url": "https://www.youtube.com/shorts/hwf0tDWlP7Q",
        "title": "Ashnikko - stupid feat ।। Autotune Vs no autotune ।। #battleofsong #shorts #music #song #singer",
        "publishedAt": "2022-12-14T08:29:38.000Z",
        "viewCount": 64582461,
        "durationSeconds": 19,
        "thumbnailUrl": "https://i.ytimg.com/vi/hwf0tDWlP7Q/maxres2.jpg?sqp=-oaymwEoCIAKENAF8quKqQMcGADwAQH4AbYIgAKAD4oCDAgAEAEYFSBLKH8wDw==&rs=AOn4CLCkDkjFljIdMxNOOmrsKANlEOnqrQ",
        "channelName": "Battle of song"
      },
      {
        "url": "https://www.youtube.com/shorts/hAQcodpwsIA",
        "title": "IS THIS THE HOTTEST NEW ROCKSTAR OF 2023?! #music #emo #punkrock #hardrock #rocksong #rock #rockstar",
        "publishedAt": "2023-05-26T19:12:49.000Z",
        "viewCount": 12286628,
        "durationSeconds": 20,
        "thumbnailUrl": "https://i.ytimg.com/vi/hAQcodpwsIA/maxresdefault.jpg?sqp=-oaymwEoCIAKENAF8quKqQMcGADwAQH4Ac4FgAKACooCDAgAEAEYXSBlKDgwDw==&rs=AOn4CLB1qp8scA6duDC5KhV4UHe1QqDhiw",
        "channelName": "TX2 OFFICIAL"
      },
      {
        "url": "https://www.youtube.com/watch?v=O40ruQpZogY",
        "title": "Seriously This is One of The Most Beautiful Songs Ever Made 🥹😭",
        "publishedAt": "2026-04-28T03:53:48.000Z",
        "viewCount": 852851,
        "durationSeconds": 274,
        "thumbnailUrl": "https://i.ytimg.com/vi/O40ruQpZogY/maxresdefault.jpg",
        "channelName": "Fearless Soul"
      }
    ]
  }
}

Billing metadata (credits charged, cache hit/miss) is returned in the X-Captapi-Credits and X-Captapi-Cache response headers.

Request parameters

NameTypeRequiredDescription
qstring YesHashtag with or without the # (min 2 characters).
limitintegerNoMax items to return (default 20, max 200). Billed per result.
cachebooleanNoSet true to serve from the 24h response cache. Default false — always fetch fresh data.

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 shared cache (0 credits on hit); default is always fresh. 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 proxies, rate limits, retries, and authentication for you.

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 shared cache (0 credits on hit); default is always fresh. Use it for analytics, monitoring, and content automation.

Ready to run a YouTube hashtag search?

Start free with 100 credits — no credit card required.

Get your free API key