Docs menu

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_days to reuse them for free.
  • Timeout: A request still running after about 25 seconds answers 202 with a job to poll (Batch and jobs).

Parameters#

NameTypeRequiredDescription
handlestringone ofChannel handle, with or without @. Also accepted as username.
idstringone ofChannel id (UC...). Also accepted as channelId, channel_id.
urlURLone ofAny 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: true for a smaller response without null fields and extra.
  • raw: true to also get the platform's original object as raw.
  • 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
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"
Python
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"])
TypeScript
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);
}
n8n
{
  "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.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.
unsupported_url400noThe URL is not one this endpoint accepts (wrong platform or form).
not_found404noThe 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.