YouTube community post API
YouTube community post, as JSON, with id, url, type, author, title and more.
- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
- Status
- Betashape may still gain fields
You send url.
Request
Send your key in the x-api-key header.
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'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,
timeout=60,
)
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/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);
}{
"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": {}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | url | yes | Community post URL (/post/Ug... or /channel/.../community?lb=...). |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are public data, not yours.
{
"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 u...",
"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
}Fields
One Post in data.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "post" | ||
platform | Platform | yes | |
id | string | yes | |
url | string or null | ||
type | "video" or "short" or "reel" or "image" or "carousel" or "story" or "live" or "clip" or "text" or "link" or "tweet" or "pin" or "community_post" or "episode" or "unknown" | ||
author | Author or null | ||
title | string or null | ||
text | string or null | ||
published_at | string (ISO 8601 date-time) or null | ||
duration_seconds | number or null | ||
language | string or null | ||
hashtags | string[] or null | ||
mentions | string[] or null | ||
stats | Stats |
Show the other 6 fields
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), unsupported_url (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
Is there an SDK call for it?
The preview Python client has client.youtube.community_post(...) and the TypeScript client client.youtube.communityPost(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.
Can an AI agent call it?
Yes. The MCP server reaches every built endpoint, with the same prices.