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 频道
获取帖子详情
获取YouTube帖子(社区帖子)的详细信息
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 credit每次请求
Copy for AI
🤖 让 AI 帮你写调用代码
点击按钮复制一段结构化提示词,可直接交给 ChatGPT、Claude 或其他 AI 助手生成接口调用代码。
授权
查询参数
帖子ID,获取方式: 从帖子URL中提取,例如 https://www.youtube.com/post/UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy 中UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy
示例:
"UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy"
语言代码
国家代码
响应
The response is of type object.
⌘I

