LurkAPI
Docs · Public post

Public post

A public post's text, author, engagement counts and attached media.

1 credit per callFresh within 5 minutesMCP tool: facebook_post
GEThttps://api.lurkapi.com/v1/facebook/post

Example response

When to use this

Use it for one post's exact engagement: reactions by type, comment and share counts, and video views, with its text, author, media and link preview. Pass the post's URL. For the comments themselves, use post comments (facebook_post_comments).

Facebook can hide or delay counts, and missing values stay null. Media links expire, so save what you need.

Example request

Copy one and replace YOUR_API_KEY with your API key (get one free). The code versions read the key from the LURKAPI_API_KEY environment variable instead.

Language

Parameters

Add them to the URL after a ?. Join several with &.

ParameterDescription
url
stringrequired
A public Facebook post URL: a /posts/ link, a reel, a video, a watch?v= link, or a permalink.php or story.php link. Group posts and share links don't work.
Example
https://www.facebook.com/attn/posts/pfbid0j1Czf2gGDVqeQ8KiMLFm3pWN8GxsQmeRrVhimWDzMuKQoR8r4b1knNsejELmUgyhl

Example response

A real response, captured from the live API. Lists are trimmed to a couple of items, and long text such as media links is cut short with ….

Show the example response (2 KB)
{
  "success": true,
  "credits_remaining": 999960,
  "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": 3206,
  "comment_count": 399,
  "share_count": 730,
  "view_count": 603570,
  "reactions": [
    {
      "name": "Like",
      "count": 1998
    },
    {
      "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
    }
  ],
  "link": null
}

Response fields

Every field in a successful response, and what it means. A name with [] belongs to each item of a list: reactions[].name is the name of every item in reactions. null means there's no value.

Show all 33 fields
FieldTypeDescription
successtrueAlways true here; errors have success: false.
credits_remainingnumberYour balance after this call. On anonymous playground calls: free tries left today.
credits_chargednumberCredits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1).
post_idstringNumeric post id.
urlstringThe post's canonical Facebook permalink.
textstringcan be nullThe post's text, with line breaks kept; null for a post with only media.
created_atnumbercan be nullPost publication time as Unix seconds; null when Facebook doesn't show it publicly.
authorobjectWho posted it (not someone mentioned in the post or its comments).
author.idstringAuthor profile id.
author.namestringAuthor display name.
author.urlstringcan be nullAuthor's public Facebook URL.
reaction_countnumbercan be nullTotal reactions to the post; null when Facebook doesn't show it publicly.
comment_countnumbercan be nullTotal comments, as Facebook counts them; null when Facebook doesn't show it publicly.
share_countnumbercan be nullShares; null when Facebook doesn't show it publicly.
view_countnumbercan be nullVideo views; null when Facebook doesn't show it publicly.
reactionsobject[]Reactions by type. Empty when Facebook shows no breakdown.
reactions[].namestringcan be nullFacebook's localized reaction name, such as Like or Love.
reactions[].countnumbercan be nullNumber of reactions of this type; null when Facebook doesn't show it publicly.
mediaobject[]Images and videos attached to the post. Their links expire.
media[].idstringcan be nullMedia id.
media[].typestringMedia format.
media[].urlstringcan be nullThe photo's or video's page on Facebook.
media[].image_urlstringcan be nullThe image, or the video's thumbnail. The link expires.
media[].widthnumbercan be nullMedia width in pixels; null when Facebook doesn't show it publicly.
media[].heightnumbercan be nullMedia height in pixels; null when Facebook doesn't show it publicly.
media[].sd_urlstringcan be nullStandard-definition video file URL; null for images. The link expires.
media[].hd_urlstringcan be nullHigh-definition video file URL; null for images. The link expires.
media[].duration_snumbercan be nullVideo duration in seconds; null for images; null when Facebook doesn't show it publicly.
linkobjectcan be nullThe preview card of a link the post shares; null when it shares none.
link.urlstringcan be nullThe shared page's URL as the post links it; it can be a short link.
link.titlestringcan be nullThe preview's title.
link.descriptionstringcan be nullThe preview's description.
link.image_urlstringcan be nullThe preview image, as Facebook stores it. The link expires.

Cost and freshness

Each call costs 1 credit. Calls turned away before they reach the platform (invalid parameters, a key or balance problem, a rate limit) are free, and so are 5xx errors. A not_found is charged, since the platform was checked. How charging works.

Answers are cached for up to 5 minutes. A repeat call within that time can return the same data, and costs the same.

Errors

A failed call returns success: false, an error message, a code your program can check, and a docs link. These are the errors this endpoint can return. All error codes.

StatusCodeMeaning
401missing_api_keyNo API key was sent. Put it in the x-api-key header.
401invalid_api_keyThis key doesn't exist or was revoked.
402insufficient_creditsNot enough credits for this call. Buy a pack, or wait for tomorrow's free top-up.
402over_max_creditsThis call would cost more than the max_credits you set. The error says what it needs; raise max_credits to allow it. Not charged.
403account_suspendedThis account is suspended. Email support@lurkapi.com. Not charged.
403not_publicThe platform shows this account or post only to people who are logged in. Try a public one. Charged, since the platform was checked.
404not_foundWhat you asked for (a post, an ad, a subreddit) doesn't exist, or there's no endpoint at that path. Charged if the platform was checked.
405method_not_allowedEndpoints only take GET, with parameters in the URL.
429rate_limitedToo many calls in a short time. Wait as many seconds as the retry-after header says, then retry.
500internal_errorSomething broke on our side. Retry. Not charged.
502upstream_errorThe platform didn't send a usable answer. Retry. Not charged.
503upstream_busyAll our connections to the platform are busy. Retry in a few seconds. Not charged.
504upstream_timeoutThe platform took over 30 seconds to answer (90 for web pages). Retry. Not charged.

Use it in Claude

Connect LurkAPI to Claude and ask in plain English. This endpoint is the facebook_post tool. For example:

Ask Claude
Use LurkAPI's facebook_post tool with url "https://www.facebook.com/attn/posts/pfbid0j1Czf2gGDVqeQ8KiMLFm3pWN8GxsQmeRrVhimWDzMuKQoR8r4b1knNsejELmUgyhl", then summarize what you find.

Claude calls facebook_post with arguments like these, and each call costs 1 credit:

Tool arguments
{"url": "https://www.facebook.com/attn/posts/pfbid0j1Czf2gGDVqeQ8KiMLFm3pWN8GxsQmeRrVhimWDzMuKQoR8r4b1knNsejELmUgyhl"}

To save tokens, tool results leave out empty fields, keep one URL per image or video, and give transcripts as plain text unless you pass timestamps=true. A result over 45,000 characters comes in parts. Its _note gives the offset for the next part, and later parts are free for 15 minutes. Pass trim=false for the full response.

From the blog

All posts