Docs menu

YouTube community post

Beta GET /v1/youtube/community-post

GET /v1/youtube/community-post

YouTube community post.

  • 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
urlURLyesCommunity post URL (/post/Ug... or /channel/.../community?lb=...). Accepted hosts: youtube.com, youtu.be.

Every request also accepts:

  • 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/community-post" \
  -H "x-api-key: $SOCIALSCRAPE_API_KEY" \
  --data-urlencode "url=https://www.youtube.com/post/Ugkx-7xgRw-Uc9lRS3_2RvS2zASPTZOFtIlw"
Python
import os
import requests

params = {
    "url": "https://www.youtube.com/post/Ugkx-7xgRw-Uc9lRS3_2RvS2zASPTZOFtIlw",
}
res = requests.get(
    "https://api.socialscrape.io/v1/youtube/community-post",
    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/community-post");
url.search = new URLSearchParams({
  "url": "https://www.youtube.com/post/Ugkx-7xgRw-Uc9lRS3_2RvS2zASPTZOFtIlw"
}).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 community post",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "https://api.socialscrape.io/v1/youtube/community-post",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "https://www.youtube.com/post/Ugkx-7xgRw-Uc9lRS3_2RvS2zASPTZOFtIlw"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
            }
          ]
        }
      }
    }
  ],
  "connections": {}
}

Example response#

This is a sample from a recorded response, 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_99f96bbbb225f323b8656476",
  "data": {
    "object": "post",
    "platform": "youtube",
    "id": "Ugkx-7xgRw-Uc9lRS3_2RvS2zASPTZOFtIlw",
    "url": "https://www.youtube.com/post/Ugkx-7xgRw-Uc9lRS3_2RvS2zASPTZOFtIlw",
    "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": "Have you heard about MAX POWER?   It's our new aerospace festival, and it's landing at NASA's Kennedy Space Center in Florida, Nov. 7-8.\n\nLearn how to join us: https://www.nasa.gov/maxpower\n\nhttps://www.youtube.com/watch?v=wJhhS...",
    "published_at": "2026-09-30T00:00:00Z",
    "duration_seconds": null,
    "language": null,
    "hashtags": null,
    "mentions": null,
    "stats": {
      "views": null,
      "likes": 340,
      "comments": null,
      "shares": null,
      "saves": null,
      "dislikes": null
    },
    "media": {
      "thumbnail_url": "https://i.ytimg.com/vi/wJhhSlplzuE/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": "wJhhSlplzuE",
        "video_title": "MAX POWER 2026 - Official Announcement",
        "video_url": "https://www.youtube.com/watch?v=wJhhSlplzuE"
      },
      "likes_text": "340",
      "links": [
        {
          "text": "https://www.nasa.gov/maxpower",
          "url": "https://www.nasa.gov/maxpower"
        },
        {
          "text": "https://www.youtube.com/watch?v=wJhhS...",
          "url": "https://www.youtube.com/watch?v=wJhhSlplzuE"
        }
      ],
      "published_at_approximate": true,
      "published_text": "1 month ago"
    }
  },
  "cursor": null,
  "has_more": null
}

Response#

A Post object in data.

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.

Example error:

{
  "ok": false,
  "error": {
    "code": "not_found",
    "message": "The platform says this profile, post or item does not exist.",
    "retryable": false
  },
  "credits_charged": 0,
  "request_id": "req_4b9178d8d46bc22db70ff740"
}