Facebook Post & Comment Scraper for Pages, Groups and Profiles avatar

Facebook Post & Comment Scraper for Pages, Groups and Profiles

Pricing

from $1.00 / 1,000 results

Go to Apify Store
Facebook Post & Comment Scraper for Pages, Groups and Profiles

Facebook Post & Comment Scraper for Pages, Groups and Profiles

Scrape public Facebook posts from pages, groups, and profiles with best-effort comment extraction. Collect post text, IDs, permalinks, reactions, shares, media URLs, profile data, and comment samples.

Pricing

from $1.00 / 1,000 results

Rating

0.0

(0)

Developer

Inus Grobler

Inus Grobler

Maintained by Community

Actor stats

1

Bookmarked

138

Total users

15

Monthly active users

5 days ago

Last modified

Share

Facebook Post & Comment Scraper collects public posts, comments, replies, engagement counts, media links, and profile metadata from Facebook pages, groups, and profiles. Enter a public Facebook URL or page name and export structured data without supplying a Facebook API token.

This Actor is designed first as an open public scraper. It aims to balance coverage, speed, and cost without requiring a Facebook token.

Why use this Facebook scraper?

  • Monitor public posts from a page, group, or profile.
  • Analyze visible comments and replies for audience sentiment and recurring topics.
  • Track engagement, media links, and outbound URLs for content research.
  • Export Facebook data to JSON, CSV, Excel, or another workflow through the Apify API.

What Facebook data can it extract?

For posts, the Actor can collect:

  • Post author or page name
  • Post text
  • Post timestamp
  • Post permalink URL
  • Post ID
  • Likes, shares, and visible comment counts
  • Profile and page details when available
  • Media URLs and outbound links
  • Bounded visible comments and replies for selected posts

Supported Facebook targets

You can scrape:

  • Public Facebook pages
  • Public Facebook groups
  • Public Facebook profiles

Targets can be passed as:

  • Full Facebook URLs
  • Page names like NASA
  • Group or profile paths like groups/apify

For predictable results, run one target at a time. The current version processes the first target when more than one is supplied.

Simple input fields

These are the main fields most users need:

  • targets: Facebook URLs, page names, or group paths
  • startUrls: optional URL list alternative to targets
  • maxPosts: maximum posts to return for the processed target, capped at 5
  • proxyConfiguration: optional proxy settings

The public scraping strategy is fixed to bounded deep mode to keep costs predictable while still collecting comments. The Actor processes the first target in each run, enriches up to 2 posts, and recovers up to 5 visible comments/replies per enriched post. Advanced legacy inputs are still accepted for backward compatibility, but performance and enrichment overrides are ignored.

How to scrape Facebook posts and comments

  1. Open the Actor in Apify Console.
  2. Enter one public Facebook URL, page name, profile path, or group path.
  3. Choose up to five posts.
  4. Keep the prefilled residential proxy for the best chance of reaching public Facebook pages.
  5. Click Start, then open the Dataset tab to preview or export the rows.

For a practical no-token scrape:

{
"targets": ["NASA"],
"maxPosts": 5,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"],
"apifyProxyCountry": "US"
}
}

Facebook scraper output

The dataset contains post, comment, and reply items when comments are visible.

Post fields

Common post fields:

  • itemType
  • inputTarget
  • postAuthor
  • postTimestamp
  • postText
  • postUrl
  • postId
  • postOwnerId
  • likesCount
  • sharesCount
  • commentCountValue
  • profileName
  • profileUrl
  • profileUsername
  • profileId
  • profileImageUrl
  • profileFollowersCount
  • targetType
  • targetTitle
  • targetDescription
  • targetImageUrl
  • targetFollowersCount
  • targetUrl
  • externalUrls
  • mediaUrls
  • mediaCount
  • scrapedAt

Comment and reply fields

Comment and reply rows can include:

  • itemType
  • inputTarget
  • parentPostId
  • parentPostUrl
  • parentCommentId
  • parentCommentUrl
  • isReply
  • commentText
  • commentAuthor
  • commentAuthorUrl
  • commentTimestamp
  • commentId
  • commentUrl
  • commentSampleIndex
  • scrapedAt

Example post item

{
"itemType": "post",
"inputTarget": "NASA",
"postAuthor": "NASA - National Aeronautics and Space Administration",
"postTimestamp": "2026-05-01T00:00:00+0000",
"postText": "Post text...",
"postUrl": "https://www.facebook.com/NASA/posts/...",
"postId": "pfbid02abc...",
"likesCount": 728,
"sharesCount": 42,
"commentCountValue": 61,
"profileName": "NASA - National Aeronautics and Space Administration",
"profileUrl": "https://www.facebook.com/NASA",
"profileUsername": "NASA",
"externalUrls": ["https://example.com"],
"mediaUrls": ["https://..."],
"mediaCount": 1,
"scrapedAt": "2026-05-01T10:40:00+00:00"
}

Operational notes

  • The Actor always uses bounded deep/comment mode.
  • maxPosts is capped at 5 even if a higher value is sent through the API.
  • Only the first target is processed in a run.
  • Up to 2 posts are enriched, with up to 5 comments/replies per enriched post.
  • Performance and enrichment overrides are ignored to keep run costs bounded.
  • Public Facebook coverage still varies by target, region, proxy quality, and login walls.
  • Residential proxies usually improve coverage.

Run the Facebook scraper with Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("thescrapelab/Apify-Facebook-Post-Scraper").call(
run_input={
"targets": ["NASA"],
"maxPosts": 5,
"proxyConfiguration": {
"useApifyProxy": True,
"apifyProxyGroups": ["RESIDENTIAL"],
"apifyProxyCountry": "US",
},
}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)

Schedule recurring runs in Apify, connect webhooks, or use integrations to send the dataset to your own storage and analytics tools.

Pricing and cost control

Cost depends mainly on browser runtime and proxy traffic. Start with one target and a small maxPosts value. Residential proxies can improve coverage but may cost more than direct traffic. Apify displays the active Store price and platform-usage estimate before each run.

Limits and responsible use

This is still a best-effort public scraper. Facebook can change markup, throttle anonymous browsing, or block access by region or IP. That means:

  • some targets return posts and comments
  • some targets return only a few
  • some pages are much better with residential proxies

The Actor only reads content that is publicly visible from its runtime. It does not log in, bypass access controls, or guarantee complete post or comment coverage. Use public Facebook data lawfully and follow applicable privacy, intellectual-property, and platform rules.

Troubleshooting

  • No posts returned: try the full public Facebook URL and keep the residential proxy enabled.
  • Only a few posts returned: the public page may be login-gated, region-limited, or serving reduced anonymous content.
  • Comments are missing: Facebook may not expose them publicly for that post, or the post may not be one of the two rows selected for bounded comment enrichment.
  • A second target was ignored: submit one target per run; the current version processes the first target only.
  • A run is slow: keep maxPosts low and avoid retrying many blocked targets in one workflow.

FAQ

Does this Facebook scraper need an API key or account?

No Facebook API token or logged-in Facebook account is required. An Apify account is required to run the Actor.

Can it scrape private Facebook groups or profiles?

No. It is designed for publicly visible pages, groups, profiles, posts, comments, and replies only.

Can I export Facebook posts and comments to CSV or Excel?

Yes. Download the dataset in JSON, CSV, Excel, XML, or other supported formats from Apify, or retrieve it through the API.

Support

If a public target repeatedly fails, open the Actor's Issues tab and include the run ID, the public target URL, and a sanitized input. Do not include cookies or private account data.