Facebook Posts Backfill Scraper - Keyword History by Date avatar

Facebook Posts Backfill Scraper - Keyword History by Date

Pricing

from $2.40 / 1,000 post scrapeds

Go to Apify Store
Facebook Posts Backfill Scraper - Keyword History by Date

Facebook Posts Backfill Scraper - Keyword History by Date

Collect the public Facebook posts for your keywords over a past date range. The range is searched month by month, week by week or day by day, every search is read to its end, runs continue where the last one stopped, and a coverage report shows which windows are finished. No login or cookies.

Pricing

from $2.40 / 1,000 post scrapeds

Rating

0.0

(0)

Developer

Top Api

Top Api

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Features

Limited permissions

Share

What does Facebook Posts Backfill Scraper do?

Facebook Posts Backfill Scraper collects the public Facebook posts for your keywords over a past date range. You give it keywords and a range such as 2025-10-01 to 2026-09-30; it searches the range one window at a time (month, week or day), reads every search to its end, remembers where each one stopped, and reports which windows are finished. One row per post: full text, author Page or profile, publish date, reactions by type, comments, shares, video views, media and links.

Facebook Posts History - Facebook Keyword Backfill - Historical Facebook Posts by Date - Facebook Post Archive Scraper

  • Built for past periods: Facebook serves a limited list of posts per search, so a year in one search returns a fraction of it. Searched by window, a quarter for one keyword took 3 searches and 47 pages on a test run and each of them ran to Facebook's end.
  • Every search is read to its end: each search page is charged on its own, so a window where most posts fall outside your dates is still read through instead of being cut short.
  • Continues across runs: every keyword and window keeps its position. Run the same input again and it carries on; a finished window is not read again, and a post delivered before is not delivered or charged twice.
  • Coverage report: one line per keyword and window: finished or not, why it stopped, pages read and posts delivered in this run and over all runs.
  • Cost controls: your run's maximum cost is never passed, and you can cap the pages read per keyword and window in a run.
  • No login, cookies or Facebook API key: the actor reads only what Facebook shows a signed-out visitor.
  • Same rows as Facebook Search Posts Scraper, plus search_window. Use that actor for quick searches, newest-first feeds and monitoring; use this one to fill in history.

What data can you get for each Facebook post?

🔗 Post URL and id (`url`, `post_id`)📝 Full text (`message`), hashtags, mentions📅 Publish date (`timestamp`, `published_at`)
👤 Author id, name, URL, avatar, type🏢 Business Page flag (`author.is_business_page`)👍 Reactions total and by type (`reactions`)
💬 Comments and shares (`comments_count`, `reshare_count`)▶️ Video views, duration, thumbnail, captions URL🖼️ Photos and albums (`image`, `images`, `album_count`)
🌐 Outbound link with title, source, preview (`external_link`)🔁 Shared post URL and author (`attached_post`)👥 Public group id, name, URL (`group`)
📍 Tagged place (`location`)🎯 Contains your keyword? (`matches_query`)💬 Top comments, video files (details add-on)

On a 100-post test run for "coffee" every row had text, author, date, reactions, comments and shares; 73% carried an image, 47% came from public groups, 11% were videos (views on 10 of 11), 52% had hashtags and 91% contained the word "coffee".

How to backfill Facebook posts by keyword with Facebook Posts Backfill Scraper

  1. Open the actor and enter your keywords, one per line.
  2. Set From and To with fixed dates (2025-10-01, 2026-09-30) and choose how to search the range: by month, week or day.
  3. Set the run's maximum cost in the run options and, if you like, a page limit per keyword and window.
  4. Start the run. When it ends, open the COVERAGE record to see what is finished.
  5. Run the same input again until allFinished is true. Nothing read before is read or charged again.

⬇️ Input

FieldTypeWhat it does
searchQueriesArrayKeywords, phrases, hashtags or Facebook search URLs, one per line.
startDateStringStart of the range: 2025-10-01, or relative (3 months, 1 year). Empty = the last 30 days.
endDateStringEnd of the range; the date includes that whole day. Empty = today.
sliceByStringmonth (default), week, day or none: the size of the windows the range is searched in.
locationUidStringFacebook's numeric place id to restrict the search to posts tagged there.
mustContainQueryBooleanKeep only posts whose text contains the keyword.
keywordFilterStringKeep only posts containing one of these words (comma = any of them).
postTypeStringall, photo, video, link or text.
postSourceStringall, groups, pages_and_profiles or business_pages.
minReactionsIntegerKeep only posts with at least this many reactions.
maxPagesPerSliceIntegerSearch pages read for one keyword in one window during one run. 0 = until Facebook has no more. A search stopped here continues on the next run.
maxPostsPerSliceIntegerPosts delivered for one keyword in one window. 0 = up to 1,000.
maxItemsIntegerCap for the whole run. 0 = none.
resumeStoreNameStringName of the job's memory (default facebook-posts-backfill). Give each separate job its own name. With the default name the memory is used only when startDate is a fixed date. Empty = no memory.
includePostDetailsBooleanAdds top comments, video SD/HD files and the view count per post (paid add-on).
compactBooleanCore fields only, for AI agents and MCP clients.
proxyConfigurationObjectApify proxies by default; nothing to set.

Input JSON

{
"searchQueries": ["coffee", "espresso machine"],
"startDate": "2026-04-01",
"endDate": "2026-06-30",
"sliceBy": "month",
"maxPagesPerSlice": 10,
"resumeStoreName": "coffee-q2-2026"
}

Use fixed dates for a job that takes several runs

A window's saved position belongs to its exact dates. With 2025-10-01 to 2026-09-30 the windows are the same on every run and the job memory is on. A run with a relative start such as 3 months is a one-off: it keeps no memory unless you set a resumeStoreName of your own, and then its first window moves a day every day and is read again from its first page (posts already delivered are still skipped and not charged).

Pick the window size by how busy the keyword is

Facebook ends a search after a limited number of pages (15 to 30 pages for a one-month window of one keyword on the test runs; a page holds 5-6 posts). A keyword with many posts a month gets more of them from weekly or daily windows; a quiet keyword is cheaper by month. Keep the same sliceBy for the whole job.

Filters do not make a run cheaper

mustContainQuery, keywordFilter, postType, postSource and minReactions are applied after a page is read. The page is charged either way; only the posts that pass are charged as posts.

⬆️ Output

Every post becomes one dataset item. One real row (trimmed):

{
"post_id": "1113407151220671",
"type": "photo",
"url": "https://www.facebook.com/greenhousecoffeebar21/posts/pfbid034DHRsirpdQQZBg84SYp3rXU1mD6xu1tMc8CsJ4gcgjiuWGeS2JMQnwV6eV81wfCBl",
"message": "As we reflect on the last 4.5 years of Greenhouse we are filled with so much gratitude ...",
"published_at": "2026-09-28T20:20:22.000Z",
"author": { "id": "100076541894287", "name": "Greenhouse Coffee Bar", "url": "https://www.facebook.com/greenhousecoffeebar21", "type": "user", "is_business_page": false },
"reactions_count": 48,
"comments_count": 56,
"reshare_count": 5,
"reactions": { "like": 22, "love": 24, "care": 1, "haha": 0, "wow": 1, "sad": 0, "angry": 0 },
"image": { "uri": "https://scontent-mia3-3.xx.fbcdn.net/v/t39.99422-6/...", "width": 526, "height": 701 },
"is_group_post": false,
"privacy": "Public",
"hashtags": ["nationalcoffeeday"],
"matches_query": true,
"search_query": "coffee",
"search_window": "2026-09-15/2026-09-30"
}

Facebook post fields

FieldTypeWhat it isFill on the 100-post run
post_id, url, story_id, comments_idstringPost id, permalink, story id, feedback id100%
typestringphoto, album, video, link, marketplace, event, share or status100%
messagestringFull text, never truncated (longest seen 3,160 characters)100%
timestamp, published_atinteger, ISO 8601Publish time100%
authorobjectid, name, url, profile_picture_url, type (page, user, anonymous), is_business_page100%
author_titlestringFacebook's header line, e.g. "Iron Bloom Coffee Bar is in Elyria, OH."9%
reactions_count, comments_count, reshare_count, engagement_countintegerTotals; engagement = reactions + comments + shares100%
reactionsobjectlike, love, care, haha, wow, sad, angry; an unlisted type is 0 when the listed ones add up to the total, else null97%
video_view_count, video, video_id, video_thumbnail, video_duration_ms, video_captions_urlmixedVideo posts only10-11% (every video post)
video_filesobjectvideo_sd_file, video_hd_file - details add-on3 of 3 videos on the details run
image, images, album_count, image_altobject, arrayFirst image, every image of the post or album, accessibility caption73% / 81%
external_url, external_linkstring, objectOutbound link (unwrapped) with title, description, source, preview image1% on "coffee", 7% across 307 mixed posts
attached_post_url, attached_poststring, objectThe original post when this one is a share1%
attachmentsarrayEvery attachment: kind, url, title, image, id92%
is_group_post, groupboolean, objectPublic group id, name, url47%
locationobjectTagged place id, name, url2% on "coffee", 5% across 307 posts
privacystringPublic or Public group100%
hashtags, mentionsarrayParsed from the text52% / 2%
top_commentsarrayUp to ~10 public top comments: id, text, date, author, reactions - details add-on10 of 16 posts had one on the details run
matches_query, search_query, search_window, sort, search_source, scraped_atmixedExact-match flag, the keyword and the date window (from/to) that produced the row100%

The coverage report

Each run writes a COVERAGE record to its key-value store, and the job's memory keeps the same report across runs (record coverage in the store named by resumeStoreName).

{
"from": "2026-04-01", "to": "2026-06-30", "sliceBy": "month",
"searches": 3, "finished": 3, "remaining": 0, "allFinished": true,
"keywords": [{ "query": "China young man", "windows": 3, "finished": 3, "pages": 47, "delivered": 68 }],
"slices": [
{ "query": "China young man", "window": "2026-05-01/2026-05-31", "finished": true, "stopReason": "exhausted",
"pagesThisRun": 5, "deliveredThisRun": 4, "pagesAllRuns": 16, "deliveredAllRuns": 21, "runs": 2 }
]
}

finished is true only when Facebook had no further page for that keyword and window. stopReason for an unfinished search: max_pages_per_slice (your page limit for one run), max_posts_per_query (your post cap), max_items, charge_limit (the run's maximum cost), run_time_limit (the run's timeout), page_limit (303 pages in one run), blocked (Facebook refused or did not answer), not_started (the run ended before its turn). The RUN_SUMMARY record has the same per-search lines with read, filtered and error.

How much does it cost to backfill Facebook posts?

Pay per event, no start fee:

EventPrice
Search page read$0.004
Post scraped$0.0024
Post details (optional add-on, per post that received them)$0.001

A page is charged when it is read, whether or not its posts fall inside your window and filters. Apify platform usage (compute, proxy) is included. Measured on test runs (November 14, 2026):

JobPagesPostsCost
1 keyword, 3 months by month, read to the end4768$0.35
2 keywords, 4 weeks by week, 6 pages per search48103$0.44
1 keyword, 3 days in the past (few posts exist)161$0.07

Set Maximum cost per run in the run options: the run stops there, keeps its positions and reports charge_limit. A run that reads nothing (every search finished earlier) charges nothing.

Limits

  • Facebook decides how much a search returns. A search ends when Facebook serves no further page; that is what finished means. Two runs of the same search can return different posts, because Facebook ranks per session. Smaller windows return more of a busy period.
  • Ranking: posts come in Facebook's relevance order inside each window. Sort by timestamp for a timeline.
  • Relevance is Facebook's: the search also returns loosely related posts. matches_query marks the exact matches; mustContainQuery keeps only those.
  • A saved position Facebook no longer accepts makes that search start at its first page again. Its pages are charged again; its posts are not.
  • Up to 5,000 keyword-window searches per run and 1,000 posts per keyword and window. Split larger jobs over several runs with the same memory name.
  • Reactions by type are the types Facebook lists on the post; when they do not add up to the total, the unlisted types are null, not zero.
  • Post details open each post's public page; comments are the top-level ones Facebook shows a visitor (0-10 per post), not the full thread. Use 256 MB with details.
  • Not available signed-out: full comment threads, reactor lists, private groups, restricted-audience posts. Media and avatar URLs are signed CDN links that expire after a few hours.

FAQ

How far back can Facebook Posts Backfill Scraper go?

As far as Facebook's public search serves posts for your keyword. Test runs delivered posts from October 2025 with a 2025 window. Older windows work the same way; how many posts Facebook still serves for them depends on the keyword.

How do I know a window was fully searched?

finished: true for that keyword and window in the COVERAGE record, and allFinished: true for the whole job.

What happens when a run hits its maximum cost or timeout?

It stops, saves every position and reports what is left. Start the same input again to continue.

Will I be charged twice for the same post?

No. Delivered posts are remembered per keyword in the job's memory, across runs and windows.

Can I get the newest posts or monitor a keyword with it?

Use Facebook Search Posts Scraper for newest-first searches and scheduled monitoring. This actor is for past periods.

Do I need a Facebook account, cookies or an API key?

No.

Can I use it with the Apify API, integrations or an MCP server?

Yes: it runs like any Apify actor from the API, schedules, webhooks, Make, Zapier, n8n and MCP clients. Run the default build (latest).

Your feedback

Found a bug or need a field? Open an issue on the actor's Issues tab.