cursorstring
Continuation token from a previous response for pagination.
https://api.sandbase.ai/v1/api/youtube/channel-community-postsList a YouTube channel's community posts by handle or channel ID with cursor pagination (text, likes, image, publish time).
Sua saída aparecerá aqui
Preencha as entradas e clique em Executar.
Returns a list of community posts for a YouTube channel, with the post text, like count, image links and publish time. You pass a channel handle such as @MrBeast or a channelId.
likeCount across posts to see which posts get the most engagement.curl -X POST "https://api.sandbase.ai/v1/api/youtube/channel-community-posts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"handle": "@MrBeast"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
channelId | string | No | YouTube channel ID. |
cursor | string | No | Continuation token from a previous response for pagination. |
handle | string | No | YouTube channel handle. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"nextCursor": "cur_VMouee4IpseKyQo6IPoYVg",
"posts": [
{
"channelHandle": "MrBeast",
"channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
"channelTitle": "MrBeast",
"content": "We spent $7,000,000 making the new MrBeast Lab animation series, and EPISODE 1 I…",
"createdUtc": 1793605689,
"id": "UgkxvMrKTpUbvqLPjv-lVi7N0wn68DV_NCBQ",
"image": "",
"likeCount": 9000,
"publishedTime": "1 day ago",
"url": "https://www.youtube.com/post/UgkxvMrKTpUbvqLPjv-lVi7N0wn68DV_NCBQ"
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
data.posts[] | List of community posts for the channel, as returned on this page. |
data.posts[].id | ID of the post. It also appears at the end of the post url. |
data.posts[].content | Text of the post. Long text can end with an ellipsis. |
data.posts[].likeCount | Number of likes on the post, as a whole number. |
data.posts[].createdUtc | Time the post was created, as a Unix timestamp in seconds. |
data.posts[].publishedTime | Relative publish time as shown on YouTube, for example 2 weeks ago. |
data.posts[].image / data.posts[].images[] | Image attached to the post. image is an empty string when the post has no image. images appears on posts that have images. |
data.posts[].url | Link to the post on YouTube. |
data.posts[].channelHandle / data.posts[].channelId / data.posts[].channelTitle | Handle, ID and display name of the channel that made the post. |
data.nextCursor | Token for the next page of posts. Send it as cursor. |
handle or channelId. The handle in the response (channelHandle) has no leading @.cursor set to the data.nextCursor value.id or url with YouTube Community Post.Billed at the actual cost of each call, about $0.0012 for the request above. Failed calls are not charged.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento de uso.
curl -X POST "https://api.sandbase.ai/v1/api/youtube/channel-community-posts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"handle": "@MrBeast"
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
cursorstringContinuation token from a previous response for pagination.
handlestringYouTube channel handle.
channelIdstringYouTube channel ID.
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
Nenhuma resposta salva foi publicada. Execute a API no Playground para inspecionar a resposta.
Explorar mais
| API | Preço | Resposta |
|---|---|---|
YouTube Channel Community PostsEsta API YouTube | A partir de $0.0012 por chamada | JSON |
YouTube | A partir de $0.00045 por chamada | JSON |
YouTube | A partir de $0.0012 por chamada | JSON |
YouTube | A partir de $0.0012 por chamada | JSON |
YouTube | $0.014286 por chamada | JSON |
YouTube | $0.014286 por chamada | JSON |
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/youtube/channel-community-posts com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.
A partir de $0.0012 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.
Nenhum parâmetro é obrigatório. Opcionais: cursor (string), handle (string) e channelId (string). A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.
Não. YouTube Channel Community Posts funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do YouTube separadamente.