Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The reliable way to collect Facebook comments is to use Meta’s Graph API with access that covers the parent post and the Page or user relationship behind it. A comment being visible in a browser does not automatically make it available to your app. For a Page post, the usual starting point is the /{object-id}/comments edge, but permissions, Page feature approval, token type and the current Graph API version determine what you can actually read.

This guide shows an authorized implementation, pagination and filtering patterns, handling for incomplete results, privacy and policy boundaries, and how to decide between Meta’s API and a hosted collection service.

What “scraping Facebook comments” can and cannot mean

Meta defines scraping as automated collection from a website or interface. It distinguishes authorized activity from automation that violates its terms and says it takes enforcement action against unauthorized scraping. Meta’s wording is direct: “Using automation to get data from Facebook without our permission is a violation of our terms.” (Meta Newsroom, 2021: How We Combat Scraping.)

Use the official API and data you are permitted to access. Do not build a browser bot to evade login walls, rate limits, CAPTCHAs or Page controls. Public visibility is not a blanket authorization to collect, store or republish comments. Minimize fields, respect deletion and privacy changes, and check the rules that apply to your jurisdiction and purpose.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall

Choose the correct access case first

Your own Page and its posts

If you administer the Page, use the Page access flow and a token with the permissions and Page task required for the operation. Meta’s Page documentation notes that users requesting Page access through permissions must be able to perform the Page’s MODERATE task for operations that require it. A Page access token is required for fields that may include user information in the relevant cases.

Another Page’s public post

For public Page content, Meta says an app needs the relevant Page Public Content Access or Page Public Metadata Access feature approval. Approval, token requirements and returned fields can change, so check the current Page reference before shipping: Meta Graph API Page reference.

A user’s post or non-Page object

Do not assume the Page route applies. Access to the parent object controls access to its comments. Meta’s comments reference warns that other users’ profile information and comments on user posts, photos, albums, videos, likes and reactions are not returned unless those users authorized access. Confirm that the object is addressable by your app and that the person or organization relationship permits the requested fields.

The official comments endpoint

Meta’s Graph API comments reference documents a common edge in the form GET /v26.0/{object-id}/comments. The parent object can be a Page post when your app is authorized for that Page. The permissions needed to view the parent object also apply to its comments. Read the current reference before using version 26.0 in production: Graph API Comment reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A minimal request looks like this (replace the placeholders with values issued for your app):

curl -G "https://graph.facebook.com/v26.0/POST_OR_OBJECT_ID/comments" 
  -d "access_token=PAGE_OR_USER_TOKEN" 
  -d "fields=id,message,created_time,comment_count,reaction_count,parent" 
  -d "limit=100"

Request only fields your approved use case needs. Depending on the object and permissions, you may receive comment text, creation time, reaction and reply counts, and parent-comment relationships. Author identity and profile data are not guaranteed.

Paginate until the API stops

Responses normally contain a data array and a paging object. Follow the returned next URL rather than constructing page numbers yourself. A large thread can have many pages, and Meta warns that objects with tens of thousands of comments may encounter paging limits.

import requests

url = "https://graph.facebook.com/v26.0/POST_OR_OBJECT_ID/comments"
params = {
    "access_token": "PAGE_OR_USER_TOKEN",
    "fields": "id,message,created_time,comment_count,reaction_count,parent",
    "limit": 100,
}

while url:
    response = requests.get(url, params=params, timeout=30)
    response.raise_for_status()
    payload = response.json()

    for comment in payload.get("data", []):
        print(comment)

    url = payload.get("paging", {}).get("next")
    params = None  # the next URL already contains its cursor and parameters

Persist the last successful page or comment ID so a transient failure does not force a full restart. Treat a missing next link as the end of the traversal, not as proof that every historical comment exists.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Filtering, replies and completeness limits

Filters and ordering

The comments reference supports filtering and ordering options in supported contexts. Use the exact options documented for your Graph API version; availability depends on the object and permissions. A filter can intentionally exclude comments, so record the request parameters with your dataset.

Replies

Comments can have parent relationships and reply counts. If your approved fields and object context expose a reply edge, retrieve replies as a separate traversal and paginate it as well. A reply count is not the same as a complete list of replies.

Why counts do not equal rows

Meta warns that total_count may exceed the number of comments returned because comments can be private or deleted. Access restrictions, moderation and unsupported fields can also produce partial results. Report the number actually returned and the API errors encountered; do not label a dataset “complete” solely because a count was present.

A production-ready collection checklist

  • Store the Graph API version, object ID, request time and token context with each run.
  • Request the smallest field set that answers your analysis question.
  • Follow every paging.next URL and implement retries with bounded backoff for transient failures.
  • Capture non-success responses, error codes and the page at which a run stopped.
  • Deduplicate by comment ID when rerunning a job.
  • Delete records when your permitted retention period ends or when your policy requires honoring deletions.
  • Restrict access to raw text and separate identifiers from analytical aggregates.

Common errors and fixes

Permission or feature errors

Symptom: an OAuth or permissions error, or an empty response for a public Page. Fix: verify the parent object, token type, Page relationship and approved Page Public Content Access or Page Public Metadata Access feature. For owned Pages, confirm the required Page task, including MODERATE where applicable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Comment IDs or user fields are missing

Symptom: text or counts are returned but IDs, author details or profile fields are absent. Fix: check the field’s permission requirements. Meta specifically notes that Page post comment IDs can depend on the ability to perform the Page’s MODERATE task, and other users’ profile information is not generally returned without authorization.

HTTP 400 or invalid field errors

Symptom: the request fails after adding a field or option. Fix: remove the new field, test the parent object with a minimal field list, then consult the reference for the exact version and object context. Do not copy a parameter from an older Graph API example without checking its current status.

Only some comments arrive

Symptom: the count is larger than your stored rows or pagination ends early. Fix: inspect privacy/deletion effects, verify that you followed every next link, log errors, and account for documented paging limits on very large objects.

Rate limits, expired tokens or intermittent failures

Symptom: a run works interactively but fails in a scheduled job. Fix: use an appropriately long-lived token approved for the use case, monitor expiry, throttle requests, retry only transient errors, and resume from the last checkpoint. Never respond to a limit by evading Meta’s controls.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Official API versus a hosted collection service

A third-party provider may return comment content and related fields through its own API. That can reduce token and pagination code, but a vendor’s marketing claim does not establish that every collection method complies with Meta’s terms or that your intended use is lawful. Vet the provider’s current authorization model, data coverage, retention, deletion handling, privacy controls, region, pricing and terms.

Decision point Meta Graph API Hosted service
Authorization Directly tied to the parent object, Page relationship, permissions and feature approval. Depends on the provider’s current method and your contract; verify it independently.
Maintenance You track Graph API versions, tokens, fields and pagination. Provider may abstract some changes, but you depend on its maintenance and policy fit.
Data control You control storage and processing after authorized retrieval. Review retention, subprocessors, deletion and export controls.
Completeness Still subject to privacy, deletion, filtering and paging limits. Never assume guaranteed completeness; require documented coverage.

Use a hosted service only when its access is permitted for your project and its handling matches your privacy requirements. It is not a workaround for a denied Meta permission.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your immediate need is a visual record of a Facebook page or public discussion—not structured comment data—ScreenshotNeo can capture the page through one HTTP request. It is a screenshot API and MCP server, not a replacement for Meta’s permissioned comments endpoint: screenshots do not grant rights to extract, store or republish comment data.

ScreenshotNeo removes cookie/consent banners, newsletter popups and chat widgets before capture; bot checks, blank pages, failed loads and cache hits are not billed, and each response reports the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients. One thousand screenshots per month are free with no card; paid plans start at $5 for 3,000.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the ScreenshotNeo documentation for options such as full-page capture, a CSS-selected element, device and viewport settings, custom waits, hidden selectors, headers, cookies, geolocation, PDF output, caching and async jobs.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://facebook.com -o shot.webp

Create a free ScreenshotNeo account to get 1,000 screenshots a month without a card.

Practical cost, reliability and privacy notes

  • Graph API usage is constrained by access approval, token validity, rate limits and response paging; design jobs to resume safely.
  • Store raw comment text only when necessary, encrypt it, restrict operators and define deletion schedules.
  • Keep a data dictionary that records which fields were actually returned, rather than assuming requested fields were granted.
  • For analytics, prefer aggregated counts or redacted text where full comment content is not required.
  • Re-check Meta’s permissions, Page features and versioned references before deployment because API behavior and platform terms are volatile.

Frequently Asked Questions

Can I scrape comments from any public Facebook post?

No. Public visibility does not itself authorize API access. The parent object, Page relationship, permissions and any required Meta feature approval determine what your app may retrieve.

Does the total_count value tell me how many comments I downloaded?

No. Meta says the total can exceed returned comments because some may be private or deleted, and large objects can encounter paging limits.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Is a screenshot a substitute for the comments API?

No. A screenshot is visual evidence only; it does not provide structured comment fields or permission to reuse the underlying data.

What should I verify before using a third-party Facebook comments API?

Verify its authorized access method, coverage, retention and deletion controls, privacy terms, geographic handling, current Meta compatibility and whether your intended use is permitted.

The Bottom Line

Start with Meta’s versioned /{object-id}/comments edge, obtain access for the specific parent object and Page relationship, paginate defensively, and treat counts as non-authoritative. If you only need a visual capture, ScreenshotNeo can handle the screenshot without browser automation, but it does not replace permissioned comment access.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.