~ / endpoints / Comment API

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.

Get a free API keyAll Facebook endpoints
1,000
free requests / mo
2.6s
median response
JSON
structured output
US
residential exit
the friction

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.

start here

Hit the Facebook Comment Scraper API with one request

cURL
curl "https://api.facebookscraperapi.com/api/v1/facebook/comments?url=https://www.facebook.com/NASA/posts/pfbid0abc123&api_key=$API_KEY"
Python
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"])
options

Parameters

ParameterRequiredDefaultNotes
urloptional-A public post or permalink URL whose comments you want. Required unless you pass id.
idoptional-The post or story id, used to build the permalink. One of url or id is required.
limitoptional50Maximum comments to return, 1 to 200. Defaults to 50.
countryoptional-Optional two-letter country code to fetch the post as seen from that region.
api_keyrequired-Your API key, passed as a query parameter. Get one free at signup.
the output

The Facebook Comment Scraper API output schema

200 OK
{
  "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
    }
  ]
}
FieldTypeDescription
urlstringThe post URL the comments belong to.
results_countintegerNumber of comments returned in the comments array.
commentsarrayThe comments. Each item carries the fields below.
idstringThe comment id.
authorstringThe commenter's display name.
author_idstringThe commenter's numeric id when present.
textstringThe comment body text.
created_timeintegerThe comment creation time as unix seconds when present.
reactions_countintegerThe comment's reaction count when the feedback exposes it.
replies_countintegerThe number of replies to the comment when present.
real uses

Build with Facebook data

>

Comment sentiment research

When comments render, mine the text on a public post to gauge how an audience reacted, for voice-of-customer or campaign research.
>

Engagement analysis

Read reactions_count and replies_count per comment to find the responses that drew the most engagement on a post.
>

Audience question mining

Collect the questions people ask in comments to inform FAQs, content, and product decisions.
>

Moderation and monitoring

Track comments on your own public posts to catch issues, questions, and feedback as they appear.
>

Commenter identification

Capture author and author_id to understand who is engaging with a post across your dataset.
>

Session-based pipelines

Because comment feedback is login-gated logged-out, teams running this with an authenticated session use it to keep comment data current in their own systems.
why it holds up

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

Pass a full post URL or the post id, and we build the permalink and read its comment feedback server side.
*

Documented comment shape

Each comment returns id, author, author_id, text, created_time, reactions_count, and replies_count in a stable shape.
*

Configurable limit

The limit parameter accepts 1 to 200, so you control how many comments to pull per call when they render.
*

Residential routing built in

Requests run through US residential proxies, the best chance of a document that carries embedded comment feedback.
*

Honest wall handling

Comment edges are login-gated logged-out. When no comments are present, we return a classifiable diagnostic, never fabricated comments.
*

De-duplicated results

Comments are de-duplicated by id, so the array is clean even when the same node appears more than once in the feedback blob.
vs diy

How the Facebook Comment Scraper API compares

Our APIDIY (requests / headless)Facebook Graph API
Read comments on a post you do not ownWhen present, else honest diagnosticComments load via authed GraphQLComments on Pages you administer only
SetupAPI key onlyResidential proxies, headless browser, parsersMeta app plus a Page access token
Author and textReturned when comments renderYou parse it yourselfAvailable for your own Pages
Anti-bot and proxiesBuilt in, US residentialYou build and maintain itNot applicable
Reaction and reply countsFrom feedback when presentYou parse it yourselfAvailable for Pages you administer
OutputFlat, validated JSONWhatever you parseNested JSON you map yourself
plans & pricing

Pricing built for scale

PlanPriceBest for
Free1,000 requestsTesting and small jobs
Pro$0.60 / 1kProduction workloads
Pay-as-you-go$0.90 / 1kSpiky 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.

Ship with the Facebook Comment Scraper API
Test free with 1,000 requests. No credit card needed.
Get a free API key All Facebook endpoints