Facebook Comments API
Send the link of a public Facebook post, video or Reel and get its comments back as JSON, with reactions by type, reply counts, the authors and the post they belong to.
- 100 free credits
- No card needed
- No scraper to build or maintain
curl "https://pipefetch.com/v1/facebook/comments?post=https%3A%2F%2Fwww.facebook.com%2Fhumansofnewyork%2Fposts%2Fpfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl&limit=20" \
-H "x-api-key: YOUR_API_KEY"const res = await fetch('https://pipefetch.com/v1/facebook/comments?post=https%3A%2F%2Fwww.facebook.com%2Fhumansofnewyork%2Fposts%2Fpfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl&limit=20', {
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/comments",
params={"post": "https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl", "limit": 20},
headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
)
data = res.json()["data"]What you get
- Up to 50 top-level comments per request: most relevant, newest or all
- The text, time and language of each comment, and a direct link to it
- Reactions in total and by type: like, love, care, haha, wow, sad and angry
- The number of replies under each comment
- The author's public name, id and picture, a profile link when Facebook gives one, and whether it is a person or a Page
- The post itself: text, author, publish time, and its reaction, comment and share counts
{
"data": {
"post": {
"id": "6375219342552112",
"url": "https://www.facebook.com/humansofnewyork/posts/pfbid02EsmX9EUwUMq8JyMRGwZ82QtTxTdcPZvtitQTETLhb977v8i7L8jXinVgZ1r6BNFrl",
"text": "(2/3) “I knew nothing about gardening. But I knew how to google, so I looked up some easy stuff to plant. Turns out it’s hard to mess up herbs. So I w…",
"publishedAt": "2021-08-15T19:50:37.000Z",
"reactionCount": 181777,
"commentCount": 2806,
"shareCount": 9182,
"author": {
"id": "100050429952420",
"name": "Humans of New York"
}
},
"comments": [
{
"id": "0000000000",
"url": "https://example.com/item",
"text": "This is one of my favorite stories to date. Good nutrition is at the heart of so many solutions. 💚",
"createdAt": "2021-08-15T20:01:24.000Z",
"language": "en",
"reactionCount": 440,
"reactions": {
"like": 366,
"love": 71,
"care": 3,
"haha": 0,
"wow": 0,
"sad": 0,
"angry": 0
},
"replyCount": 8,
"author": {
"id": "0000000000",
"name": "Example Person",
"url": null,
"pictureUrl": "https://example.com/avatar.jpg",
"type": "User",
"isVerified": false
}
},
{
"id": "0000000000",
"url": "https://example.com/item",
"text": "Funny how sometimes we just seem to stumble into something and find it’s exactly what we should be doing. Keep planting the seeds.",
"createdAt": "2021-08-16T02:08:00.000Z",
"language": "en",
"reactionCount": 3,
"reactions": {
"like": 2,
"love": 1,
"care": 0,
"haha": 0,
"wow": 0,
"sad": 0,
"angry": 0
},
"replyCount": 1,
"author": {
"id": "0000000000",
"name": "Example Person",
"url": null,
"pictureUrl": "https://example.com/avatar.jpg",
"type": "User",
"isVerified": false
}
}
]
},
"credits": {
"used": 1,
"remaining": 99
}
}One GET request
Everything the endpoint accepts. The full reference, with the complete example response, is in the docs.
GET/v1/facebook/comments
Costs 1 credit per 20 items requested. Only requests that return data are charged.
Parameters
| Name | Type | Description |
|---|---|---|
postrequired |
string | The URL of a public Facebook post, video or Reel. It has to be the post's own address, not a share link (facebook.com/share/... or fb.watch). Page and group posts, permalink.php, watch, Reel and photo links all work. |
limitoptional |
integer | How many comments to return. Every started 20 comments cost 1 credit. Default: 20. From 1 to 50. |
sortoptional |
string | The orders of Facebook's own comment menu: relevant (most relevant first, likely spam filtered out), newest (latest first) or all (every comment). One of: relevant, newest, all. Default: relevant. |
Good to know
- Top-level comments only; replyCount tells you how many replies each one has.
- Reaction counts are exact, in total and by type: like, love, care, haha, wow, sad and angry.
- post.commentCount is Facebook's own count, replies included. It can be higher than the number of comments Facebook shows to a visitor who is not logged in.
- Only public posts can be read. A post that does not exist, or that is private or limited to a closed group, answers 404 post_not_found and costs nothing.
- A post on which Facebook shows no comments answers 404 no_comments and costs nothing.
What people build with it
Sentiment analysis
Measure how people react to a post, a launch or an announcement, from their words and from the reaction types.
Campaign reporting
Collect the comments under your own or a competitor's posts and compare how each one was received.
Community monitoring
Read the newest comments on the posts you care about and catch questions and complaints early.
Audience research
Find the questions and objections people raise under posts in your market.
Buy credits once. Use them whenever.
This endpoint costs 1 credit per 20 items requested, 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 comments a public post shows to a visitor who is not logged in.
Do I need a Facebook account, a token or an app review?
No. You need one Pipefetch API key. There is no Facebook login, no cookie, no access token and no Meta app.
Which links can I pass?
The post's own address: the link of a post on a Page, on a public profile or in a public group, a permalink.php or story.php link, a video, watch or Reel link, or a photo link. Share links (facebook.com/share/... and fb.watch) are not accepted: open the link and copy the address of the post it leads to. A link to a Page itself is not a post either. Both are refused before anything is charged.
Are replies included?
No. You get top-level comments, and replyCount tells you how many replies each one has.
What if a post is private or has no comments?
A post that does not exist, is private or sits in a closed group answers 404 post_not_found. A post on which Facebook shows no comments answers 404 no_comments. Neither is charged.
What does a request cost?
Every started 20 comments cost 1 credit, so 20 comments are 1 credit and 50 comments are 3. Credit packs start at $9 for 3,000 credits and never expire. A request that returns no data is not charged, and new accounts get 100 free credits without a card.
Do comments contain personal data?
Yes. They carry the public names, profile links and pictures of their authors, which is personal data whenever the author is a person and not a Page. 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 guideFacebook Groups API alternatives after its removal in 2024
Meta removed the Groups API in April 2024: what went, what is left for reading a public group's posts, and what no route can do.
Read the guide
More Facebook APIs
-
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 Posts API
The newest posts of a Facebook Page with text, images, reactions by type, comment and share counts, and top comments.
GET /v1/facebook/posts -
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.