YouTube API
Channel Community
Get community posts from a YouTube channel.
POST
$0.01/call/v1/youtube/channel-communityUsage
const res = await fetch('https://api.yepapi.com/v1/youtube/channel-community', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ id: 'UCAuUUnT6oDeKwE6v1NGQxug' }),
});
const { data } = await res.json();
console.log(data.data, data.continuation);curl -X POST https://api.yepapi.com/v1/youtube/channel-community \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id": "UCAuUUnT6oDeKwE6v1NGQxug"}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
id | string | Yes | YouTube channel ID | — |
token | string | No | Pagination token | — |
geo | string | No | Country code for geo-specific results | — |
lang | string | No | Language code | — |
Response
{
"ok": true,
"data": {
"meta": {
"channelId": "UCAuUUnT6oDeKwE6v1NGQxug"
},
"data": [
{
"postId": "UgkxMy8D54...",
"authorText": "TED",
"contentText": "What topic should we cover next?",
"likeCount": 1234,
"publishedTimeText": "3 days ago",
"thumbnail": [
{ "url": "https://yt3.ggpht.com/...", "width": 48, "height": 48 }
]
}
],
"continuation": "4qmF..."
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.meta | object | Channel metadata |
data.meta.channelId | string | Unique YouTube channel identifier |
data.data | object[] | Array of community post objects |
data.data[].postId | string | Unique community post identifier |
data.data[].authorText | string | Display name of the post author |
data.data[].contentText | string | Text content of the community post |
data.data[].likeCount | number | Number of likes on the post |
data.data[].publishedTimeText | string | Relative publish time (e.g. 3 days ago) |
data.data[].thumbnail | object[] | Post attachment or author avatar images |
data.continuation | string | Token to fetch the next page of results |