YouTube channel community posts
Beta GET /v1/youtube/channel/community-posts
GET /v1/youtube/channel/community-posts
Posts from a channel's Posts tab: text, images, an attached video, likes and publish time.
- Cost: 1 credit
- Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
- Cache: Results are kept up to 30 days; send
max_age_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | one of | Channel handle, with or without @. Also accepted as username. |
id | string | one of | Channel id (UC...). Also accepted as channelId, channel_id. |
url | URL | one of | Any channel URL (/@handle, /channel/UC..., /c/name). Accepted hosts: youtube.com, youtu.be. |
Send at least one of handle, id, url. If you send several, the first listed is used and the rest are ignored.
Every request also accepts:
cursor: the cursor from the previous page (Pagination).trim:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).
Example request#
Set your key in the environment first (see Authentication).
curl -G "https://api.socialscrape.io/v1/youtube/channel/community-posts" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode "handle=NASA" \
--data-urlencode "cursor=4qmFsgKBARIYVUNMQV9EaVIxRmZLTnZqdVVwQkhteWxRGkxFZ1Z3YjNOMGM2b0RLQW9rVVRKb1ExSkdVWGRVYTJ4UFlXMW9UMVZxUWxkVlZrVjNUVVJHVkdKVk5VUlNWVVpDS0FyeUJnUUtBa29BmgIWYmFja3N0YWdlLWl0ZW0tc2VjdGlvbg%3D%3D"import os
import requests
params = {
"handle": "NASA",
"cursor": "4qmFsgKBARIYVUNMQV9EaVIxRmZLTnZqdVVwQkhteWxRGkxFZ1Z3YjNOMGM2b0RLQW9rVVRKb1ExSkdVWGRVYTJ4UFlXMW9UMVZxUWxkVlZrVjNUVVJHVkdKVk5VUlNWVVpDS0FyeUJnUUtBa29BmgIWYmFja3N0YWdlLWl0ZW0tc2VjdGlvbg%3D%3D",
}
res = requests.get(
"https://api.socialscrape.io/v1/youtube/channel/community-posts",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/youtube/channel/community-posts");
url.search = new URLSearchParams({
"handle": "NASA",
"cursor": "4qmFsgKBARIYVUNMQV9EaVIxRmZLTnZqdVVwQkhteWxRGkxFZ1Z3YjNOMGM2b0RLQW9rVVRKb1ExSkdVWGRVYTJ4UFlXMW9UMVZxUWxkVlZrVjNUVVJHVkdKVk5VUlNWVVpDS0FyeUJnUUtBa29BmgIWYmFja3N0YWdlLWl0ZW0tc2VjdGlvbg%3D%3D"
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape YouTube channel community posts",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/youtube/channel/community-posts",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "handle",
"value": "NASA"
},
{
"name": "cursor",
"value": "4qmFsgKBARIYVUNMQV9EaVIxRmZLTnZqdVVwQkhteWxRGkxFZ1Z3YjNOMGM2b0RLQW9rVVRKb1ExSkdVWGRVYTJ4UFlXMW9UMVZxUWxkVlZrVjNUVVJHVkdKVk5VUlNWVVpDS0FyeUJnUUtBa29BmgIWYmFja3N0YWdlLWl0ZW0tc2VjdGlvbg%3D%3D"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Example response#
This is a sample from a recorded response, lists and long text are shortened, dash characters in the text are replaced with hyphens. Status 200.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_d7ff480b549117f258451bd9",
"data": {
"object": "list",
"items": [
{
"object": "post",
"platform": "youtube",
"id": "UgkxcfIVZvYd_7ARcfSzY--YC1Qrk_V2mLTm",
"url": "https://www.youtube.com/post/UgkxcfIVZvYd_7ARcfSzY--YC1Qrk_V2mLTm",
"type": "community_post",
"author": {
"id": "UCLA_DiR1FfKNvjuUpBHmylQ",
"handle": "NASA",
"name": "NASA",
"url": "https://www.youtube.com/@NASA",
"avatar_url": "https://yt3.googleusercontent.com/eIf5fNPcIcj9ig-wZBeq4stFy1lgjWTW1nLT5dYlFkHZprZ03QBiMcbpwNMB6XSBjrSFGtAGQg=s76-c-k-c0x00ffffff-no-rj-mo",
"verified": null
},
"title": null,
"text": "On our official YouTube channel, watch the beginnings of journeys to space, see innovative technology that will take us further into the future, follow astronauts on spacewalks, see cosmic objects up close, and interact with experts who’ll...",
"published_at": "2025-10-30T00:00:00Z",
"duration_seconds": null,
"language": null,
"hashtags": null,
"mentions": null,
"stats": {
"views": null,
"likes": 1100,
"comments": null,
"shares": null,
"saves": null,
"dislikes": null
},
"media": {
"thumbnail_url": "https://i.ytimg.com/vi/_MwmAwTQurs/mqdefault.jpg",
"video_url": null,
"audio_url": null,
"image_urls": null,
"width": null,
"height": null
},
"song": null,
"location": null,
"is_pinned": null,
"is_sponsored": null,
"extra": {
"attachment": {
"type": "video",
"video_id": "_MwmAwTQurs",
"video_title": "NASA YouTube (Official Channel Trailer)",
"video_url": "https://www.youtube.com/watch?v=_MwmAwTQurs"
},
"likes_text": "1.1K",
"published_at_approximate": true,
"published_text": "1 year ago"
}
},
{
"object": "post",
"platform": "youtube",
"id": "UgkxlCUj5cNlWBfQH-1khXDn_g_4NXznxCPW",
"url": "https://www.youtube.com/post/UgkxlCUj5cNlWBfQH-1khXDn_g_4NXznxCPW",
"type": "community_post",
"author": {
"id": "UCLA_DiR1FfKNvjuUpBHmylQ",
"handle": "NASA",
"name": "NASA",
"url": "https://www.youtube.com/@NASA",
"avatar_url": "https://yt3.googleusercontent.com/eIf5fNPcIcj9ig-wZBeq4stFy1lgjWTW1nLT5dYlFkHZprZ03QBiMcbpwNMB6XSBjrSFGtAGQg=s76-c-k-c0x00ffffff-no-rj-mo",
"verified": null
},
"title": null,
"text": "Find out how NASA's Daniel Hernandez is helping us learn how to live on Mars - without leaving Earth - in our newest episode of \"Surprisingly STEM.\"",
"published_at": "2025-10-30T00:00:00Z",
"duration_seconds": null,
"language": null,
"hashtags": null,
"mentions": null,
"stats": {
"views": null,
"likes": 719,
"comments": null,
"shares": null,
"saves": null,
"dislikes": null
},
"media": {
"thumbnail_url": "https://i.ytimg.com/vi/nDmuBOBH2N4/mqdefault.jpg",
"video_url": null,
"audio_url": null,
"image_urls": null,
"width": null,
"height": null
},
"song": null,
"location": null,
"is_pinned": null,
"is_sponsored": null,
"extra": {
"attachment": {
"type": "video",
"video_id": "nDmuBOBH2N4",
"video_title": "Surprisingly STEM: Mars Exploration Simulation Manager",
"video_url": "https://www.youtube.com/watch?v=nDmuBOBH2N4"
},
"likes_text": "719",
"published_at_approximate": true,
"published_text": "1 year ago"
}
}
],
"cursor": "4qmFsgKBARIYVUNMQV9EaVIxRmZLTnZqdVVwQkhteWxRGkxFZ1Z3YjNOMGM2b0RLQW9rVVRKb1ExSkdVbFZYYWxab1UwVnZlbFZxUWxkVU1rWlhZMGMxVkdKWVVrVlNWVVpDS0JUeUJnUUtBa29BmgIWYmFja3N0YWdlLWl0ZW0tc2VjdGlvbg%3D%3D",
"has_more": true,
"parent": null
},
"cursor": "4qmFsgKBARIYVUNMQV9EaVIxRmZLTnZqdVVwQkhteWxRGkxFZ1Z3YjNOMGM2b0RLQW9rVVRKb1ExSkdVbFZYYWxab1UwVnZlbFZxUWxkVU1rWlhZMGMxVkdKWVVrVlNWVVpDS0JUeUJnUUtBa29BmgIWYmFja3N0YWdlLWl0ZW0tc2VjdGlvbg%3D%3D",
"has_more": true
}Response#
A list of Post objects in data.items, with data.cursor and data.has_more.
See Data models for every field. The envelope around data is described in Responses.
Errors#
Failures are free: credits_charged is 0. Branch on error.code, never on the message.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
unsupported_url | 400 | no | The URL is not one this endpoint accepts (wrong platform or form). |
not_found | 404 | no | The platform says this profile, post or item does not exist. |
Every request can also fail with the account and platform errors listed on the Errors page.
Related endpoints#
- YouTube channel details (
GET /v1/youtube/channel) - YouTube channel videos (
GET /v1/youtube/channel/videos) - Search inside a YouTube channel (
GET /v1/youtube/channel/search) - YouTube channel playlists (
GET /v1/youtube/channel/playlists) - YouTube channel Shorts (
GET /v1/youtube/channel/shorts) - YouTube channel live streams (
GET /v1/youtube/channel/lives) - YouTube video or Short details (
GET /v1/youtube/video) - YouTube video transcript (
GET /v1/youtube/video/transcript)