Facebook Page Posts API and Page Scraper
List public posts from any Facebook page or profile timeline as JSON, with text, timestamps, attached photos and videos, reaction/comment/share counts, and cursor pagination.
Request
GET /v1/facebook/profiles/posts ·
2 credits per successful call
curl "https://api.igramapi.com/v1/facebook/profiles/posts?url=https%3A%2F%2Fwww.facebook.com%2Fexamplestudio" \
-H "Authorization: Bearer YOUR_API_KEY" import requests
response = requests.get(
"https://api.igramapi.com/v1/facebook/profiles/posts?url=https%3A%2F%2Fwww.facebook.com%2Fexamplestudio",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
response.raise_for_status()
print(response.json()) const response = await fetch("https://api.igramapi.com/v1/facebook/profiles/posts?url=https%3A%2F%2Fwww.facebook.com%2Fexamplestudio", {
method: "GET",
headers: {
Authorization: "Bearer YOUR_API_KEY",
},
});
if (!response.ok) throw new Error((await response.json()).error.message);
console.log(await response.json()); <?php
$ch = curl_init("https://api.igramapi.com/v1/facebook/profiles/posts?url=https%3A%2F%2Fwww.facebook.com%2Fexamplestudio");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_API_KEY",
],
]);
$data = json_decode(curl_exec($ch), true);
print_r($data); Response
{
"profile": {
"id": "100012345678901",
"name": "Example Studio",
"url": "https://www.facebook.com/examplestudio",
"avatar_url": "https://scontent.xx.fbcdn.net/v/example/avatar.jpg",
"is_verified": true
},
"count": 1,
"items": [
{
"id": "3456789012345678",
"url": "https://www.facebook.com/examplestudio/posts/pfbid02ExampleToken",
"message": "Doors open on Saturday. Come and say hello!",
"created_at": 1761700000,
"author": {
"id": "100012345678901",
"name": "Example Studio",
"url": "https://www.facebook.com/examplestudio",
"avatar_url": "https://scontent.xx.fbcdn.net/v/example/avatar.jpg",
"is_verified": true
},
"media": [
{
"id": "4567890123456789",
"type": "photo",
"url": "https://scontent.xx.fbcdn.net/v/example/photo.jpg",
"width": 960,
"height": 540,
"alt_text": "The studio entrance with a welcome banner"
}
],
"link_preview": null,
"stats": {
"likes": 372,
"comments": 40,
"shares": 46,
"views_str": null
},
"cached": false
}
],
"page": {
"has_next_page": true,
"end_cursor": "eyJrIjoiZmJfcG9zdHMifQ"
},
"cached": false
} All values above are made-up examples. Media links are temporary Facebook CDN addresses.
Parameters
| Name | In | Description |
|---|---|---|
urlrequired | query | A profile or page URL, username, or numeric id. |
limit | query | Optional cap on posts returned from this page (1 to 20). Omit for Facebook's default batch. |
cursor | query | page.end_cursor from the previous response. |
Response fields
| Field | Type | Description |
|---|---|---|
profile | object | Owner id, name, url, avatar_url and is_verified. |
count / items[] | integer / object[] | Returned post count and list of post objects. |
page | object | has_next_page (boolean) and end_cursor (string | null). |
cached | boolean | True when served from cache. |
Cursor pagination
Pass page.end_cursor back as cursor to page deeper into a page's timeline.
Full post payloads
Every item has the same structure as /v1/facebook/posts: message, media attachments, link preview and stats.
Single-request speed
Returns Facebook's natural timeline batch in one call, or cap it with optional limit (1-20).
Every plan
Costs 2 credits per page on every plan.
Paging through a timeline
Each response includes items[] and page: { has_next_page, end_cursor }. When has_next_page is true, send the same url with cursor set to page.end_cursor to fetch the next batch of posts.
Frequently asked questions
Is this a Facebook page scraper?
It returns what a Facebook page scraper collects (the posts on a public page or profile timeline with text, media, link previews and engagement counts) as JSON, page by page, so you do not run or maintain a scraper yourself.
Which plans include Profile Posts?
Every plan, including Free. Each page costs 2 credits.
How many posts are returned per call?
By default, each request returns whatever posts Facebook includes in that timeline page (typically a few posts), with page.end_cursor to load more. You can optionally cap with limit (1 to 20).
Our errors cost nothing. Failures on our side (status 500 or above) and invalid requests (400, 422) are refunded, and every error has the same shape. See error handling and credits and rate limits.
Try the Facebook Profile Posts API free
Create a key and make your first request in minutes. 100 free credits every month.