Get Post
curl --request GET \
--url https://scrapebadger.com/v1/facebook/posts/{post_id} \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/facebook/posts/{post_id}"
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/posts/{post_id}', 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/posts/{post_id}",
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/posts/{post_id}"
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/posts/{post_id}")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/facebook/posts/{post_id}")
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{
"id": "<string>",
"post_id": "<string>",
"url": "<string>",
"permalink_url": "<string>",
"message": "<string>",
"story_type": "<string>",
"creation_time_utc": 123,
"created_at": "<string>",
"author": {},
"attachments": [
{}
],
"reaction_count": 123,
"reaction_count_text": "<string>",
"top_reactions": [
{}
],
"comment_count": 123,
"share_count": 123
}Endpoints
Get Post
A single Facebook post by numeric id, pfbid, permalink.php form or reel URL — with attachments, reaction breakdown, share and comment counts.
GET
/
v1
/
facebook
/
posts
/
{post_id}
Get Post
curl --request GET \
--url https://scrapebadger.com/v1/facebook/posts/{post_id} \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://scrapebadger.com/v1/facebook/posts/{post_id}"
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/posts/{post_id}', 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/posts/{post_id}",
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/posts/{post_id}"
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/posts/{post_id}")
.header("X-API-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://scrapebadger.com/v1/facebook/posts/{post_id}")
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{
"id": "<string>",
"post_id": "<string>",
"url": "<string>",
"permalink_url": "<string>",
"message": "<string>",
"story_type": "<string>",
"creation_time_utc": 123,
"created_at": "<string>",
"author": {},
"attachments": [
{}
],
"reaction_count": 123,
"reaction_count_text": "<string>",
"top_reactions": [
{}
],
"comment_count": 123,
"share_count": 123
}Fetch one post. Facebook post ids come in several shapes — bare numeric ids,
pfbid strings, permalink.php query forms and reel/ URLs. When you have a
full URL, pass it as url; it overrides the path id.
Credits: 5
Authorization
string
required
Your ScrapeBadger API key.
Path Parameters
string
required
Post id — numeric or
pfbid. Ignored when url is supplied, but still
required as a path segment (pass any placeholder, e.g. 0).Query Parameters
string
Full post permalink or reel URL. Overrides
post_id. Use this for
permalink.php?story_fbid=…&id=… and {page}/posts/{pfbid} forms that a
bare id cannot resolve.Response
Returns a singlePost object.
string
Story id.
string
Post id.
string
Canonical post URL.
string
Permalink URL.
string
Post text.
string
Facebook’s story classification, e.g. a shared-link or life-event story.
number
Post time, Unix seconds.
string
Post time, ISO 8601 UTC.
Actor
id, name, url, profile_picture, is_verified, typename.Media[]
type (Photo · Video), id, uri, width, height, url, playable_url.integer
Total reactions.
string
Facebook’s abbreviated display string, e.g.
48K.object[]
{ name, count } — like, love, haha, wow, sad, angry, care.integer
Number of comments.
integer
Number of shares.
Example
curl "https://scrapebadger.com/v1/facebook/posts/0?url=https://www.facebook.com/NASA/posts/pfbid02Kx9YqLmN4vT7wJ3hR8sQ2fZ1nB6cD5" \
-H "X-API-Key: YOUR_API_KEY"
const res = await fetch(
"https://scrapebadger.com/v1/facebook/posts/1094832771620487",
{ headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY } },
);
const post = await res.json();
import requests
res = requests.get(
"https://scrapebadger.com/v1/facebook/posts/1094832771620487",
headers={"X-API-Key": "YOUR_API_KEY"},
)
post = res.json()
Response
{
"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
}
A deleted or region-restricted post returns
404. Comments are a separate,
heavier call —
/posts/{post_id}/comments.
