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

YouTube Channel Community Posts

API 文件
https://api.sandbase.ai/v1/api/youtube/web-v2/channel-community-posts

Returns community posts from a specific YouTube channel, including text content, polls, votes, and comment counts. Supports pagination via a continuation token.

價格
$0.001美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 4 個選填

Playground

輸入
Channel ID
Next page pagination token
Country code, default `"US"`
Language code, default `"zh-CN"`
Whether to format data, default `true`
輸出範例
回應outputs · 6.3 KB · 156 行
[
  {
    "data": {
      "channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
      "continuation_token": "4qmFsgKBARIYVUNldTZVNjdPekpoVjFLd0JhbnNIM0RnGkxFZ1Z3YjNOMGM2b0RLQW9rVVRKb1ExSkdUbGxoTTFKcFpXeHdlVlZxUWxkVlIwWjBWbGh3VkUxV1drVlNWVVpDS0FueUJnUUtBa29BmgIWYmFja3N0YWdlLWl0ZW0tc2VjdGlvbg%3D%3D",
      "has_more": true,
      "posts": [
        {
          "attachment": {
            "choices": [
              {
                "text": "Yes, slow 'em down",
                "vote_count": "",
                "vote_percentage": ""
              },
              {
                "text": "No, original speed",
                "vote_count": "",
                "vote_percentage": ""
              }
            ],
            "total_votes": "1837 票",
            "type": "poll"
          },
          "author_channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
          "author_name": "CozyCraft",
          "author_thumbnails": [
            {
              "height": 32,
              "url": "//yt3.googleusercontent.com/jwfgqnpI22YpsFDz25QtgITBf5tX7mFHqXWVhHoWzbk3ddAz9FabBDIx-eFaLrXlrhcpo5G0qBI=s32-c-k-c0x00ffffff-no-rj-mo",
              "width": 32
            },
            {
              "height": 48,
              "url": "//yt3.googleusercontent.com/jwfgqnpI22YpsFDz25QtgITBf5tX7mFHqXWVhHoWzbk3ddAz9FabBDIx-eFaLrXlrhcpo5G0qBI=s48-c-k-c0x00ffffff-no-rj-mo",
              "width": 48
            },
            {
              "height": 76,
              "url": "//yt3.googleusercontent.com/jwfgqnpI22YpsFDz25QtgITBf5tX7mFHqXWVhHoWzbk3ddAz9FabBDIx-eFaLrXlrhcpo5G0qBI=s76-c-k-c0x00ffffff-no-rj-mo",
              "width": 76
            }
          ],
          "author_url": "/@CozyCraftYT",
          "comment_count": "9",
          "content_text": "Would you like to see more slowed versions of songs? 🤔",
          "post_id": "Ugkxarbrw7GyCGm2je0mLftFSKUOIMp3CUkE",
          "post_url": "https://www.youtube.com/post/Ugkxarbrw7GyCGm2je0mLftFSKUOIMp3CUkE",
          "published_time": "5个月前",
          "vote_count": "98"
        },
        {
          "attachment": {
            "choices": [
              {
                "text": "Photon",
                "vote_count": "",
                "vote_percentage": ""
              },
              {
                "text": "BSL",
                "vote_count": "",
                "vote_percentage": ""
              },
              {
                "text": "Bliss",
                "vote_count": "",
                "vote_percentage": ""
              },
              "… 1 more items in the full response"
            ],
            "total_votes": "2832 票",
            "type": "poll"
          },
          "author_channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
          "author_name": "CozyCraft",
          "author_thumbnails": [
            {
              "height": 32,
              "url": "//yt3.googleusercontent.com/jwfgqnpI22YpsFDz25QtgITBf5tX7mFHqXWVhHoWzbk3ddAz9FabBDIx-eFaLrXlrhcpo5G0qBI=s32-c-k-c0x00ffffff-no-rj-mo",
              "width": 32
            },
            {
              "height": 48,
              "url": "//yt3.googleusercontent.com/jwfgqnpI22YpsFDz25QtgITBf5tX7mFHqXWVhHoWzbk3ddAz9FabBDIx-eFaLrXlrhcpo5G0qBI=s48-c-k-c0x00ffffff-no-rj-mo",
              "width": 48
            },
            {
              "height": 76,
              "url": "//yt3.googleusercontent.com/jwfgqnpI22YpsFDz25QtgITBf5tX7mFHqXWVhHoWzbk3ddAz9FabBDIx-eFaLrXlrhcpo5G0qBI=s76-c-k-c0x00ffffff-no-rj-mo",
              "width": 76
            }
          ],
          "author_url": "/@CozyCraftYT",
          "comment_count": "19",
          "content_text": "Which shader is your favorite? 🤔",
          "post_id": "UgkxuWOnekxLVBYuFt1hSm125Ym-cMaxMzsj",
          "post_url": "https://www.youtube.com/post/UgkxuWOnekxLVBYuFt1hSm125Ym-cMaxMzsj",
          "published_time": "7个月前",
          "vote_count": "120"
        },
        {
          "attachment": {
            "images": [
              {
                "height": 288,
                "url": "https://yt3.ggpht.com/Y635hMtgWtpT8oRAHtt3VGCP5Tvx7_MyS1cB8SS4V7XztCK83Ns8xUpf2hkhyYbaE6aRwIIY_l8p5g=s288-c-fcrop64=1,00000000ffffffff-rw-nd-v1",
                "width": 288
              },
              {
                "height": 400,
                "url": "https://yt3.ggpht.com/Y635hMtgWtpT8oRAHtt3VGCP5Tvx7_MyS1cB8SS4V7XztCK83Ns8xUpf2hkhyYbaE6aRwIIY_l8p5g=s400-c-fcrop64=1,00000000ffffffff-rw-nd-v1",
                "width": 400
              },
              {
                "height": 512,
                "url": "https://yt3.ggpht.com/Y635hMtgWtpT8oRAHtt3VGCP5Tvx7_MyS1cB8SS4V7XztCK83Ns8xUpf2hkhyYbaE6aRwIIY_l8p5g=s512-c-fcrop64=1,00000000ffffffff-rw-nd-v1",
                "width": 512
              },
              "… 4 more items in the full response"
            ],
            "type": "image"
          },
          "author_channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
          "author_name": "CozyCraft",
          "author_thumbnails": [
            {
              "height": 32,
              "url": "//yt3.googleusercontent.com/jwfgqnpI22YpsFDz25QtgITBf5tX7mFHqXWVhHoWzbk3ddAz9FabBDIx-eFaLrXlrhcpo5G0qBI=s32-c-k-c0x00ffffff-no-rj-mo",
              "width": 32
            },
            {
              "height": 48,
              "url": "//yt3.googleusercontent.com/jwfgqnpI22YpsFDz25QtgITBf5tX7mFHqXWVhHoWzbk3ddAz9FabBDIx-eFaLrXlrhcpo5G0qBI=s48-c-k-c0x00ffffff-no-rj-mo",
              "width": 48
            },
            {
              "height": 76,
              "url": "//yt3.googleusercontent.com/jwfgqnpI22YpsFDz25QtgITBf5tX7mFHqXWVhHoWzbk3ddAz9FabBDIx-eFaLrXlrhcpo5G0qBI=s76-c-k-c0x00ffffff-no-rj-mo",
              "width": 76
            }
          ],
          "author_url": "/@CozyCraftYT",
          "comment_count": "36",
          "content_text": "I just want to say how thankful I am to everyone who’s supported the channel. Hitting 100K subscribers is an incredible milestone, and I truly appreciate each of you. I’ll keep doing my best to grow and improve with every video! Thank you so much 💜\n\nWith love and appreciation,\n- Cozy",
          "post_id": "Ugkxe7pBWWgtCrd3UqwbzaqHkKb0rYURZAlY",
          "post_url": "https://www.youtube.com/post/Ugkxe7pBWWgtCrd3UqwbzaqHkKb0rYURZAlY",
          "published_time": "7个月前",
          "vote_count": "219"
        },
        "… 6 more items in the full response"
      ],
      "total_count": 9
    }
  }
]

範例

選擇一個範例,將其輸入與結果載入 playground。

API README

YouTube Channel Community Posts API

Returns community posts from a YouTube channel, including post text, poll or image attachments, vote counts, and comment counts. It needs a channel_id and returns a page of posts with a token for the next page.

Use cases

  • Archive the text and polls a creator publishes on their community tab.
  • Compare comment_count and vote_count across posts to see which topics get the most reaction.
  • Collect poll questions and answer choices from a channel to study what the creator asks their audience.
  • Page through a channel's older posts to build a history of its announcements.

Request

curl -X POST "https://api.sandbase.ai/v1/api/youtube/web-v2/channel-community-posts" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"channel_id": "UCeu6U67OzJhV1KwBansH3Dg"}'

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

Parameters

NameTypeRequiredDescription
channel_idstringYesChannel ID
continuation_tokenstringNoNext page pagination token
country_codestringNoCountry code, default "US"
language_codestringNoLanguage code, default "zh-CN"
need_formatbooleanNoWhether to format data, default true

Example response

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

{
  "channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
  "continuation_token": "4qmFsgKB…",
  "has_more": true,
  "posts": [
    {
      "attachment": {
        "choices": [
          {
            "text": "Yes, slow 'em down",
            "vote_count": "",
            "vote_percentage": ""
          }
        ],
        "total_votes": "1919 票",
        "type": "poll"
      },
      "author_channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
      "author_name": "CozyCraft",
      "author_thumbnails": [
        {
          "height": 32,
          "url": "//yt3.googleusercontent.com/jwfgqnpI22YpsFDz25QtgITBf5tX7mFHqXWVhHoWzbk3ddAz9Fab…",
          "width": 32
        }
      ],
      "author_url": "/@CozyCraftYT",
      "comment_count": "9",
      "content_text": "Would you like to see more slowed versions of songs? 🤔",
      "post_id": "Ugkxarbrw7GyCGm2je0mLftFSKUOIMp3CUkE",
      "post_url": "https://www.youtube.com/post/Ugkxarbrw7GyCGm2je0mLftFSKUOIMp3CUkE",
      "published_time": "6个月前",
      "vote_count": "102"
    }
  ],
  "total_count": 9
}

Response fields

FieldMeaning
posts[].post_idID of the community post.
posts[].post_urlLink to the post on YouTube.
posts[].content_textText of the post. Long text may be cut off with an ellipsis.
posts[].published_timeRelative publish time as a text label, such as 6个月前. It is not a date or timestamp.
posts[].vote_count / posts[].comment_countCounts for the post, returned as strings. vote_count is the like-style vote count, and comment_count is the number of comments.
posts[].author_name / posts[].author_channel_id / posts[].author_urlName, channel ID and channel path (such as /@CozyCraftYT) of the channel that wrote the post.
posts[].attachment.typeKind of attachment on the post. This response shows poll and image.
posts[].attachment.choices[].textText of each poll option. vote_count and vote_percentage inside each choice were empty strings in this response.
posts[].attachment.total_votesTotal votes on a poll as a text label, for example 1919 票.
posts[].attachment.images[].urlImage URL for image posts, listed with its width and height. Several sizes of the same image are returned.
has_more / continuation_tokenhas_more is true when more posts exist. Pass continuation_token in the next request to get them.

Notes

  • Get the channel_id from a channel URL with YouTube Channel ID from URL. Channel IDs start with UC.
  • To page, send the returned continuation_token as continuation_token along with the same channel_id. Stop when has_more is false.
  • To read the comments on a single post, call YouTube Community Post Comments with its post_id.
  • published_time and total_votes follow language_code, which defaults to zh-CN. Set another value if you want labels in a different language.

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相關 APIs

所有 APIs
API價格回應
YouTube每次呼叫 $0.001JSON
YouTube每次呼叫 $0.001JSON
YouTube每次呼叫 $0.001JSON
YouTube每次呼叫 $0.001JSON
YouTube每次呼叫 $0.001JSON
YouTube每次呼叫 $0.001JSON

指南:Best YouTube API in 2026: Pricing Compared

問題

常見問題

我要如何使用 YouTube Channel Community Posts API?

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

YouTube Channel Community Posts API 的費用是多少?

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

YouTube Channel Community Posts API 接受哪些參數?

必要:channel_id (string)。 選填:continuation_token (string), country_code (string), language_code (string) 和 need_format (boolean)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

YouTube Channel Community Posts API 會回傳什麼?

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

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

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