Facebook profile posts API
Public posts of a page, 3 a page: text, reactions, comments, time, video URLs and top comments.
- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
- Status
- Betashape may still gain fields
You send one of url or id.
Request
Send your key in the x-api-key header.
curl -G "https://api.socialscrape.io/v1/facebook/profile/posts" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode 'url=https://www.facebook.com/NASA'import os
import requests
params = {
"url": "https://www.facebook.com/NASA",
}
res = requests.get(
"https://api.socialscrape.io/v1/facebook/profile/posts",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
timeout=60,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/facebook/profile/posts");
url.search = new URLSearchParams({
url: "https://www.facebook.com/NASA",
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape Facebook profile posts",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/facebook/profile/posts",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "url",
"value": "https://www.facebook.com/NASA"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | url | one of | Profile or page URL. |
id | string | one of | The profile or page id, as `profile` returns it in `id`. Also accepted as pageId, page_id. |
cursor | string | Opaque cursor from the previous page; pass it back unchanged. Also accepted as continuationToken, continuation_token, next_max_id, max_id, max_cursor, min_time, after, page_token, pageToken, paginationToken, next_page_id, page. |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are public data, not yours.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_f162836fecf7a7be2fbc307f",
"data": {
"object": "list",
"items": [
{
"object": "post",
"platform": "facebook",
"id": "1671214107707292",
"url": "https://www.facebook.com/NASA/posts/pfbid02i7hXRsxkXQbb9mvtxBb5jCBdb4pk8xitpnP3cCZF6C56PXk5SNU8sfuwEobZzV5zl",
"type": "image",
"author": {
"id": "100044561550831",
"handle": "NASA",
"name": "NASA - National Aeronautics and Space Administration",
"url": "https://www.facebook.com/NASA",
"avatar_url": null,
"verified": null
},
"title": null,
"text": "Welcome to the Artemis Accords, Vietnam 🇻🇳\n\nVietnam has become the 78th nation to sign the Artemis Accords, and in doing so, support the safe and sustainab...",
"published_at": "2026-10-29T21:45:00Z",
"duration_seconds": null,
"language": null,
"hashtags": null,
"mentions": null,
"stats": {
"views": null,
"likes": 1735,
"comments": 72,
"shares": 138,
"saves": null,
"dislikes": null
},
"media": {
"thumbnail_url": "https://scontent-lga3-1.xx.fbcdn.net/v/t39.99422-6/868627006_28850651794628695_4626767610305041650_n.png?stp=dst-jpg_tt6&cstp=mx2048x1162&ctp=p180x540&_nc_ca...",
"video_url": null,
"audio_url": null,
"image_urls": [
"https://scontent-lga3-1.xx.fbcdn.net/v/t39.99422-6/868627006_28850651794628695_4626767610305041650_n.png?stp=dst-jpg_tt6&cstp=mx2048x1162&ctp=p180x540&_nc_ca..."
],
"width": null,
"height": null
},
"song": null,
"location": null,
"is_pinned": null,
"is_sponsored": null,
"extra": {
"accessibility_caption": "This graphic shows the list of countries that have signed the Artemis Accords. Flags from 78 different nations are listed over an image of the shadowed lunar...",
"feedback_id": "ZmVlZGJhY2s6MTY3MTIxNDEwNzcwNzI5Mg==",
"permalink": "https://www.facebook.com/NASA/posts/pfbid02i7hXRsxkXQbb9mvtxBb5jCBdb4pk8xitpnP3cCZF6C56PXk5SNU8sfuwEobZzV5zl",
"reactions": {
"angry": 1,
"care": 28,
"haha": 7,
"like": 1137,
"love": 555,
"wow": 7
},
"source": "logged_out_public_view",
"top_comments": [
{
"author": {
"id": "1000000001",
"handle": "sample_user",
"name": "Sample User",
"url": null,
"avatar_url": null,
"verified": false
},
"extra": {
"depth": 0,
"feedback_id": "ZmVlZGJhY2s6cGZiaWQwMjFxVmk3UGFVY2tHUWVpaURFVVBHdjViYnA4ZTNzMWpVYmM1WFUzSmI5NmVqeWszYWtpRE1MOFVFVVNock1YdU5CU1o4Q21jMnk5cWtjdGI4Z2FUNW45TDdUWUZ5a0syNkdIbA==",
"graphql_id": "Y29tbWVudDoxNjcxMjE0MTA3NzA3MjkyXzE0MzYwNzAxMzc5MDMxMTE="
},
"id": "1436070137903111",
"object": "comment",
"platform": "facebook",
"post_id": "1671214107707292",
"published_at": "2026-10-29T22:48:11Z",
"stats": {
"likes": 6,
"replies": 4
},
"text": "VN tham gia chương trình nà y để vượn vin phân lô mặt trăng à :))",
"url": "https://www.facebook.com/NASA/posts/pfbid02i7hXRsxkXQbb9mvtxBb5jCBdb4pk8xitpnP3cCZF6C56PXk5SNU8sfuwEobZzV5zl?comment_id=1436070137903111"
}
]
}
},
{
"object": "post",
"platform": "facebook",
"id": "1671157847712918",
"url": "https://www.facebook.com/NASA/posts/pfbid02MwBh6T5CRKK5itNeD6znFoeU1GiT8z7Maew9FQbK92y6VgsrfrrejWmdx59QSyeFl",
"type": "image",
"author": {
"id": "100044561550831",
"handle": "NASA",
"name": "NASA - National Aeronautics and Space Administration",
"url": "https://www.facebook.com/NASA",
"avatar_url": null,
"verified": null
},
"title": null,
"text": "Your name could fly on Saturn’s largest moon.\n\nNASA’s Dragonfly mission will launch in 2028 to explore the dunes, lakes, and rivers of Saturn’s moon, Titan, ...",
"published_at": "2026-10-29T20:15:01Z",
"duration_seconds": null,
"language": null,
"hashtags": null,
"mentions": null,
"stats": {
"views": null,
"likes": 357,
"comments": 24,
"shares": 76,
"saves": null,
"dislikes": null
},
"media": {
"thumbnail_url": "https://scontent-lga3-1.xx.fbcdn.net/v/t39.99422-6/866215691_1164547923190376_1280503157796965888_n.png?stp=dst-jpg_tt6&cstp=mx2048x1152&ctp=s960x960&_nc_cat...",
"video_url": null,
"audio_url": null,
"image_urls": [
"https://scontent-lga3-1.xx.fbcdn.net/v/t39.99422-6/866215691_1164547923190376_1280503157796965888_n.png?stp=dst-jpg_tt6&cstp=mx2048x1152&ctp=s960x960&_nc_cat..."
],
"width": null,
"height": null
},
"song": null,
"location": null,
"is_pinned": null,
"is_sponsored": null,
"extra": {
"accessibility_caption": "A poster-style graphic of the the Dragonfly rotorcraft and two example boarding passes with a reddish-tan background. Text on the graphic reads \"Journey to T...",
"feedback_id": "ZmVlZGJhY2s6MTY3MTE1Nzg0NzcxMjkxOA==",
"permalink": "https://www.facebook.com/NASA/posts/pfbid02MwBh6T5CRKK5itNeD6znFoeU1GiT8z7Maew9FQbK92y6VgsrfrrejWmdx59QSyeFl",
"reactions": {
"care": 10,
"haha": 1,
"like": 252,
"love": 92,
"wow": 2
},
"source": "logged_out_public_view",
"top_comments": [
{
"author": {
"id": "1000000001",
"handle": "sample_user",
"name": "Sample User",
"url": null,
"avatar_url": null,
"verified": false
},
"extra": {
"depth": 0,
"feedback_id": "ZmVlZGJhY2s6MTY3MTE1Nzg0NzcxMjkxOF8xNzg5MjYxNDMyMzA2NjE5",
"graphql_id": "Y29tbWVudDoxNjcxMTU3ODQ3NzEyOTE4XzE3ODkyNjE0MzIzMDY2MTk="
},
"id": "1789261432306619",
"object": "comment",
"platform": "facebook",
"post_id": "1671157847712918",
"published_at": "2026-10-29T21:11:44Z",
"stats": {
"likes": 4
},
"text": "Eren yeager?",
"url": "https://www.facebook.com/NASA/posts/pfbid02MwBh6T5CRKK5itNeD6znFoeU1GiT8z7Maew9FQbK92y6VgsrfrrejWmdx59QSyeFl?comment_id=1789261432306619"
}
]
}
}
],
"cursor": "eyJrIjoicG9zdHMiLCJpZCI6IjEwMDA0NDU2MTU1MDgzMSIsImFmdGVyIjoiQ2c4T2IzSm5ZVzVwWTE5amRYSnpiM0lKQUFBQ1JFRlJTRlIyU1RJMGRXeFlMVTlRVm1aTVNGUk9TblJYUjFaT2VsOTZlRTFhW...",
"has_more": true,
"parent": null
},
"cursor": "eyJrIjoicG9zdHMiLCJpZCI6IjEwMDA0NDU2MTU1MDgzMSIsImFmdGVyIjoiQ2c4T2IzSm5ZVzVwWTE5amRYSnpiM0lKQUFBQ1JFRlJTRlIyU1RJMGRXeFlMVTlRVm1aTVNGUk9TblJYUjFaT2VsOTZlRTFhW...",
"has_more": true
}Fields
A page of results. Each entry in items is a Post. cursor and has_more page through the rest.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "post" | ||
platform | Platform | yes | |
id | string | yes | |
url | string or null | ||
type | "video" or "short" or "reel" or "image" or "carousel" or "story" or "live" or "clip" or "text" or "link" or "tweet" or "pin" or "community_post" or "episode" or "unknown" | ||
author | Author or null | ||
title | string or null | ||
text | string or null | ||
published_at | string (ISO 8601 date-time) or null | ||
duration_seconds | number or null | ||
language | string or null | ||
hashtags | string[] or null | ||
mentions | string[] or null | ||
stats | Stats |
Show the other 6 fields
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), unsupported_url (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
How do I get more than one page?
Send the same request with cursor set to the cursor you received, until has_more is false. Each page costs its own price. See pagination.
Is there an SDK call for it?
The preview Python client has client.facebook.profile_posts(...) and the TypeScript client client.facebook.profilePosts(). Both return the same envelope as the HTTP API. The packages are not published yet; plain HTTP works today in any language.
Can an AI agent call it?
Yes. The MCP server reaches every built endpoint, with the same prices.