Page posts
The newest posts of a Facebook Page with text, images, reactions by type, comment and share counts, and top comments.
Try it in the dashboard 100 free credits when you sign up, no card.
GET/v1/facebook/posts
Costs 2 credits per request. Only requests that return data are charged.
Parameters
| Name | Type | Description |
|---|---|---|
pagerequired |
string | The Page's username (NASA), its numeric id, or its URL (https://www.facebook.com/NASA). |
limitoptional |
integer | How many of the newest posts to return. Default: 6. From 1 to 6. |
Example request
curl "https://pipefetch.com/v1/facebook/posts?page=NASA" \
-H "x-api-key: YOUR_API_KEY"const res = await fetch('https://pipefetch.com/v1/facebook/posts?page=NASA', {
headers: { 'x-api-key': process.env.PIPEFETCH_API_KEY },
});
const { data, credits } = await res.json();import os, requests
res = requests.get(
"https://pipefetch.com/v1/facebook/posts",
params={"page": "NASA"},
headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
)
data = res.json()["data"]Example response
A real answer to the request above. Long texts and lists are shortened here, and the people who wrote comments, reviews or posts are replaced by a stand-in.
{
"data": {
"page": {
"id": "100044561550831",
"pageId": "54971236771",
"name": "NASA - National Aeronautics and Space Administration",
"username": "NASA",
"url": "https://www.facebook.com/NASA",
"pictureUrl": "https://scontent.fdiy5-1.fna.fbcdn.net/v/t39.30808-1/243095782_416661036495945_3843362260429099279_n.png?stp=cp0_dst-png&cstp=mx800x800&ctp=s80x80&_nc…",
"isVerified": true
},
"posts": [
{
"id": "1690599575768745",
"url": "https://www.facebook.com/NASA/posts/pfbid02qMqopthTdbHgkFCRbWZtHXiGBNnfziY3Z7fWypDp97m6rBvsicuB9GCbPicwsuXyl",
"text": "Beauty in chaos 🎨\n\nThis photo from our Chandra X-ray Observatory is the clearest view we have of the remains of an exploded star located in the cente…",
"publishedAt": "2026-11-17T22:03:34.000Z",
"mediaType": "photo",
"reactionCount": 2192,
"reactions": {
"like": 1544,
"love": 569,
"care": 41,
"haha": 5,
"wow": 30,
"sad": 1,
"angry": 2
},
"commentCount": 76,
"shareCount": 216,
"imageUrls": [
"https://scontent.fdiy5-2.fna.fbcdn.net/v/t39.30808-6/916765074_1690599559102080_8008653452099091270_n.jpg?stp=dst-jpg_tt6&cstp=mx2048x2048&ctp=s1080x2…"
],
"imageDescriptions": [
"A supernova remnant looks like colorful paints swirling together set against the darkness of space. At the heart of the image is a light purple cloud …"
],
"photoCount": null,
"mentions": [
"Chandra X-ray Observator"
],
"links": [],
"topComments": [
{
"id": "0000000000",
"url": "https://example.com/item",
"text": "Gorgeous, and also the cosmic version of opening the junk drawer: everything is in there, nothing is where you left it, and somehow it all works.",
"createdAt": "2026-11-18T00:24:09.000Z",
"reactionCount": 0,
"replyCount": 0,
"author": {
"id": "0000000000",
"name": "Example Person",
"pictureUrl": "https://example.com/avatar.jpg"
}
}
]
},
{
"id": "1689621505866552",
"url": "https://www.facebook.com/NASA/posts/pfbid02YYhrmGfpDcZvaKTvKEiUgsLzsL1D5fYeXR7on6JofKnUkLCwPbMR4KenTohd22S3l",
"text": "You could walk on the Moon someday.\n\nWe are accepting applications for our next class of astronauts until Dec. 3. Hear about the application process a…",
"publishedAt": "2026-11-16T21:18:01.000Z",
"mediaType": "photo",
"reactionCount": 814,
"reactions": {
"like": 630,
"love": 157,
"care": 15,
"haha": 5,
"wow": 5,
"sad": 0,
"angry": 2
},
"commentCount": 71,
"shareCount": 83,
"imageUrls": [
"https://scontent.fdiy5-1.fna.fbcdn.net/v/t39.99422-6/910466255_1835901000787898_7791381628991831660_n.png?stp=dst-jpg_tt6&cstp=mx1920x1080&ctp=s1920x1…"
],
"imageDescriptions": [
"An artist's concept of astronauts performing Moon Base operations on the lunar surface. Text on the image reads, \"Houston We Have a Podcast\" and \"This…"
],
"photoCount": null,
"mentions": [],
"links": [
"https://go.nasa.gov/4C7G3xx"
],
"topComments": []
}
]
},
"credits": {
"used": 2,
"remaining": 98
}
}Good to know
- The newest posts of the Page, newest first, at most 6 per request. There is no paging to older ones.
- A request costs 2 credits, because Facebook only answers it from residential internet connections, which cost us more than an ordinary request.
- topComments holds the one or two comments Facebook shows under a post on the Page, not the full list. The comments endpoint returns more.
- mediaType says what a post is, such as photo, album, video or link. Image addresses are included and stop working after a while; video file addresses, view counts and link previews are not included.
- A Page that does not exist answers 404 page_not_found, and one that shows no posts to visitors who are not logged in answers 404 no_posts. Neither costs anything.
Errors
Every error has the same shape, and none of them is charged. The full list is in the error reference.
Looking for an overview and use cases? See the Facebook Posts API page.