YouTube Community Post API
YouTube Community Post. HTTPS resource URLs are preferred where supported. Empty results and failures are free.
YouTube Community Post. HTTPS resource URLs are preferred where supported. Empty results and failures are free.
Open product page and API TesterEndpoint and authentication
POST https://api.goanyapi.com/api/v1/youtube/post/detailSynchronous response, without tasks or polling. Use an API Key or supported OAuth Bearer credential. No Path or Query parameters.
Input parameters
| Parameter | Location | Type | Required | Default | Constraints and meaning |
|---|---|---|---|---|---|
| Authorization | Header | string | Yes | — | Bearer YOUR_API_KEY |
| Content-Type | Header | string | Yes | application/json | application/json |
| url | JSON body | string | Yes | — | YouTube channel HTTPS URL, @handle or UC-prefixed channel ID. No prerequisite lookup or separate charge. pattern: ^(?:@[^\s/?#]+|UC[A-Za-z0-9_-]{22}|https://(?:www.|m.)?youtube.com/(?:@[^\s/?#]+|channel/UC[A-Za-z0-9_-]{22}|(?:c|user)/[^\s/?#]+)/?(?:[?#][^\s]*)?)$ minLength: 1 |
| post_url | JSON body | string | Yes | — | YouTube HTTPS /post/<postId> URL or post ID. Obtain from the channel posts endpoint using the same channel URL. Each nonempty successful request is billed separately. Obtain via goanyapi_youtube_channel_posts (POST /api/v1/youtube/channel/posts), with Bearer authentication and JSON body inputs url. Read data.result.items[].id. Each nonempty successful request is billed separately. Never auto-submit the target query. pattern: ^(?:Ug[A-Za-z0-9_-]{8,200}|https://(?:www.|m.)?youtube.com/post/Ug[A-Za-z0-9_-]{8,200}/?(?:[?#][^\s]*)?)$ minLength: 1 |
Obtain prerequisite parameters
First call with the same Bearer authentication: POST /api/v1/youtube/channel/posts
| JSON body parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | YouTube channel HTTPS URL, @handle or UC-prefixed channel ID. No prerequisite lookup or separate charge. |
| cursor | string | No | Omit initially. Pass data.result.next_cursor from this same endpoint unchanged. Stop when hasMore is false or the cursor is missing, empty or unchanged. |
curl -X POST 'https://api.goanyapi.com/api/v1/youtube/channel/posts' -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' --data '{"url":"https://www.youtube.com/@daojie"}'Read data.result.items[].id as post_url (a full post URL is also accepted), keeping the same channel URL as url. Prerequisite and target requests are charged separately at their database-configured rates; empty results and failures are free. Obtaining a parameter never automatically submits the target request.
Output fields
| Field | Type | Meaning |
|---|---|---|
| code | string | ok on success; public error code on failure |
| message | string | Status message |
| data.result | object / null | Public result; null, empty and absent values are preserved |
| data.creditsUsed | integer | Actual configured charge; zero for empty results |
| data.remainingCredits | number | Balance after settlement |
| data.result.items | array | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].type | string | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].id | string | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].title | null | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].content | string | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].author | object | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].author.name | string | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].author.channelId | string | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].author.thumbnails | array | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].author.thumbnails[].url | string | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].author.thumbnails[].width | number | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].author.thumbnails[].height | number | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].publishedTime | string | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].likeCount | string | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].images | array | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].images[].url | string | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].images[].width | number | Actual business field; may be empty or absent; formatted counts are not exact integers |
| data.result.items[].images[].height | number | Actual business field; may be empty or absent; formatted counts are not exact integers |
This endpoint does not accept a cursor or support pagination. List length is the number returned by this request, not a total.
Request example
curl -X POST 'https://api.goanyapi.com/api/v1/youtube/post/detail' -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' --data '{"url":"https://www.youtube.com/@MrBeast","post_url":"https://www.youtube.com/post/UgkxIkDHJ9iW7XmjtMbke3Ud7rEiV5jSHDnR"}'Real response example
Captured from a real request. Only live data.creditsUsed and data.remainingCredits are omitted. Media and caption URLs may have expired.
{
"code": "ok",
"message": "ok",
"data": {
"result": {
"items": [
{
"type": "post",
"id": "UgkxIkDHJ9iW7XmjtMbke3Ud7rEiV5jSHDnR",
"title": null,
"content": "Hunger Games In Real Life drops on Saturday!\nWe designed custom suits that detect when they’re hit by magnetic foam weapons 👀",
"author": {
"name": "MrBeast",
"channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
"thumbnails": [
{
"url": "//yt3.googleusercontent.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s32-c-k-c0x00ffffff-no-rj-mo",
"width": 32,
"height": 32
},
{
"url": "//yt3.googleusercontent.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s48-c-k-c0x00ffffff-no-rj-mo",
"width": 48,
"height": 48
},
{
"url": "//yt3.googleusercontent.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s76-c-k-c0x00ffffff-no-rj-mo",
"width": 76,
"height": 76
}
]
},
"publishedTime": "9 days ago",
"likeCount": "306K",
"images": [
{
"url": "https://yt3.ggpht.com/-nihmRU8RGnrkkYNC73Y_eRRp03ReHeIdKSE8oqRy-HOu0dfZ-7Y5ND61lI9CS3Thlec0shis6WGXQ=s640-c-fcrop64=1,00001000ffffefff-rw-nd-v1",
"width": 640,
"height": 640
},
{
"url": "https://yt3.ggpht.com/g2LFXicy-wjSH-5pvMPnOnp0YHZXO0VaOzf8Y9yws0OFoH2yQjx_1abszLqWNv6f7BoJ3VnXmB6S=s640-c-fcrop64=1,00001000ffffefff-rw-nd-v1",
"width": 640,
"height": 640
}
]
}
]
}
}
}Billing and status codes
…
Each endpoint uses its own database-configured price. Only nonempty successful results are charged; empty results and failures are free. Pages are billed separately. Missing optional titles or descriptions do not invalidate a record. Media results are empty when both video and captions are empty.
| HTTP | Meaning |
|---|---|
| 200 | Query completed; may be empty |
| 400 | Invalid JSON or parameters |
| 401 | Authentication failed |
| 402 | Insufficient credits |
| 429 | Rate limited; honor Retry-After |
| 502 | Data request failed |
| 503 | API or pricing not configured |