LurkAPI
Docs · Profile posts

Profile posts

A Facebook Page's or public person's latest posts, newest first, 5 per page.

1 credit per callFresh within 10 minutesMCP tool: facebook_profile_posts
GEThttps://api.lurkapi.com/v1/facebook/profile/posts

Example response

When to use this

Use it to follow what a Page or person posts. Pass a profile url or a numeric pageId. You get the timeline a logged-out visitor sees: text, time, author, media, link previews, shared posts and engagement counts.

Counts are rounded from 1,000 up, as the timeline shows them. For exact counts, pass a post's url to the post endpoint (facebook_post).

Pagination. 5 posts per page, newest first. Pass cursor back for the next page. It's null on the last page.

A profile Facebook hides from logged-out visitors (unknown, or a private person) returns 404 not_found, which is charged.

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
stringoptional
A Facebook Page or personal profile URL, e.g. https://www.facebook.com/NASA. Also accepts profile.php?id=…, /people/<name>/<id> and /pages/<name>/<id> links. Group and share links don't work.
Example
https://www.facebook.com/NASA
pageId
stringoptional
A numeric Page or profile id, e.g. 100044561550831 (NASA), instead of url. Ignored when url is set.
cursor
stringoptional
The cursor from the previous response, for the next page.

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 (3 KB)
{
  "success": true,
  "credits_remaining": 999999,
  "credits_charged": 1,
  "posts": [
    {
      "post_id": "1658876782274358",
      "url": "https://www.facebook.com/NASA/posts/pfbid0jzaSu71udHuXXhr9dE2wWtP3B23baK…",
      "text": "Float into the weekend... 🪼\n\nLike a space jellyfish! This fuzzy, glowin…",
      "created_at": 1792181102,
      "author": {
        "id": "100044561550831",
        "name": "NASA - National Aeronautics and Space Administration",
        "url": "https://www.facebook.com/NASA"
      },
      "reaction_count": 122000,
      "comment_count": 2100,
      "share_count": 14000,
      "media": [
        {
          "id": null,
          "type": "image",
          "url": null,
          "image_url": "https://scontent-iad6-1.xx.fbcdn.net/v/t39.30808-6/853006520_16588767089…",
          "width": null,
          "height": null,
          "sd_url": null,
          "hd_url": null,
          "duration_s": null
        },
        {
          "id": null,
          "type": "image",
          "url": null,
          "image_url": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.30808-6/853766550_16588767356…",
          "width": null,
          "height": null,
          "sd_url": null,
          "hd_url": null,
          "duration_s": null
        },
        {
          "id": null,
          "type": "image",
          "url": null,
          "image_url": "https://scontent-iad6-1.xx.fbcdn.net/v/t39.30808-6/853155936_16588767389…",
          "width": null,
          "height": null,
          "sd_url": null,
          "hd_url": null,
          "duration_s": null
        }
      ],
      "link": null,
      "shared_post": null
    },
    {
      "post_id": "1658860588942644",
      "url": "https://www.facebook.com/reel/1557618349384047",
      "text": "The aircraft lineup just keeps getting bigger. ✈️\n\nMAX POWER, a new aero…",
      "created_at": 1792179464,
      "author": {
        "id": "100044561550831",
        "name": "NASA - National Aeronautics and Space Administration",
        "url": "https://www.facebook.com/NASA"
      },
      "reaction_count": 1400,
      "comment_count": 52,
      "share_count": 130,
      "media": [
        {
          "id": "1557618349384047",
          "type": "video",
          "url": "https://www.facebook.com/reel/1557618349384047",
          "image_url": "https://scontent-iad3-1.xx.fbcdn.net/v/t15.5256-10/851783682_20368389271…",
          "width": 1080,
          "height": 1920,
          "sd_url": "https://video-iad6-1.xx.fbcdn.net/o1/v/t2/f2/m412/AQMO-eO6K0-N4Kk4gumP3q…",
          "hd_url": "https://video-iad3-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQO8S2aztIKFiQ97H2FGKO…",
          "duration_s": null
        }
      ],
      "link": null,
      "shared_post": null
    }
  ],
  "cursor": "AQHTcGssb13Zu7XXB5f9ECe1ltvos1-qqcSwBUmWUZzhbNOPtTV4vAUWZUdiHiz9bNEWeFni…"
}

Response fields

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

Show all 38 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).
postsobject[]Posts, newest first.
posts[].post_idstringNumeric post id.
posts[].urlstringThe post's permalink (a /posts/, /reel/ or /videos/ URL). Pass it to the post endpoint (facebook_post) for exact counts and the reaction breakdown.
posts[].textstringcan be nullThe post's text with line breaks; null for a media-only post or a bare share.
posts[].created_atnumbercan be nullPublication time as Unix seconds; null when Facebook doesn't show it publicly.
posts[].authorobjectWho posted it: the Page or person whose timeline this is, or a co-author.
posts[].author.idstringcan be nullAuthor profile id.
posts[].author.namestringcan be nullAuthor display name.
posts[].author.urlstringcan be nullAuthor's Facebook URL.
posts[].reaction_countnumbercan be nullTotal reactions, as the timeline shows them. Exact below 1,000, rounded above (2.1K becomes 2100). The post endpoint has exact counts. Null when the timeline leaves it out.
posts[].comment_countnumbercan be nullComments, as the timeline shows them. Exact below 1,000, rounded above (2.1K becomes 2100). The post endpoint has exact counts. Null when the timeline leaves it out.
posts[].share_countnumbercan be nullShares, as the timeline shows them. Exact below 1,000, rounded above (2.1K becomes 2100). The post endpoint has exact counts. Null when the timeline leaves it out.
posts[].mediaobject[]Images and videos attached to the post. Their links expire.
posts[].media[].idstringcan be nullMedia id.
posts[].media[].typestringMedia format.
posts[].media[].urlstringcan be nullThe photo's or video's page on Facebook.
posts[].media[].image_urlstringcan be nullThe image, or the video's thumbnail. The link expires.
posts[].media[].widthnumbercan be nullMedia width in pixels; null when Facebook doesn't show it publicly.
posts[].media[].heightnumbercan be nullMedia height in pixels; null when Facebook doesn't show it publicly.
posts[].media[].sd_urlstringcan be nullStandard-definition video file URL; null for images. The link expires.
posts[].media[].hd_urlstringcan be nullHigh-definition video file URL; null for images. The link expires.
posts[].media[].duration_snumbercan be nullVideo duration in seconds; null for images; null when Facebook doesn't show it publicly.
posts[].linkobjectcan be nullThe preview card of a link the post shares; null when it shares none.
posts[].link.urlstringcan be nullThe shared page's URL as the post links it; it can be a short link.
posts[].link.titlestringcan be nullThe preview's title.
posts[].link.descriptionstringcan be nullThe preview's description.
posts[].link.image_urlstringcan be nullThe preview image, as Facebook stores it. The link expires.
posts[].shared_postobjectcan be nullThe post this one shares, as the timeline shows it; null when it isn't a share.
posts[].shared_post.urlstringcan be nullThe shared post's or photo's permalink.
posts[].shared_post.textstringcan be nullThe shared post's text; null when it has none.
posts[].shared_post.created_atnumbercan be nullWhen the shared post was published, as Unix seconds; null when Facebook doesn't show it publicly.
posts[].shared_post.authorobjectThe shared post's author.
posts[].shared_post.author.namestringcan be nullIts author's name.
posts[].shared_post.author.urlstringcan be nullIts author's Facebook URL.
cursorstringcan be nullPass as cursor for the next page; null on the last page.

Pagination

Results come in pages. For the next page, repeat the call with the same parameters and add the response's cursor as cursor. On the last page, cursor is null. Each page costs 1 credit.

The first five pages, in JavaScript
let cursor = null;for (let page = 1; page <= 5; page++) {const params = new URLSearchParams({ url: "https://www.facebook.com/NASA" });if (cursor) params.set("cursor", cursor);const res = await fetch(`https://api.lurkapi.com/v1/facebook/profile/posts?${params}`, {headers: { "x-api-key": process.env.LURKAPI_API_KEY },});const data = await res.json();if (!data.success) throw new Error(`${data.code}: ${data.error}`);console.log(data.posts);cursor = data.cursor;if (!cursor) break; // last page}

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 10 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.
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_profile_posts tool. For example:

Ask Claude
Use LurkAPI's facebook_profile_posts tool with url "https://www.facebook.com/NASA", then summarize what you find.

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

Tool arguments
{"url": "https://www.facebook.com/NASA"}

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