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.
Getting Facebook Comment data is harder than it looks
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.
Hit the Facebook Comment Scraper API with one request
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"]) Parameters
| Parameter | Required | Default | Notes |
|---|---|---|---|
url | optional | - | A public post or permalink URL whose comments you want. Required unless you pass id. |
id | optional | - | The post or story id, used to build the permalink. One of url or id is required. |
limit | optional | 50 | Maximum comments to return, 1 to 200. Defaults to 50. |
country | optional | - | Optional two-letter country code to fetch the post as seen from that region. |
api_key | required | - | Your API key, passed as a query parameter. Get one free at signup. |
The Facebook Comment Scraper API output schema
{
"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. |
reactions_count | integer | The comment's reaction count when the feedback exposes it. |
replies_count | integer | The number of replies to the comment when present. |
Build with Facebook data
Comment sentiment research
Engagement analysis
Audience question mining
Moderation and monitoring
Commenter identification
Session-based pipelines
Why teams ship on our Facebook Comment Scraper API
We force the request onto a US residential exit and read comment nodes straight from the post document's embedded feedback JSON when they are present. Comment edges load over authenticated GraphQL, so when the logged-out HTML carries no comments the endpoint reports a clear diagnostic instead of an empty guess, and you can page up to 200 comments per call when they render.
URL or id input
Documented comment shape
Configurable limit
Residential routing built in
Honest wall handling
De-duplicated results
How the Facebook Comment Scraper API 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 built for scale
| 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
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.
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.
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.
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.
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.
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.