通过 URL 或帖子 ID 获取帖子详情
curl --request GET \
--url https://api.keyapi.ai/v1/facebook/post_details \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.keyapi.ai/v1/facebook/post_details"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.keyapi.ai/v1/facebook/post_details', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.keyapi.ai/v1/facebook/post_details")
.header("Authorization", "Bearer <token>")
.asString();{
"code": 0,
"message": "success",
"data": {
"results": {
"post_id": "1017566160415404",
"type": "post",
"url": "https://www.facebook.com/facebook/posts/pfbid04LGZncNDK9chi72WkGExZyxmsxhbczdieGpVPJT4Hp2izvkEeWNxeWacs7fu1SGxl",
"message": "Nothing works when your ponytail is too tight.",
"message_rich": "Nothing works when your ponytail is too tight.",
"timestamp": 1731700941,
"comments_count": 3117,
"reactions_count": 10000,
"reshare_count": 1745,
"reactions": {
"angry": 19,
"care": 48,
"haha": 4276,
"like": 5329,
"love": 258,
"sad": 10,
"wow": 60
},
"author": {
"id": "100064860875397",
"name": "Facebook",
"url": "https://www.facebook.com/facebook",
"profile_picture_url": "https://scontent.ffcm1-2.fna.fbcdn.net/v/t39.30808-1/380700650_10162533193146729_2379134611963304810_n.jpg?stp=cp0_dst-jpg_tt6&cstp=mx2048x2048&ctp=s80x80&_nc_cat=1&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=v825A_xemiwQ7kNvwHS9chZ&_nc_oc=AdoB8Wx9Knq8G8_QHEK-A-4UnKvF5cWLS2Y2LQxXIaFwhUb628R1tuFoiRxiJe_MyUs&_nc_zt=24&_nc_ht=scontent.ffcm1-2.fna&_nc_gid=eYGCK7Ajif54qPTodleSmQ&_nc_ss=7d289&oh=00_AQIEK16F6VKwmSUDVxWwtQ7pnzAauQItrnv67AQAdhMFbg&oe=6AB8080E",
"delegate_page_id": "20531316728"
},
"authors": [
{
"id": "100064860875397",
"name": "Facebook",
"url": "https://www.facebook.com/facebook",
"profile_picture_url": "https://scontent.ffcm1-2.fna.fbcdn.net/v/t39.30808-1/380700650_10162533193146729_2379134611963304810_n.jpg?stp=cp0_dst-jpg_tt6&cstp=mx2048x2048&ctp=s80x80&_nc_cat=1&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=v825A_xemiwQ7kNvwHS9chZ&_nc_oc=AdoB8Wx9Knq8G8_QHEK-A-4UnKvF5cWLS2Y2LQxXIaFwhUb628R1tuFoiRxiJe_MyUs&_nc_zt=24&_nc_ht=scontent.ffcm1-2.fna&_nc_gid=eYGCK7Ajif54qPTodleSmQ&_nc_ss=7d289&oh=00_AQIEK16F6VKwmSUDVxWwtQ7pnzAauQItrnv67AQAdhMFbg&oe=6AB8080E",
"delegate_page_id": "20531316728"
}
],
"author_title": null,
"image": null,
"video": null,
"video_view_count": null,
"album_preview": null,
"video_files": null,
"video_thumbnail": null,
"external_url": null,
"attached_event": null,
"attached_group": null,
"attached_post": null,
"attached_post_url": null,
"text_format_metadata": null,
"comments_id": "1017566160415404",
"shares_id": "1017566160415404",
"associated_group_id": null,
"associated_group": null,
"images_count": null,
"top_comments": [
{
"type": "top_comment",
"id": "Y29tbWVudDoxMDE3NTY2MTYwNDE1NDA0XzE4ODU3ODQxMjIxOTQ0MDQ=",
"legacy_fb_id": "1885784122194404",
"text": "Loosen the ponytail and enjoy life!☺️",
"author": {
"id": "100051456016380",
"name": "Bigyan Mudbari",
"url": "https://www.facebook.com/100051456016380",
"gender": null,
"profile_image_url": null
},
"created_time": 1731701033
},
{
"type": "top_comment",
"id": "Y29tbWVudDoxMDE3NTY2MTYwNDE1NDA0XzE1NjkxNzU4MzM3OTkwNDQ=",
"legacy_fb_id": "1569175833799044",
"text": "Honestly i cant breath with tight ponytail",
"author": {
"id": "100004257521394",
"name": "Winfred Bauer",
"url": "https://www.facebook.com/100004257521394",
"gender": null,
"profile_image_url": null
},
"created_time": 1731701783
},
{
"type": "top_comment",
"id": "Y29tbWVudDoxMDE3NTY2MTYwNDE1NDA0XzEwODE0Mzk5NzcwMjQ3NDI=",
"legacy_fb_id": "1081439977024742",
"text": "Loosen the ponytail and enjoy life!☺️",
"author": {
"id": "100044169247872",
"name": "Kurian Presenter",
"url": "https://www.facebook.com/100044169247872",
"gender": null,
"profile_image_url": null
},
"created_time": 1731701883
},
{
"type": "top_comment",
"id": "Y29tbWVudDoxMDE3NTY2MTYwNDE1NDA0XzEwNzMxNTM3OTA3NjI5NDk=",
"legacy_fb_id": "1073153790762949",
"text": "Headache and everything.👍🏻🤣",
"author": {
"id": "pfbid0Wjirrd1oqqijsiDo8GPsogJzyRtma5JLd3zvhbDEzNGymX7cXgVbHdXavpmN8bEbl",
"name": "Denisse Cafengiu",
"url": "https://www.facebook.com/pfbid0Wjirrd1oqqijsiDo8GPsogJzyRtma5JLd3zvhbDEzNGymX7cXgVbHdXavpmN8bEbl",
"gender": null,
"profile_image_url": null
},
"created_time": 1731701961
},
{
"type": "top_comment",
"id": "Y29tbWVudDoxMDE3NTY2MTYwNDE1NDA0XzIyMDA1OTAwNTcwMDI4NDY=",
"legacy_fb_id": "2200590057002846",
"text": "Nothing works if my ponytail is too LOOSE",
"author": {
"id": "pfbid0yUqJq7WqUPy2tVe8qbrQVKSuF3DrV6u3aQ2FyScUyifhk2J91kYvTnycLd6Qjwmnl",
"name": "Cara Stone",
"url": "https://www.facebook.com/pfbid0yUqJq7WqUPy2tVe8qbrQVKSuF3DrV6u3aQ2FyScUyifhk2J91kYvTnycLd6Qjwmnl",
"gender": null,
"profile_image_url": null
},
"created_time": 1731702332
}
]
}
},
"requestId": "6ba4a46f-74bb-4584-9728-e06c901ba8d7"
}{
"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"
}帖子与评论
通过 URL 或帖子 ID 获取帖子详情
通过 URL 或帖子 ID 获取帖子详情。如果两个参数都提供,将优先使用帖子 ID。
GET
/
v1
/
facebook
/
post_details
通过 URL 或帖子 ID 获取帖子详情
curl --request GET \
--url https://api.keyapi.ai/v1/facebook/post_details \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.keyapi.ai/v1/facebook/post_details"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.keyapi.ai/v1/facebook/post_details', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.keyapi.ai/v1/facebook/post_details")
.header("Authorization", "Bearer <token>")
.asString();{
"code": 0,
"message": "success",
"data": {
"results": {
"post_id": "1017566160415404",
"type": "post",
"url": "https://www.facebook.com/facebook/posts/pfbid04LGZncNDK9chi72WkGExZyxmsxhbczdieGpVPJT4Hp2izvkEeWNxeWacs7fu1SGxl",
"message": "Nothing works when your ponytail is too tight.",
"message_rich": "Nothing works when your ponytail is too tight.",
"timestamp": 1731700941,
"comments_count": 3117,
"reactions_count": 10000,
"reshare_count": 1745,
"reactions": {
"angry": 19,
"care": 48,
"haha": 4276,
"like": 5329,
"love": 258,
"sad": 10,
"wow": 60
},
"author": {
"id": "100064860875397",
"name": "Facebook",
"url": "https://www.facebook.com/facebook",
"profile_picture_url": "https://scontent.ffcm1-2.fna.fbcdn.net/v/t39.30808-1/380700650_10162533193146729_2379134611963304810_n.jpg?stp=cp0_dst-jpg_tt6&cstp=mx2048x2048&ctp=s80x80&_nc_cat=1&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=v825A_xemiwQ7kNvwHS9chZ&_nc_oc=AdoB8Wx9Knq8G8_QHEK-A-4UnKvF5cWLS2Y2LQxXIaFwhUb628R1tuFoiRxiJe_MyUs&_nc_zt=24&_nc_ht=scontent.ffcm1-2.fna&_nc_gid=eYGCK7Ajif54qPTodleSmQ&_nc_ss=7d289&oh=00_AQIEK16F6VKwmSUDVxWwtQ7pnzAauQItrnv67AQAdhMFbg&oe=6AB8080E",
"delegate_page_id": "20531316728"
},
"authors": [
{
"id": "100064860875397",
"name": "Facebook",
"url": "https://www.facebook.com/facebook",
"profile_picture_url": "https://scontent.ffcm1-2.fna.fbcdn.net/v/t39.30808-1/380700650_10162533193146729_2379134611963304810_n.jpg?stp=cp0_dst-jpg_tt6&cstp=mx2048x2048&ctp=s80x80&_nc_cat=1&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=v825A_xemiwQ7kNvwHS9chZ&_nc_oc=AdoB8Wx9Knq8G8_QHEK-A-4UnKvF5cWLS2Y2LQxXIaFwhUb628R1tuFoiRxiJe_MyUs&_nc_zt=24&_nc_ht=scontent.ffcm1-2.fna&_nc_gid=eYGCK7Ajif54qPTodleSmQ&_nc_ss=7d289&oh=00_AQIEK16F6VKwmSUDVxWwtQ7pnzAauQItrnv67AQAdhMFbg&oe=6AB8080E",
"delegate_page_id": "20531316728"
}
],
"author_title": null,
"image": null,
"video": null,
"video_view_count": null,
"album_preview": null,
"video_files": null,
"video_thumbnail": null,
"external_url": null,
"attached_event": null,
"attached_group": null,
"attached_post": null,
"attached_post_url": null,
"text_format_metadata": null,
"comments_id": "1017566160415404",
"shares_id": "1017566160415404",
"associated_group_id": null,
"associated_group": null,
"images_count": null,
"top_comments": [
{
"type": "top_comment",
"id": "Y29tbWVudDoxMDE3NTY2MTYwNDE1NDA0XzE4ODU3ODQxMjIxOTQ0MDQ=",
"legacy_fb_id": "1885784122194404",
"text": "Loosen the ponytail and enjoy life!☺️",
"author": {
"id": "100051456016380",
"name": "Bigyan Mudbari",
"url": "https://www.facebook.com/100051456016380",
"gender": null,
"profile_image_url": null
},
"created_time": 1731701033
},
{
"type": "top_comment",
"id": "Y29tbWVudDoxMDE3NTY2MTYwNDE1NDA0XzE1NjkxNzU4MzM3OTkwNDQ=",
"legacy_fb_id": "1569175833799044",
"text": "Honestly i cant breath with tight ponytail",
"author": {
"id": "100004257521394",
"name": "Winfred Bauer",
"url": "https://www.facebook.com/100004257521394",
"gender": null,
"profile_image_url": null
},
"created_time": 1731701783
},
{
"type": "top_comment",
"id": "Y29tbWVudDoxMDE3NTY2MTYwNDE1NDA0XzEwODE0Mzk5NzcwMjQ3NDI=",
"legacy_fb_id": "1081439977024742",
"text": "Loosen the ponytail and enjoy life!☺️",
"author": {
"id": "100044169247872",
"name": "Kurian Presenter",
"url": "https://www.facebook.com/100044169247872",
"gender": null,
"profile_image_url": null
},
"created_time": 1731701883
},
{
"type": "top_comment",
"id": "Y29tbWVudDoxMDE3NTY2MTYwNDE1NDA0XzEwNzMxNTM3OTA3NjI5NDk=",
"legacy_fb_id": "1073153790762949",
"text": "Headache and everything.👍🏻🤣",
"author": {
"id": "pfbid0Wjirrd1oqqijsiDo8GPsogJzyRtma5JLd3zvhbDEzNGymX7cXgVbHdXavpmN8bEbl",
"name": "Denisse Cafengiu",
"url": "https://www.facebook.com/pfbid0Wjirrd1oqqijsiDo8GPsogJzyRtma5JLd3zvhbDEzNGymX7cXgVbHdXavpmN8bEbl",
"gender": null,
"profile_image_url": null
},
"created_time": 1731701961
},
{
"type": "top_comment",
"id": "Y29tbWVudDoxMDE3NTY2MTYwNDE1NDA0XzIyMDA1OTAwNTcwMDI4NDY=",
"legacy_fb_id": "2200590057002846",
"text": "Nothing works if my ponytail is too LOOSE",
"author": {
"id": "pfbid0yUqJq7WqUPy2tVe8qbrQVKSuF3DrV6u3aQ2FyScUyifhk2J91kYvTnycLd6Qjwmnl",
"name": "Cara Stone",
"url": "https://www.facebook.com/pfbid0yUqJq7WqUPy2tVe8qbrQVKSuF3DrV6u3aQ2FyScUyifhk2J91kYvTnycLd6Qjwmnl",
"gender": null,
"profile_image_url": null
},
"created_time": 1731702332
}
]
}
},
"requestId": "6ba4a46f-74bb-4584-9728-e06c901ba8d7"
}{
"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"
}🪙4 credits每次请求
复制给 AI
🤖 为什么还要自己写代码?
让 AI 来处理重复工作。点击按钮即可复制一段整理好的提示词,用于 ChatGPT、Claude 或你常用的 AI 助手。
授权
查询参数
Facebook 帖子 ID。
示例:
"pfbid04KTWEM9Rri6Wg3oLRBF5FUUvfPebQ6ZJRwVivymc8e8KWvy3RsnpUXyppjEZqkwZl"
Facebook 帖子 URL。请提供 post_id 或 post_url 其中之一。
响应
The response is of type object.

