Skip to main content

Fetch a post

Fetch a single public Facebook post — the author, text, timestamp, and engagement counts.

GET /v1/facebook/post/{post_id}

Path parameter​

ParameterDescription
post_idA post id (e.g. 100064000_123123123), a numeric id, or a full Facebook post URL. See identifiers.

Ids and URLs returned by the search and Page-posts endpoints can be passed verbatim.

Examples​

By id:

curl "$LISTENX_BASE/v1/facebook/post/100064000_123123123" \
-H "X-API-Key: $LISTENX_KEY"

By full URL:

curl "$LISTENX_BASE/v1/facebook/post/https://www.facebook.com/story.php?story_fbid=123123123&id=100064000" \
-H "X-API-Key: $LISTENX_KEY"

Response​

{
"id": "100064000_123123123",
"url": "https://www.facebook.com/story.php?story_fbid=123123123&id=100064000",
"author": {
"id": null,
"name": "NASA",
"username": "NASA",
"url": "https://www.facebook.com/NASA/"
},
"text": "We just captured a stunning new image of the Pillars of Creation…",
"created_at": "July 12 at 9:00 AM",
"engagement": {
"reaction_count": 12000,
"comment_count": 345,
"share_count": 67
},
"billing": {
"endpoint": "facebook.post",
"units": 1,
"unit_price": "0.010000",
"amount": "0.010000",
"balance_after": "97.230000",
"request_id": "…"
}
}

Fields​

FieldDescription
idPost id.
urlCanonical post permalink.
authorAuthor details (id, name, username, url).
textThe post text.
created_atWhen the post was published, as shown by Facebook.
engagementReaction, comment, and share counts.

To list the post's comments, call GET /v1/facebook/post/{post_id}/comments.

Billing​

Billed per request — units = 1. See Billing.

Errors​

HTTPcodeMeaning
400invalid_post_idNot a valid post URL or id.
404not_foundPrivate, removed, or nonexistent.
429upstream_rate_limitedTransient block — retry with backoff.