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_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 |
|---|---|---|---|
url | URL | yes | Community post URL (/post/Ug... or /channel/.../community?lb=...). Accepted hosts: youtube.com, youtu.be. |
Every request also accepts:
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
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.
| 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.
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"
}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 channel community posts (
GET /v1/youtube/channel/community-posts) - YouTube video or Short details (
GET /v1/youtube/video)