cURL
curl --request GET \
--url 'https://api.keyapi.ai/v1/youtube/get_post_detail?post_id=UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy&language_code=zh-CN&country_code=US' \
--header 'Authorization: Bearer <YOUR_API_KEY>'import requests
response = requests.get(
'https://api.keyapi.ai/v1/youtube/get_post_detail',
params={"post_id":"UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy","language_code":"zh-CN","country_code":"US"},
headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
)
print(response.json())const params = new URLSearchParams({"post_id":"UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy","language_code":"zh-CN","country_code":"US"});
const response = await fetch(`https://api.keyapi.ai/v1/youtube/get_post_detail?${params}`, {
method: 'GET',
headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
});
const data = await response.json();
console.log(data);{
"code": 0,
"message": "success",
"data": {
"post": {
"post_id": "UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy",
"post_url": "https://www.youtube.com/post/UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy",
"author_name": "YouTube Creators",
"author_channel_id": "UCkRfArvrzheW2E7b6SVT7vQ",
"author_url": "/@youtubecreators",
"author_thumbnails": [
{
"url": "//yt3.googleusercontent.com/LZeUOuOM8lzINkYAKi1X3pCQz1xsSD_EndPUR1vOGesaGavUtyM_-bCUq7Gld-LPX_R7uieWsA=s32-c-k-c0x00ffffff-no-rj-mo",
"width": 32,
"height": 32
},
{
"url": "//yt3.googleusercontent.com/LZeUOuOM8lzINkYAKi1X3pCQz1xsSD_EndPUR1vOGesaGavUtyM_-bCUq7Gld-LPX_R7uieWsA=s48-c-k-c0x00ffffff-no-rj-mo",
"width": 48,
"height": 48
},
{
"url": "//yt3.googleusercontent.com/LZeUOuOM8lzINkYAKi1X3pCQz1xsSD_EndPUR1vOGesaGavUtyM_-bCUq7Gld-LPX_R7uieWsA=s76-c-k-c0x00ffffff-no-rj-mo",
"width": 76,
"height": 76
}
],
"content_text": "🎉 Posts are rolling out to more creators than ever before!! 🎉 \n\nWe're so excited to announce that we’re starting to roll out posts access to all eligible channels TODAY and over the coming weeks. While posts will become available to most channels on YouTube, there are some cases where the feature will continue to be turned off as it has been historically:\n\n✅ Channels that are set as Made for Kids\n✅ Folks who access YouTube with a supervised account\n✅ More details can be found in our Help Center: https://yt.be/help/postsGA \n\nOnce you have access, get the post party on your channel started by: \n\n1️⃣ Tapping the “+” button in the YouTube mobile app or the 🎥 ”Create” > 📝 “Create post” button on desktop to draft a post\n2️⃣ Play around with different format options - we have polls, quizzes, GIFs, text, images, and video posts!\n3️⃣ Share a post with your audience and watch the connection between you and your viewers deepen\n\nThis update will roll out over the next few weeks. Happy posting! ⭐",
"published_time": "2年前(修改过)",
"vote_count": "4361",
"comment_count": "",
"attachment": {
"type": "image",
"images": [
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s288-rw-nd-v1",
"width": 288,
"height": 288
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s400-rw-nd-v1",
"width": 400,
"height": 400
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s512-rw-nd-v1",
"width": 512,
"height": 512
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s640-rw-nd-v1",
"width": 640,
"height": 640
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s800-rw-nd-v1",
"width": 800,
"height": 800
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s1024-rw-nd-v1",
"width": 1024,
"height": 1024
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s1600-rw-nd-v1",
"width": 1600,
"height": 1600
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s2048-rw-nd-v1",
"width": 2048,
"height": 2048
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s2250-rw-nd-v1",
"width": 2250,
"height": 2250
}
]
}
},
"channel_metadata": {
"title": "YouTube Creators",
"description": "",
"channel_url": "",
"channel_id": "UCkRfArvrzheW2E7b6SVT7vQ",
"avatar_url": ""
},
"comments_continuation_token": "4qmFsgKzAhIoRkVjb21tZW50X3Bvc3RfZGV0YWlsX3BhZ2Vfd2ViX3RvcF9sZXZlbBqGAkVnVndiM04wYzZvRFd5SkhNQURZQVFIcUFTUlZaMnQ0YVVOVFVtWkVObWMzVTFCc1YwZFFSR0V6ZG1KUU4yRkpjM2wwV0ZKcmRubnlBUmhWUTJ0U1prRnlkbko2YUdWWE1rVTNZalpUVmxRM2RsRkNFR052YlcxbGJuUnpMWE5sWTNScGIyN0NBMW9TR0ZWRGExSm1RWEoyY25wb1pWY3lSVGRpTmxOV1ZEZDJVUm9rVldkcmVHbERVMUptUkRabk4xTlFiRmRIVUVSaE0zWmlVRGRoU1hONWRGaFNhM1o1V2hoVlEydFNaa0Z5ZG5KNmFHVlhNa1UzWWpaVFZsUTNkbEUlM0Q%3D"
},
"requestId": "4e0db876-c5e3-4d63-9928-803683a9092d"
}{
"code": 400,
"data": null,
"message": "Missing required parameter: handle"
}{
"code": 401,
"data": null,
"message": "apiKey is null"
}{
"code": 402,
"data": null,
"message": "apiKey quota is not enough"
}{
"code": 429,
"data": null,
"message": "qps limit exceeded"
}{
"code": 500,
"data": null,
"message": "Internal server error"
}YouTube Channel
Get post detail
Get YouTube post (community post) detail information
GET
/
v1
/
youtube
/
get_post_detail
cURL
curl --request GET \
--url 'https://api.keyapi.ai/v1/youtube/get_post_detail?post_id=UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy&language_code=zh-CN&country_code=US' \
--header 'Authorization: Bearer <YOUR_API_KEY>'import requests
response = requests.get(
'https://api.keyapi.ai/v1/youtube/get_post_detail',
params={"post_id":"UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy","language_code":"zh-CN","country_code":"US"},
headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
)
print(response.json())const params = new URLSearchParams({"post_id":"UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy","language_code":"zh-CN","country_code":"US"});
const response = await fetch(`https://api.keyapi.ai/v1/youtube/get_post_detail?${params}`, {
method: 'GET',
headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
});
const data = await response.json();
console.log(data);{
"code": 0,
"message": "success",
"data": {
"post": {
"post_id": "UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy",
"post_url": "https://www.youtube.com/post/UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy",
"author_name": "YouTube Creators",
"author_channel_id": "UCkRfArvrzheW2E7b6SVT7vQ",
"author_url": "/@youtubecreators",
"author_thumbnails": [
{
"url": "//yt3.googleusercontent.com/LZeUOuOM8lzINkYAKi1X3pCQz1xsSD_EndPUR1vOGesaGavUtyM_-bCUq7Gld-LPX_R7uieWsA=s32-c-k-c0x00ffffff-no-rj-mo",
"width": 32,
"height": 32
},
{
"url": "//yt3.googleusercontent.com/LZeUOuOM8lzINkYAKi1X3pCQz1xsSD_EndPUR1vOGesaGavUtyM_-bCUq7Gld-LPX_R7uieWsA=s48-c-k-c0x00ffffff-no-rj-mo",
"width": 48,
"height": 48
},
{
"url": "//yt3.googleusercontent.com/LZeUOuOM8lzINkYAKi1X3pCQz1xsSD_EndPUR1vOGesaGavUtyM_-bCUq7Gld-LPX_R7uieWsA=s76-c-k-c0x00ffffff-no-rj-mo",
"width": 76,
"height": 76
}
],
"content_text": "🎉 Posts are rolling out to more creators than ever before!! 🎉 \n\nWe're so excited to announce that we’re starting to roll out posts access to all eligible channels TODAY and over the coming weeks. While posts will become available to most channels on YouTube, there are some cases where the feature will continue to be turned off as it has been historically:\n\n✅ Channels that are set as Made for Kids\n✅ Folks who access YouTube with a supervised account\n✅ More details can be found in our Help Center: https://yt.be/help/postsGA \n\nOnce you have access, get the post party on your channel started by: \n\n1️⃣ Tapping the “+” button in the YouTube mobile app or the 🎥 ”Create” > 📝 “Create post” button on desktop to draft a post\n2️⃣ Play around with different format options - we have polls, quizzes, GIFs, text, images, and video posts!\n3️⃣ Share a post with your audience and watch the connection between you and your viewers deepen\n\nThis update will roll out over the next few weeks. Happy posting! ⭐",
"published_time": "2年前(修改过)",
"vote_count": "4361",
"comment_count": "",
"attachment": {
"type": "image",
"images": [
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s288-rw-nd-v1",
"width": 288,
"height": 288
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s400-rw-nd-v1",
"width": 400,
"height": 400
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s512-rw-nd-v1",
"width": 512,
"height": 512
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s640-rw-nd-v1",
"width": 640,
"height": 640
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s800-rw-nd-v1",
"width": 800,
"height": 800
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s1024-rw-nd-v1",
"width": 1024,
"height": 1024
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s1600-rw-nd-v1",
"width": 1600,
"height": 1600
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s2048-rw-nd-v1",
"width": 2048,
"height": 2048
},
{
"url": "https://yt3.ggpht.com/wbxSQ9KLMZWcSCw2Q78wZ1YfvUb9zpWRs6QYRSHt4n277DENaKkLxd9WYZeU4NGCplLEe4E1Ty1TMQ=s2250-rw-nd-v1",
"width": 2250,
"height": 2250
}
]
}
},
"channel_metadata": {
"title": "YouTube Creators",
"description": "",
"channel_url": "",
"channel_id": "UCkRfArvrzheW2E7b6SVT7vQ",
"avatar_url": ""
},
"comments_continuation_token": "4qmFsgKzAhIoRkVjb21tZW50X3Bvc3RfZGV0YWlsX3BhZ2Vfd2ViX3RvcF9sZXZlbBqGAkVnVndiM04wYzZvRFd5SkhNQURZQVFIcUFTUlZaMnQ0YVVOVFVtWkVObWMzVTFCc1YwZFFSR0V6ZG1KUU4yRkpjM2wwV0ZKcmRubnlBUmhWUTJ0U1prRnlkbko2YUdWWE1rVTNZalpUVmxRM2RsRkNFR052YlcxbGJuUnpMWE5sWTNScGIyN0NBMW9TR0ZWRGExSm1RWEoyY25wb1pWY3lSVGRpTmxOV1ZEZDJVUm9rVldkcmVHbERVMUptUkRabk4xTlFiRmRIVUVSaE0zWmlVRGRoU1hONWRGaFNhM1o1V2hoVlEydFNaa0Z5ZG5KNmFHVlhNa1UzWWpaVFZsUTNkbEUlM0Q%3D"
},
"requestId": "4e0db876-c5e3-4d63-9928-803683a9092d"
}{
"code": 400,
"data": null,
"message": "Missing required parameter: handle"
}{
"code": 401,
"data": null,
"message": "apiKey is null"
}{
"code": 402,
"data": null,
"message": "apiKey quota is not enough"
}{
"code": 429,
"data": null,
"message": "qps limit exceeded"
}{
"code": 500,
"data": null,
"message": "Internal server error"
}🪙2 creditper request
Copy for AI
🤖 Why Code When AI Can Do It For You?
Stop writing code like it’s 1970! Let AI do the heavy lifting - click the sparkles to copy a perfectly formatted prompt for ChatGPT, Claude, or your favorite AI assistant.
Authorizations
Query Parameters
Post ID. Extract it from a post URL, for example https://www.youtube.com/post/UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy.
Example:
"UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy"
Language code.
Country or region code.
Response
The response is of type object.
⌘I

