Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

YouTube Hashtag Search

API 文件
https://api.sandbase.ai/v1/api/youtube/search-hashtag

Search YouTube videos by hashtag with cursor pagination (title, channel, views, length, publish time).

價格
自 $0.0012 起美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 2 個選填

Playground

輸入
Hashtag to search for (without the leading #).
Content filter. Only "all" is served: no source we buy returns a Shorts row with the channel and publish time this endpoint requires.
Continuation token from a previous response for pagination.
輸出就緒

您的輸出會顯示在這裡

完成輸入後,點擊執行。

API README

YouTube Hashtag Search API

Returns a page of YouTube videos that match a hashtag. Each video includes its title, channel, view count, length and publish time. The only required input is hashtag, written without the leading #.

Use cases

  • Find popular videos under a hashtag such as funny to see which topics get the most views.
  • Collect channels that post often under a hashtag to build an outreach or creator list.
  • Track which videos appear for a campaign hashtag and link back to each one with its url.
  • Compare video lengths and view counts across a hashtag to study what formats perform well.

Request

curl -X POST "https://api.sandbase.ai/v1/api/youtube/search-hashtag" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hashtag": "funny"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
hashtagstringYesHashtag to search for (without the leading #).
cursorstringNoContinuation token from a previous response for pagination.
typestringNoContent filter. Only "all" is served: no source we buy returns a Shorts row with the channel and publish time this endpoint requires.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "nextCursor": "cur_eL-1ozhU5547jmeI0G5-Fg",
    "videos": [
      {
        "authorAvatarUrl": "https://yt3.ggpht.com/k1ZJ7WufFx4wSWlXXExVel17gg_Uy08MjThN2bKqUdSO4r3tOD2QwCZhfq…",
        "authorHandle": "PAW_YTP",
        "authorId": "UCHUcU1A9KhO9Sf4-8E5-ArA",
        "channelTitle": "PAW YTP",
        "createdUtc": 1783064897,
        "durationSeconds": 810,
        "id": "7IYXGdzlHDU",
        "image": "https://i.ytimg.com/vi/7IYXGdzlHDU/hq720.jpg",
        "lengthText": "13:30",
        "publishedTime": "4 months ago",
        "title": "BLUEY - TRY NOT TO LAUGH 😂 [YTP] GOOF CHAOS",
        "url": "https://www.youtube.com/watch?v=7IYXGdzlHDU"
      }
    ]
  },
  "found": true
}

Response fields

FieldMeaning
data.videos[].idYouTube video ID. It is also the value of v in the video url.
data.videos[].titleTitle of the video.
data.videos[].urlLink to the watch page for the video.
data.videos[].viewsView count as a number.
data.videos[].durationSeconds / data.videos[].lengthTextVideo length as a number of seconds and as display text such as 13:30.
data.videos[].publishedTime / data.videos[].createdUtcpublishedTime is a relative label such as 4 months ago. createdUtc is a numeric timestamp for the same event, in Unix seconds.
data.videos[].channelTitle / data.videos[].authorHandleDisplay name and handle of the channel that posted the video.
data.videos[].authorIdChannel ID, starting with UC. Use it to look up the channel.
data.videos[].image / data.videos[].authorAvatarUrlThumbnail image URL of the video and avatar image URL of the channel.
data.nextCursorToken to pass as cursor to get the next page of videos.

Notes

  • Send the hashtag without the leading #. For example, use funny, not #funny.
  • For the next page, repeat the request with the same hashtag and set cursor to data.nextCursor from the previous response.
  • type accepts only all, which is the default behavior, so you can leave it out.
  • To get more detail on a result, pass its video ID to YouTube Video Details, or pass authorId to YouTube Channel Videos.

Pricing

Billed at the actual cost of each call, about $0.0012 for the request above. Failed calls are not charged.

探索更多

相關 APIs

所有 APIs
API價格回應
YouTube每次呼叫 $0.0012 起JSON
YouTube每次呼叫 $0.00045 起JSON
YouTube每次呼叫 $0.0012 起JSON
YouTube每次呼叫 $0.0012 起JSON
YouTube每次呼叫 $0.0012 起JSON
YouTube每次呼叫 $0.014286JSON

指南:Best YouTube API in 2026: Pricing Compared

問題

常見問題

我要如何使用 YouTube Hashtag Search API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/youtube/search-hashtag。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

YouTube Hashtag Search API 的費用是多少?

每次起 $0.0012,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

YouTube Hashtag Search API 接受哪些參數?

必要:hashtag (string)。 選填:type(all 之一) 和 cursor (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

YouTube Hashtag Search API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 YouTube 開發者帳號或 API 金鑰嗎?

不需要。YouTube Hashtag Search 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 YouTube API 存取權。