Docs · Profile posts
Profile posts
A Facebook Page's or public person's latest posts, newest first, 5 per page.
https://api.lurkapi.com /v1/facebook/profile/postsWhen 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.
curl "https://api.lurkapi.com/v1/facebook/profile/posts?url=https%3A%2F%2Fwww.facebook.com%2FNASA" \
-H "x-api-key: YOUR_API_KEY"Paste it into a terminal, with your key in place of YOUR_API_KEY.
const params = new URLSearchParams({
url: "https://www.facebook.com/NASA",
});
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);Node 18+. Save it as lurk.mjs and run node lurk.mjs. It reads your key from LURKAPI_API_KEY.
import os
import requests
res = requests.get(
"https://api.lurkapi.com/v1/facebook/profile/posts",
params={
"url": "https://www.facebook.com/NASA",
},
headers={"x-api-key": os.environ["LURKAPI_API_KEY"]},
timeout=60,
)
data = res.json()
if not data["success"]:
raise RuntimeError(f"{data['code']}: {data['error']}")
print(data["posts"])Run pip install requests, save it as lurk.py and run python lurk.py. It reads your key from LURKAPI_API_KEY.
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
"time"
)
func main() {
params := url.Values{}
params.Set("url", "https://www.facebook.com/NASA")
req, _ := http.NewRequest("GET", "https://api.lurkapi.com/v1/facebook/profile/posts?"+params.Encode(), nil)
req.Header.Set("x-api-key", os.Getenv("LURKAPI_API_KEY"))
client := &http.Client{Timeout: 60 * time.Second}
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
var data map[string]any
if err := json.NewDecoder(res.Body).Decode(&data); err != nil {
panic(err)
}
if data["success"] != true {
panic(fmt.Sprintf("%v: %v", data["code"], data["error"]))
}
out, _ := json.MarshalIndent(data["posts"], "", " ")
fmt.Println(string(out))
}Save it as main.go and run go run main.go. It reads your key from LURKAPI_API_KEY.
<?php
$params = http_build_query([
'url' => 'https://www.facebook.com/NASA',
]);
$context = stream_context_create(['http' => [
'header' => 'x-api-key: ' . getenv('LURKAPI_API_KEY'),
'timeout' => 60,
'ignore_errors' => true,
]]);
$body = file_get_contents('https://api.lurkapi.com/v1/facebook/profile/posts?' . $params, false, $context);
$data = json_decode($body, true);
if (!$data['success']) {
throw new Exception("{$data['code']}: {$data['error']}");
}
print_r($data['posts']);Save it as lurk.php and run php lurk.php. It reads your key from LURKAPI_API_KEY.
require 'json'
require 'net/http'
uri = URI('https://api.lurkapi.com/v1/facebook/profile/posts')
uri.query = URI.encode_www_form(
'url' => 'https://www.facebook.com/NASA',
)
req = Net::HTTP::Get.new(uri)
req['x-api-key'] = ENV.fetch('LURKAPI_API_KEY')
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https', read_timeout: 60) do |http|
http.request(req)
end
data = JSON.parse(res.body)
raise "#{data['code']}: #{data['error']}" unless data['success']
puts JSON.pretty_generate(data['posts'])Save it as lurk.rb and run ruby lurk.rb. It reads your key from LURKAPI_API_KEY.
Parameters
Add them to the URL after a ?. Join several with &.
| Parameter | Description |
|---|---|
urlstringoptional | 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.
|
pageIdstringoptional | A numeric Page or profile id, e.g. 100044561550831 (NASA), instead of url. Ignored when url is set. |
cursorstringoptional | 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)Hide
{
"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 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). |
| posts | object[] | Posts, newest first. |
| posts[].post_id | string | Numeric post id. |
| posts[].url | string | The 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[].text | stringcan be null | The post's text with line breaks; null for a media-only post or a bare share. |
| posts[].created_at | numbercan be null | Publication time as Unix seconds; null when Facebook doesn't show it publicly. |
| posts[].author | object | Who posted it: the Page or person whose timeline this is, or a co-author. |
| posts[].author.id | stringcan be null | Author profile id. |
| posts[].author.name | stringcan be null | Author display name. |
| posts[].author.url | stringcan be null | Author's Facebook URL. |
| posts[].reaction_count | numbercan be null | Total 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_count | numbercan be null | Comments, 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_count | numbercan be null | Shares, 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[].media | object[] | Images and videos attached to the post. Their links expire. |
| posts[].media[].id | stringcan be null | Media id. |
| posts[].media[].type | string | Media format. |
| posts[].media[].url | stringcan be null | The photo's or video's page on Facebook. |
| posts[].media[].image_url | stringcan be null | The image, or the video's thumbnail. The link expires. |
| posts[].media[].width | numbercan be null | Media width in pixels; null when Facebook doesn't show it publicly. |
| posts[].media[].height | numbercan be null | Media height in pixels; null when Facebook doesn't show it publicly. |
| posts[].media[].sd_url | stringcan be null | Standard-definition video file URL; null for images. The link expires. |
| posts[].media[].hd_url | stringcan be null | High-definition video file URL; null for images. The link expires. |
| posts[].media[].duration_s | numbercan be null | Video duration in seconds; null for images; null when Facebook doesn't show it publicly. |
| posts[].link | objectcan be null | The preview card of a link the post shares; null when it shares none. |
| posts[].link.url | stringcan be null | The shared page's URL as the post links it; it can be a short link. |
| posts[].link.title | stringcan be null | The preview's title. |
| posts[].link.description | stringcan be null | The preview's description. |
| posts[].link.image_url | stringcan be null | The preview image, as Facebook stores it. The link expires. |
| posts[].shared_post | objectcan be null | The post this one shares, as the timeline shows it; null when it isn't a share. |
| posts[].shared_post.url | stringcan be null | The shared post's or photo's permalink. |
| posts[].shared_post.text | stringcan be null | The shared post's text; null when it has none. |
| posts[].shared_post.created_at | numbercan be null | When the shared post was published, as Unix seconds; null when Facebook doesn't show it publicly. |
| posts[].shared_post.author | object | The shared post's author. |
| posts[].shared_post.author.name | stringcan be null | Its author's name. |
| posts[].shared_post.author.url | stringcan be null | Its author's Facebook URL. |
| cursor | stringcan be null | Pass 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.
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.
| Status | Code | Meaning |
|---|---|---|
| 401 | missing_api_key | No API key was sent. Put it in the x-api-key header. |
| 401 | invalid_api_key | This key doesn't exist or was revoked. |
| 402 | insufficient_credits | Not enough credits for this call. Buy a pack, or wait for tomorrow's free top-up. |
| 402 | over_max_credits | This call would cost more than the max_credits you set. The error says what it needs; raise max_credits to allow it. Not charged. |
| 403 | account_suspended | This account is suspended. Email support@lurkapi.com. Not charged. |
| 404 | not_found | What 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. |
| 405 | method_not_allowed | Endpoints only take GET, with parameters in the URL. |
| 429 | rate_limited | Too many calls in a short time. Wait as many seconds as the retry-after header says, then retry. |
| 500 | internal_error | Something broke on our side. Retry. Not charged. |
| 502 | upstream_error | The platform didn't send a usable answer. Retry. Not charged. |
| 503 | upstream_busy | All our connections to the platform are busy. Retry in a few seconds. Not charged. |
| 504 | upstream_timeout | The 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:
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:
{"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
· 5 min read
Reddit RSS feeds end November 13: how to keep yours working
Reddit turns off every RSS feed on November 13, 2026. Keep your feed URLs: a small Cloudflare Worker serves the same paths from LurkAPI. Change only the host.

· 4 min read
Best Facebook scrapers in 2026: prices and speed compared
LurkAPI is the best Facebook scraper: public Pages' posts at $0.19 per 1,000, about 1 s a call, with contacts, comments and events on the same key.

· 4 min read
TikTok Research API: who can get it, and what businesses use instead
Non-commercial researchers in the US, Europe, Canada and Brazil, after a review of about 4 weeks. Businesses can’t apply; they use a public-data API instead.