Skip to main content

Fetch a Page or profile's posts

Fetch one page of a public Page or profile's posts, newest first, with engagement counts.

GET /v1/facebook/page/{page_id}/posts

Path parameter​

ParameterDescription
page_idA vanity username (nasa), a numeric id, or a full Facebook Page/profile URL.

Query parameters​

ParameterRequiredDescription
cursornoOmit for the first page; pass the next_cursor from a previous response to fetch the next page.

Example​

curl "$LISTENX_BASE/v1/facebook/page/nasa/posts" \
-H "X-API-Key: $LISTENX_KEY"

Fetch the next page:

curl "$LISTENX_BASE/v1/facebook/page/nasa/posts?cursor=eyJ..." \
-H "X-API-Key: $LISTENX_KEY"

Response​

{
"page": "nasa",
"profile": {
"id": "100064000",
"name": "NASA",
"username": "NASA",
"url": "https://www.facebook.com/NASA",
"follower_count": "28M"
},
"returned": 10,
"has_next_page": true,
"next_cursor": "eyJ...",
"results": [
{
"id": "100064000_777000111",
"url": "https://www.facebook.com/story.php?story_fbid=777000111&id=100064000",
"author": {
"id": null,
"name": "NASA",
"username": "NASA",
"url": "https://www.facebook.com/NASA/"
},
"text": "Our Artemis mission is one step closer…",
"created_at": "5 hrs",
"engagement": {
"reaction_count": 8200,
"comment_count": 210,
"share_count": 44
}
}
],
"billing": {
"endpoint": "facebook.page_posts",
"units": 1,
"unit_price": "0.010000",
"amount": "0.010000",
"balance_after": "97.220000",
"request_id": "…"
}
}

Fields​

FieldDescription
pageThe identifier you requested.
profilePage/profile summary (id, name, username, url, follower_count).
returnedNumber of posts on this page.
has_next_pagetrue if more posts remain.
next_cursorPass back as cursor to fetch the next page; null when exhausted.
results[]Posts with author, text, timestamp, and engagement counts.

Billing​

Billed per page — units = 1 per request. See Billing.

Errors​

HTTPcodeMeaning
400invalid_requestEmpty page id or invalid cursor.
404not_foundPage/profile not found or not public.
429upstream_rate_limitedTransient block — retry with backoff.