Facebook Posts API
Send a Page's username or URL and get its newest posts back as JSON, each with its text, images, reactions by type, comment and share counts, and the comments Facebook shows under it.
- 100 free credits
- No card needed
- No scraper to build or maintain
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"]What you get
- Up to 6 of the Page's newest posts, newest first
- The text of each post, its publish time, its kind (photo, album and so on) and a direct link
- Reactions in total and by type, and the comment and share counts
- Image addresses, with Facebook's own description of each image
- The one or two comments Facebook shows under each post, with their authors
- The Page: name, username, picture, verified badge and ids
{
"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
}
}One GET request
Everything the endpoint accepts. The full reference, with the complete example response, is in the docs.
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. |
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.
What people build with it
Watch what competitors post
Read the newest posts of the Pages in your market, with how each one was received.
Track engagement
Call the endpoint on a schedule and store reactions, comments and shares to see how each post performs.
Content feeds
Show a Page's latest posts in your own app, report or newsletter.
Posts for an AI model
Hand a model the latest posts of a Page as JSON, to summarize them or to sort them by topic.
Buy credits once. Use them whenever.
This endpoint costs 2 credits per request, and a request that returns no data costs nothing. Move the slider to see what your volume costs.
Each endpoint says what a request costs. Requests that return nothing are free.
- $2.42 per 1,000 credits
- About $12.08 a month at this pace
- Lasts about 2.4 months at this pace
- Credits never expire
Questions and answers
Is this the official Facebook API?
No. Pipefetch is an independent service and is not affiliated with Facebook or Meta. It returns the posts a Page shows to a visitor who is not logged in. You need one Pipefetch API key. There is no Facebook login, no cookie, no access token and no Meta app.
How many posts do I get?
Up to 6 of the newest per request. Older posts and date ranges are not available.
Do I get the comments?
You get the one or two comments Facebook shows under each post on the Page. For more, pass the url of a post to the comments endpoint.
Are videos included?
A video post comes back with its text and its counts, and mediaType says that it is a video. The address of the video file, view counts and link previews are not included.
What if a Page has no posts?
A Page that shows no posts to visitors who are not logged in answers 404 no_posts, and a Page that does not exist answers 404 page_not_found. Neither is charged.
Why does a request cost 2 credits?
Facebook only answers this request from residential internet connections, which cost us more than an ordinary request, so it costs 2 credits. Credit packs start at $9 for 3,000 credits, never expire, and a request that returns no data is not charged. New accounts get 100 free credits without a card.
Do the posts contain personal data?
Yes. The comments under a post carry the public names and pictures of the people who wrote them, and a Page can belong to a person. That is personal data. If you store or process it, data-protection law such as the GDPR applies to you as it would to any other source, and our terms forbid using the API to harass people or to build profiles of private individuals.
Step-by-step guides
How to get a Facebook Page's posts without app review
Your own Page needs no review and another Page needs Page Public Content Access: what Meta requires, with code, and the routes without a review.
Read the guideHow to get a Facebook Page's follower count and contact details in Python
Two routes with code: the Graph API, which needs App Review for Pages you do not manage, and an HTTP API that reads the public Page.
Read the guide
Free tools for the same data
More Facebook APIs
-
1 credit / 20
Facebook Comments API
The comments on a public Facebook post, video or Reel, with reactions by type, reply counts, authors and the post itself.
GET /v1/facebook/comments -
1 credit
Facebook Reels API
The newest Reels of a Facebook Page with plays, reactions, comments, shares and saves, captions and video file addresses.
GET /v1/facebook/reels -
1 credit
Facebook Reviews API
The newest reviews of a Facebook Page: text, recommends or not, date and reviewer, with the Page's recommend percentage.
GET /v1/facebook/reviews -
1 credit
Facebook Events API
The upcoming or past events a Facebook Page hosts, with dates, venue and address, organizers, ticket link and responses.
GET /v1/facebook/events -
2 credits
Facebook Page API
The public details of a Facebook Page: category, followers, email, phone, website, address, social links and pictures.
GET /v1/facebook/page -
2 credits
Facebook Group Posts API
The newest posts of a public Facebook group with author, text, images, links, reactions by type and top comments.
GET /v1/facebook/group -
1 credit
Facebook Marketplace API
Facebook Marketplace listings for a search near a place: title, price, city, listing time, photo, seller and delivery.
GET /v1/facebook/marketplace
Other sources
YouTubeInstagramWebsitesTikTokGoogleThreadsLinkedInApp storesSteamXPinterestAirbnbReal estateKeywordsJob boardsEventbriteShopify storesPublic tenders
Make your first request in a minute
Sign in, copy your key and call an endpoint. Your account starts with 100 free credits.