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).
Votre sortie apparaîtra ici
Complétez les entrées, puis cliquez sur Exécuter.
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.
Commencer à construire
Point de terminaison de l'API de la plateforme avec authentification unifiée et suivi de l'utilisation.
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"
}'Définissez votre clé API SandBase dans l'environnement de votre serveur. Les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez votre clé côté serveur. Ne l'exposez pas dans le code du navigateur.
cursorstringContinuation token from a previous response for pagination.
handlestringYouTube channel handle.
channelIdstringYouTube channel ID.
Exemple de réponse enregistré pour cette API ; aucune requête en direct n'est effectuée lors de l'affichage.
Aucune réponse enregistrée n'a été publiée. Exécutez l'API dans Playground pour inspecter sa réponse.
Explorer plus
| API | Prix | Réponse |
|---|---|---|
YouTube Channel Community PostsCette API YouTube | À partir de $0.0012 par appel | JSON |
YouTube | À partir de $0.00045 par appel | JSON |
YouTube | À partir de $0.0012 par appel | JSON |
YouTube | À partir de $0.0012 par appel | JSON |
YouTube | $0.014286 par appel | JSON |
YouTube | $0.014286 par appel | JSON |
Questions
Envoyez une requête POST à https://api.sandbase.ai/v1/api/youtube/channel-community-posts avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.
À partir de $0.0012 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.
Aucun paramètre n’est requis. Facultatif : cursor (string), handle (string) et channelId (string). Le tableau des paramètres et le Playground sur cette page listent tous les champs.
Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.
Non. YouTube Channel Community Posts fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API YouTube séparément.