Get Page or Profile Posts
curl --request GET \
--url https://scrapebadger.com/v1/facebook/pages/{identifier}/posts \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/facebook/pages/{identifier}/posts"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/facebook/pages/{identifier}/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/facebook/pages/{identifier}/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/facebook/pages/{identifier}/posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/facebook/pages/{identifier}/posts")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/facebook/pages/{identifier}/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"posts": [
{}
],
"count": 123,
"end_cursor": "<string>",
"has_next_page": true
}Endpoints
Get Page or Profile Posts
A Facebook Page or profile timeline — posts with attachments, reaction breakdown, comment and share counts, cursor-paginated.
GET
/
v1
/
facebook
/
pages
/
{identifier}
/
posts
Get Page or Profile Posts
curl --request GET \
--url https://scrapebadger.com/v1/facebook/pages/{identifier}/posts \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/facebook/pages/{identifier}/posts"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://scrapebadger.com/v1/facebook/pages/{identifier}/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrapebadger.com/v1/facebook/pages/{identifier}/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://scrapebadger.com/v1/facebook/pages/{identifier}/posts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://scrapebadger.com/v1/facebook/pages/{identifier}/posts")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/facebook/pages/{identifier}/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"posts": [
{}
],
"count": 123,
"end_cursor": "<string>",
"has_next_page": true
}Fetch the timeline of a Page or profile. Both endpoints return the same post
feed envelope and paginate with the same Relay cursor.
Facebook decides the page size and currently serves about 3 posts per page
to a logged-out client, regardless of how many are asked for. To collect a date
range, follow
Credits: 5 (each)
end_cursor while has_next_page is true and stop when
created_at passes your cut-off — the feed is returned newest-first.
| Endpoint | Use for |
|---|---|
GET /v1/facebook/pages/{identifier}/posts | Page timelines |
GET /v1/facebook/profiles/{identifier}/posts | profile timelines |
Authorization
string
required
Your ScrapeBadger API key.
Path Parameters
string
required
Vanity slug (e.g.
nasa) or the numeric entity id.Query Parameters
string
Pagination cursor — the
end_cursor from a previous response.Response
Post[]
Each
Post includes id, post_id, url, permalink_url, message,
story_type, creation_time_utc, created_at, author (Actor —
id, name, url, profile_picture, is_verified, typename),
attachments[] (Media — type (Photo · Video), id, uri, width,
height, url, playable_url), reaction_count, reaction_count_text,
top_reactions[] ({ name, count }), comment_count and share_count.integer
Number of posts in this page.
string
Pass as
after for the next page.boolean
Whether more posts are reachable.
Example
curl "https://scrapebadger.com/v1/facebook/pages/nasa/posts" \
-H "X-API-Key: YOUR_API_KEY"
const res = await fetch(
"https://scrapebadger.com/v1/facebook/pages/nasa/posts",
{ headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY } },
);
const data = await res.json();
import requests
res = requests.get(
"https://scrapebadger.com/v1/facebook/pages/nasa/posts",
headers={"X-API-Key": "YOUR_API_KEY"},
)
data = res.json()
Response
{
"posts": [
{
"id": "pfbid02Kx9YqLmN4vT7wJ3hR8sQ2fZ1nB6cD5",
"post_id": "1094832771620487",
"url": "https://www.facebook.com/NASA/posts/pfbid02Kx9YqLmN4vT7wJ3hR8sQ2fZ1nB6cD5",
"permalink_url": "https://www.facebook.com/NASA/posts/pfbid02Kx9YqLmN4vT7wJ3hR8sQ2fZ1nB6cD5",
"message": "Webb just resolved the disk around a star 1,300 light-years away. Those rings? Planets, forming right now.",
"creation_time_utc": 1785398400.0,
"created_at": "2026-07-28T14:40:00Z",
"author": {
"id": "54971236771",
"name": "NASA",
"url": "https://www.facebook.com/NASA",
"profile_picture": "https://scontent.xx.fbcdn.net/v/t39.30808-1/32118_n.jpg",
"is_verified": true,
"typename": "Page"
},
"attachments": [
{
"type": "Photo",
"id": "1094832768287154",
"uri": "https://scontent.xx.fbcdn.net/v/t39.30808-6/558921_n.jpg",
"width": 2048,
"height": 2048,
"url": "https://www.facebook.com/photo/?fbid=1094832768287154",
"playable_url": null
}
],
"reaction_count": 48213,
"reaction_count_text": "48K",
"top_reactions": [
{ "name": "like", "count": 31204 },
{ "name": "love", "count": 14882 },
{ "name": "wow", "count": 2127 }
],
"comment_count": 1844,
"share_count": 6721,
"story_type": null
}
],
"count": 1,
"end_cursor": "AQHUaW1lbGluZV9jdXJzb3JfMDAx",
"has_next_page": true
}
Personal profiles that Facebook shows only to signed-in visitors return
503 with a message saying so, not an empty
posts[]. An empty posts[]
with has_next_page: false means the end of the feed.
