Facebook Comment Scraper API
Our Facebook comment scraper targets a public post permalink and returns its comments as structured JSON: each comment's author, text, created time, reaction count, and reply count. It reads the embedded comment feedback in the post document. Facebook loads comment edges over authenticated GraphQL, so the endpoint is honest about when comments are present in the page.
Quickstart
curl "https://api.facebookscraperapi.com/api/v1/facebook/comments?url=https://www.facebook.com/NASA/posts/pfbid0abc123&api_key=$API_KEY" import requests
BASE = "https://api.facebookscraperapi.com"
API_KEY = "YOUR_API_KEY"
# Pass a public post/permalink URL. Response follows the documented comment shape.
data = requests.get(
f"{BASE}/api/v1/facebook/comments",
params={
"url": "https://www.facebook.com/NASA/posts/pfbid0abc123",
"limit": 50,
"api_key": API_KEY,
},
timeout=30,
).json()
print(data["results_count"], "comments")
for c in data["comments"]:
print(c["author"], "-", c["text"])
print(" reactions:", c["reactions_count"], "replies:", c["replies_count"]) Response
{
"url": "https://www.facebook.com/NASA/posts/pfbid0abc123",
"results_count": 2,
"total_results": 2,
"source": "facebook",
"comments": [
{
"id": "1000000000000001",
"author": "Jamie Rivera",
"author_id": "100000000000123",
"text": "This is stunning. Thank you for sharing the view from up there.",
"created_time": 1755450000,
"reactions_count": 128,
"replies_count": 4
},
{
"id": "1000000000000002",
"author": "Priya S.",
"author_id": "100000000000456",
"text": "What camera was used to capture this?",
"created_time": 1755453600,
"reactions_count": 22,
"replies_count": 1
}
]
} | Field | Type | Description |
|---|---|---|
url | string | The post URL the comments belong to. |
results_count | integer | Number of comments returned in the comments array. |
comments | array | The comments. Each item carries the fields below. |
id | string | The comment id. |
author | string | The commenter's display name. |
author_id | string | The commenter's numeric id when present. |
text | string | The comment body text. |
created_time | integer | The comment creation time as unix seconds when present. |
Why it is hard
A logged-out Facebook post permalink server-renders only its caption and media; the comment feedback edges load afterward over authenticated GraphQL, so comments are not present in the logged-out HTML. The official Graph API can read comments only on Pages you administer, which puts public post comments elsewhere out of reach.
Use it for
Comment sentiment research
Engagement analysis
Audience question mining
Moderation and monitoring
How it compares
| Our API | DIY (requests / headless) | Facebook Graph API | |
|---|---|---|---|
| Read comments on a post you do not own | When present, else honest diagnostic | Comments load via authed GraphQL | Comments on Pages you administer only |
| Setup | API key only | Residential proxies, headless browser, parsers | Meta app plus a Page access token |
| Author and text | Returned when comments render | You parse it yourself | Available for your own Pages |
| Anti-bot and proxies | Built in, US residential | You build and maintain it | Not applicable |
| Reaction and reply counts | From feedback when present | You parse it yourself | Available for Pages you administer |
| Output | Flat, validated JSON | Whatever you parse | Nested JSON you map yourself |
Pricing
| Plan | Price | Best for |
|---|---|---|
| Free | 1,000 requests | Testing and small jobs |
| Pro | $0.60 / 1k | Production workloads |
| Pay-as-you-go | $0.90 / 1k | Spiky or one-off volume |
Median response 2.6s. You only pay for successful requests.
FAQ
What is a Facebook comment scraper?
A Facebook comment scraper reads the comments on a public post and returns them in a structured format. Our Facebook comment scraper API takes a post permalink (or a post id) and, when comments are present in the page, returns each comment's id, author, author id, text, created time, reaction count, and reply count as JSON. It reads the embedded comment feedback in the post document.
Can I scrape Facebook comments without logging in?
Often not, and the endpoint is honest about it. A logged-out post permalink server-renders only its caption and media; the comment feedback edges load afterward over authenticated GraphQL and are usually not present in the logged-out HTML. When there are no comments in the page, the endpoint returns a clear diagnostic rather than an empty or fabricated list. For consistent comment data, run the endpoint with an authenticated session.
What does each comment include?
Each comment returns its id, the author's display name, the author's numeric id when present, the comment text, the created time as unix seconds, the reaction count, and the reply count. Comments are de-duplicated by id. Fields the feedback does not expose come back null rather than guessed.
How many comments can I get per request?
The limit parameter accepts 1 to 200 and defaults to 50. That controls how many comment nodes the endpoint returns from the embedded feedback when comments render. Because comment edges are login-gated logged-out, the count you get back depends on how many are present in the page for the capture.
Do I need a Facebook API key or app?
No. You authenticate with a single facebookscraperapi key. The official Graph API only reads comments on Pages you administer, so it cannot return comments on a public post elsewhere. Our endpoint reads the embedded comment feedback when it is present, with no app review. The free tier includes 1,000 requests.
How should I use this endpoint given the login gate?
Treat it as a comment endpoint that returns the documented shape when the post document carries comment feedback and reports a classifiable diagnostic when it does not. Teams that need consistent comment data run it with an authenticated session, and use the honest failure signal to detect and retry blocked captures instead of accepting empty results.