Fetch a post
Fetch a single public Facebook post — the author, text, timestamp, and engagement counts.
GET /v1/facebook/post/{post_id}
Path parameter
| Parameter | Description |
|---|---|
post_id | A 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
| Field | Description |
|---|---|
id | Post id. |
url | Canonical post permalink. |
author | Author details (id, name, username, url). |
text | The post text. |
created_at | When the post was published, as shown by Facebook. |
engagement | Reaction, 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
| HTTP | code | Meaning |
|---|---|---|
| 400 | invalid_post_id | Not a valid post URL or id. |
| 404 | not_found | Private, removed, or nonexistent. |
| 429 | upstream_rate_limited | Transient block — retry with backoff. |