FacebookUSER
Get Facebook user posts
Retrieve a user's posts (newest first) with engagement metrics and media. Pass pagination.next_cursor back as cursor for the next page. Facebook decides the page size — expect roughly 6 posts per page. metrics.reaction_count counts all reactions combined, while metrics.like_count counts only "like" reactions; metrics.view_count appears only on videos and reels. Text posts carry an empty media array, and albums carry one entry per photo. Note that media URLs are temporary Facebook CDN links that expire — download or re-fetch them rather than storing them.
/v1/facebook/user/postsCursor-paginatedhttps://social-api.airaa.xyzcurl "https://social-api.airaa.xyz/v1/facebook/user/posts?username=nasa" \ -H "X-API-KEY: $AIRAA_KEY"
{
"user": {
"id": "100044561550831",
"username": "NASA",
"display_name": "NASA - National Aeronautics and Space Administration",
"profile_url": "https://www.facebook.com/NASA",
"profile_picture_url": "https://scontent.fbeg4-1.fna.fbcdn.net/v/t39.30808-1/243095782_416661036495945_3843362260429099279_n.png"
},
"posts": [
{
"id": "1690599575768745",
"story_id": "UzpfSTEwMDA0NDU2MTU1MDgzMToxNjkwNTk5NTc1NzY4NzQ1OjE2OTA1OTk1NzU3Njg3NDU=",
"post_url": "https://www.facebook.com/story.php?story_fbid=pfbid02q43HZPPzdRUFnCmFdtEHdHpvpXTUkMaMUNbAeieUQf7WnUqzizMPwjeus2AuYFGgl&id=100044561550831",
"type": "photo",
"caption": "Beauty in chaos 🎨\n\nThis photo from our Chandra X-ray Observatory is the clearest view we have of the remains of an exploded star located in the center of the Milky Way. Scientists can use this…",
"published_at": "2026-11-17T22:03:34.000Z",
"metrics": {
"reaction_count": 482,
"like_count": 351,
"comment_count": 11,
"share_count": 55
},
"media": [
{
"type": "photo",
"id": "1690599555768747",
"url": "https://scontent.fbeg4-1.fna.fbcdn.net/v/t39.30808-6/916765074_1690599559102080_8008653452099091270_n.jpg",
"width": 2048,
"height": 2048
}
]
},
{
"id": "1689621505866552",
"story_id": "UzpfSTEwMDA0NDU2MTU1MDgzMToxNjg5NjIxNTA1ODY2NTUyOjE2ODk2MjE1MDU4NjY1NTI=",
"post_url": "https://www.facebook.com/story.php?story_fbid=pfbid02YEuLVmNMDV283vff9MAQpMS1WDhduzDAFFUK7DgQM5LsGj1ViJagQFno3jg1SiR2l&id=100044561550831",
"type": "photo",
"caption": "You could walk on the Moon someday.\n\nWe are accepting applications for our next class of astronauts until Dec. 3. Hear about the application process and what it takes from NASA astronaut Nichole…",
"published_at": "2026-11-16T21:18:01.000Z",
"metrics": {
"reaction_count": 627,
"like_count": 490,
"comment_count": 64,
"share_count": 64
},
"media": [
{
"type": "photo",
"id": "1689621489199887",
"url": "https://scontent.fbeg5-1.fna.fbcdn.net/v/t39.99422-6/910466255_1835901000787898_7791381628991831660_n.png",
"width": 1707,
"height": 960
}
]
}
],
"pagination": {
"next_cursor": "SHs-aJpewR-DOTDwLSD6-1ViLn0xia7SgJOCA6JGxkze…",
"has_more": true
}
}Parameters
Query stringusernamestringrequiredFacebook username, numeric user ID, or full profile URL
Example nasa
cursorstringoptionalPagination cursor from the previous response (pagination.next_cursor)
Response
200 · application/jsonAbsent fields are omitted, never null. Response conventions
| Field | Type | Description |
|---|---|---|
| user | object | The profile or Page whose posts are returned |
| user.id | string | Canonical Facebook ID of the profile or Page |
| user.username | string | Facebook username, as in the profile URL |
| user.display_name | string | Name shown on the profile or Page |
| user.profile_url | string · url | Absolute URL of the profile on facebook.com |
| user.profile_picture_url | string · url | Profile picture URL on the Facebook CDN |
| posts | array<object> | Posts on this page, newest first; Facebook sets the page size (about 6) |
| posts[].id | string | Canonical post ID |
| posts[].story_id | string | Story ID; works as id on /v1/facebook/posts/details without username |
| posts[].post_url | string · url | Absolute URL of the post on facebook.com |
| posts[].type | string | Post kind: photo, album, video or reel |
| posts[].caption | string | Caption text |
| posts[].published_at | string · date-time | When the post was published, ISO 8601 UTC timestamp |
| posts[].metrics | object | Engagement counts for the post |
Errors
{ "error": "message" }| Status | Meaning | Retry |
|---|---|---|
| 400 | Missing or invalid query parameter { "error": "username is required" } | No. Fix the request. |
| 401 | Missing or invalid { "error": "Invalid API key." } | No. Check the key. |
| 404 | The requested account or post does not exist { "error": "This account does not exist." } | No. It doesn't exist. |
| 429 | Request quota exceeded — contact light@airaa.xyz to upgrade your plan { "error": "Request quota exceeded — contact light@airaa.xyz to upgrade your plan." } | After your quota resets |
| 500 | Server misconfiguration — API key environment variable not set { "error": "Server configuration error" } | No. Contact us. |
| 502 | Upstream provider temporarily unavailable — please try again { "error": "Upstream service unavailable" } | Yes, with backoff |
| 504 | Request timed out — please try again { "error": "Request timed out — please try again." } | Yes, with backoff |