Docs · Public post
Public post
A public post's text, author, engagement counts and attached media.
https://api.lurkapi.com/v1/facebook/postWhen to use this
Pass a public Facebook post permalink or video URL. Public counts can be hidden or delayed; missing fields stay null. The response includes media exposed to logged-out visitors, but does not fetch comments or follow share links. CDN media URLs expire.
Parameters
All parameters go in the query string.
| Parameter | Description |
|---|---|
urlstringrequired | A public Facebook post or video URL. Supports posts, permalink.php, story.php, videos and watch URLs; share links and groups are unavailable.
|
Example request
Replace YOUR_API_KEY with your key, or set LURKAPI_KEY for the code. Get a free key.
curl "https://api.lurkapi.com/v1/facebook/post?url=https%3A%2F%2Fwww.facebook.com%2Fattn%2Fposts%2Fpfbid0j1Czf2gGDVqeQ8KiMLFm3pWN8GxsQmeRrVhimWDzMuKQoR8r4b1knNsejELmUgyhl" \
-H "x-api-key: YOUR_API_KEY"const params = new URLSearchParams({
url: "https://www.facebook.com/attn/posts/pfbid0j1Czf2gGDVqeQ8KiMLFm3pWN8GxsQmeRrVhimWDzMuKQoR8r4b1knNsejELmUgyhl",
});
const res = await fetch(`https://api.lurkapi.com/v1/facebook/post?${params}`, {
headers: { "x-api-key": process.env.LURKAPI_KEY },
});
const data = await res.json();
if (!data.success) throw new Error(`${data.code}: ${data.error}`);
console.log(data.reactions);import os
import requests
res = requests.get(
"https://api.lurkapi.com/v1/facebook/post",
params={
"url": "https://www.facebook.com/attn/posts/pfbid0j1Czf2gGDVqeQ8KiMLFm3pWN8GxsQmeRrVhimWDzMuKQoR8r4b1knNsejELmUgyhl",
},
headers={"x-api-key": os.environ["LURKAPI_KEY"]},
timeout=60,
)
data = res.json()
if not data["success"]:
raise RuntimeError(f"{data['code']}: {data['error']}")
print(data["reactions"])Example response
A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in ….
Show the example response (2 KB)Hide
{
"success": true,
"credits_remaining": 999998,
"credits_charged": 1,
"post_id": "740190678139306",
"url": "https://www.facebook.com/attn/videos/6968553779868435/",
"text": "Learning new problem-solving skills is hard for students…and parents. Ne…",
"created_at": 1701975646,
"author": {
"id": "100064451419378",
"name": "ATTN:",
"url": "https://www.facebook.com/attn"
},
"reaction_count": 3207,
"comment_count": 399,
"share_count": 730,
"view_count": 603570,
"reactions": [
{
"name": "Like",
"count": 1999
},
{
"name": "Haha",
"count": 855
},
{
"name": "Love",
"count": 312
},
{
"name": "Wow",
"count": 16
},
{
"name": "Angry",
"count": 15
},
{
"name": "Care",
"count": 6
},
{
"name": "Sad",
"count": 4
}
],
"media": [
{
"id": "6968553779868435",
"type": "video",
"url": "https://www.facebook.com/attn/videos/6968553779868435/",
"image_url": "https://scontent-iad6-1.xx.fbcdn.net/v/t15.5256-10/386476950_83614653830…",
"width": 1080,
"height": 1080,
"sd_url": "https://video-iad3-2.xx.fbcdn.net/o1/v/t2/f2/m412/AQOwPfru6RYxPhcMZ2m2r_…",
"hd_url": "https://video-iad3-2.xx.fbcdn.net/o1/v/t2/f2/m266/AQPuJagXj7pCjEWxEfAYdX…",
"duration_s": 132.675
}
]
}Response fields
Every field of a successful response. [] marks a list: a[].b is the b of each item in a. nullable fields can be null; optional fields can be missing.
Show all 28 fieldsHide
| Field | Type | Description |
|---|---|---|
| success | true | Always true here; errors have success: false. |
| credits_remaining | number | Your balance after this call. On anonymous playground calls: free tries left today. |
| credits_charged | number | Credits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1). |
| post_id | string | Numeric post id, separate from Facebook's opaque GraphQL story id. |
| url | string | The post's canonical Facebook permalink. |
| text | stringnullable | Public post text, preserving line breaks; null for a media-only post. |
| created_at | numbernullable | Post publication time as Unix seconds; null when Facebook does not disclose it to public visitors. |
| author | object | The author of this post, rather than an author mentioned in its text or comments. |
| author.id | string | Author profile id. |
| author.name | string | Author display name. |
| author.url | stringnullable | Author's public Facebook URL. |
| reaction_count | numbernullable | Total reactions to the post; null when Facebook does not disclose it to public visitors. |
| comment_count | numbernullable | Total comments Facebook reports for the public comment list; null when Facebook does not disclose it to public visitors. |
| share_count | numbernullable | Share count; null when Facebook does not disclose it to public visitors. |
| view_count | numbernullable | Video view count; null when Facebook does not disclose it to public visitors. |
| reactions | object[] | The reaction breakdown Facebook includes; an empty list means no breakdown was exposed. |
| reactions[].name | stringnullable | Facebook's localized reaction name, such as Like or Love. |
| reactions[].count | numbernullable | Number of reactions of this type; null when Facebook does not disclose it to public visitors. |
| media | object[] | Publicly exposed attached images and videos; delivery URLs can expire. |
| media[].id | stringnullable | Media id. |
| media[].type | string | Media format. |
| media[].url | stringnullable | Facebook media permalink. |
| media[].image_url | stringnullable | Image or video thumbnail CDN URL; CDN links expire. |
| media[].width | numbernullable | Media width in pixels; null when Facebook does not disclose it to public visitors. |
| media[].height | numbernullable | Media height in pixels; null when Facebook does not disclose it to public visitors. |
| media[].sd_url | stringnullable | Standard-definition progressive video CDN URL; null for images. CDN links expire. |
| media[].hd_url | stringnullable | High-definition progressive video CDN URL; null for images. CDN links expire. |
| media[].duration_s | numbernullable | Video duration in seconds; null for images; null when Facebook does not disclose it to public visitors. |
Caching and freshness
Responses are cached for up to 5 minutes, so a repeat call within that window can return the same data. It still costs 1 credit.
Errors
Errors return { success: false, error, code, docs } with the HTTP status below. Validation errors, 401/402/429 rejections and 5xx failures are free; not_found is charged (how charging works). All error codes.
| Status | Code | Meaning |
|---|---|---|
| 401 | missing_api_key | No API key. Send it in the x-api-key header. |
| 401 | invalid_api_key | The key is unknown or was revoked. |
| 402 | insufficient_credits | Not enough credits for this call. Buy a pack or wait for tomorrow's top-up. |
| 403 | not_public | The platform confirmed this account or content isn't available to logged-out visitors. Use a publicly visible target. Charged when the platform was checked. |
| 404 | not_found | The endpoint, or the thing you asked for (ad, post, subreddit), doesn't exist. Charged when the platform was checked. |
| 405 | method_not_allowed | Endpoints take GET with query params. |
| 429 | rate_limited | Too many calls at once. Wait for the retry-after seconds, then retry. |
| 500 | internal_error | Something broke on our side. Retry; 5xx errors are free. |
| 502 | upstream_error | The platform didn't give a usable answer. Retry; 5xx errors are free. |
| 503 | upstream_busy | All our connections to the platform are busy. Retry in a few seconds; 5xx errors are free. |
| 504 | upstream_timeout | The platform took over 30 seconds to answer. Retry; timeouts are free. |
Use it in Claude
Once LurkAPI is connected to Claude, this endpoint is the facebook_post tool. Ask in plain English, for example:
Use LurkAPI's facebook_post with url "https://www.facebook.com/attn/posts/pfbid0j1Czf2gGDVqeQ8KiMLFm3pWN8GxsQmeRrVhimWDzMuKQoR8r4b1knNsejELmUgyhl" and summarize what you find.Claude calls facebook_post with arguments like these, and each call costs 1 credit:
{
"url": "https://www.facebook.com/attn/posts/pfbid0j1Czf2gGDVqeQ8KiMLFm3pWN8GxsQmeRrVhimWDzMuKQoR8r4b1knNsejELmUgyhl"
}Tool results skip nulls and empty lists to save tokens.