YepAPI
YouTube API

Hashtag Videos

Get videos for any YouTube hashtag with metadata.

POST/v1/youtube/hashtag
$0.01/call

Usage

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

ParameterTypeRequiredDescriptionDefault
tagstringYesHashtag (without #)
tokenstringNoContinuation 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

FieldTypeDescription
okbooleanWhether the request succeeded
data.metaobjectMetadata about the hashtag
data.meta.hashtagstringThe hashtag including the # prefix
data.meta.hashtagInfoTextstringSummary of total videos and channels for this hashtag
data.continuationstringToken to fetch the next page of results
data.dataobject[]Array of video results for this hashtag
data.data[].typestringContent type (typically video)
data.data[].videoIdstringUnique YouTube video identifier
data.data[].titlestringVideo title as displayed on YouTube
data.data[].channelTitlestringName of the channel that uploaded the video
data.data[].channelIdstringUnique identifier for the channel
data.data[].channelHandlestringChannel handle (e.g. @programmingwithmosh)
data.data[].channelBadgesstring[]Channel verification badges
data.data[].isVerifiedChannelbooleanWhether the channel is verified
data.data[].descriptionstringVideo description snippet
data.data[].viewCountstringRaw view count as a numeric string
data.data[].viewCountTextstringHuman-readable view count (e.g. 500K views)
data.data[].publishDatestringPublish date in YYYY-MM-DD format
data.data[].publishedAtstringPublish date as ISO 8601 timestamp
data.data[].publishedTimeTextstringRelative publish time (e.g. 3 months ago)
data.data[].lengthTextstringVideo duration in H:MM:SS or MM:SS format
data.data[].thumbnailobject[]Video thumbnail images at various resolutions
data.data[].richThumbnailobject[]Animated preview thumbnail (webp format)
data.data[].channelThumbnailobject[]Channel avatar images

On this page