Facebook Profile Posts Scraper avatar

Facebook Profile Posts Scraper

Pricing

from $20.00 / 1,000 results

Go to Apify Store
Facebook Profile Posts Scraper

Facebook Profile Posts Scraper

Paste a Facebook page or profile URL and get that account's posts for any period. Date filtering, multi-profile input, auto-pagination, self-renewing login session. Returns text, author, timestamp, reactions, comments, shares and media.

Pricing

from $20.00 / 1,000 results

Rating

0.0

(0)

Developer

code craker

code craker

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

2 days ago

Last modified

Share

Paste a Facebook page or profile URL and get that account's posts as structured data — text, author, publish time, reaction breakdown, comment and share counts, photos and videos. Supports several profiles per run, a date range with early-stop scrolling, and a self-renewing login session.

Input

FieldDescription
profileUrlOne page/profile: https://www.facebook.com/nasa, a profile.php?id=... URL, a /people/ URL, a bare vanity name or numeric id. Any post URL on the page resolves to its owner. Several profiles can be pasted one per line.
profileUrlsSeveral profiles as an array. numberOfPosts applies per profile.
numberOfPostsMaximum posts to return per profile (default 25).
scrapeAllKeep scrolling until the target count, the date boundary, or the end of the feed (default on).
timeSince / timeUntilInclusive date range (yyyy-mm-dd, UTC). Posts carry real timestamps; the actor stops scrolling once the feed passes below timeSince.
cookies / fbEmail + fbPasswordSession — see Authentication.
proxySessionIdStable Apify proxy session id pinning ONE exit IP across runs (or the FB_PROXY_SESSION env var).

Authentication

Facebook login-walls most timelines for anonymous visitors, so the actor needs a session from a throwaway account (never a personal one):

  • Recommended: set the FB_EMAIL + FB_PASSWORD secret environment variables (2FA disabled) — the actor logs in once, then keeps the session alive by itself: the refreshed cookies are written back to a persistent store after every run and the pinned proxy session (FB_PROXY_SESSION) keeps the account on one exit IP, which is what stops Facebook invalidating it.
  • Or provide cookies directly: the cookies input or the FB_COOKIES secret env var (a Cookie-Editor JSON export, or a name=value; name2=value2 string). These are only a seed — once adopted, the self-refreshing stored session takes priority.

Output

One dataset item per post:

{
"post_id": "1234567890123456",
"url": "https://www.facebook.com/NASA/posts/...",
"message": "Full post text...",
"text": "Full post text...",
"timestamp": 1787568447,
"createdTime": "2026-08-21T19:05:34.000Z",
"reactions_count": 1809,
"comments_count": 147,
"reshare_count": 300,
"reactions": { "like": 1500, "love": 200, "care": 30, "haha": 20, "wow": 40, "sad": 10, "angry": 9 },
"author": { "id": "...", "name": "NASA", "url": "https://www.facebook.com/NASA", "username": "NASA" },
"image": { "uri": "https://...", "width": 720, "height": 480 },
"video": null,
"attached_post": null,
"profileHandle": "nasa",
"profileUrl": "https://www.facebook.com/nasa"
}

Tips

  • An unavailable page (deleted, restricted, renamed) is skipped with a warning instead of failing the run.
  • Public pages often serve their first posts even without a session, so a cookie-less run may still return the newest few posts — but a session is required for reliable, deep scraping.
  • Check DEBUG_SCREENSHOT / DEBUG_HTML in the run's key-value store when a run returns nothing.