Effortlessly extract Facebook posts based on search queries to uncover trends, monitor conversations, and collect rich engagement data. This tool automates post extraction from Facebook search results, giving you structured, actionable insights for research, analysis, or content discovery.
Created by Bitbash, built to showcase our approach to Scraping and Automation!
If you are looking for Facebook Posts Search Scraper you've just found your team — Let’s Chat. 👆👆
The Facebook Posts Search Scraper collects Facebook posts matching your custom query and compiles detailed post information — including engagement metrics, timestamps, and content. It’s designed for analysts, marketers, and data professionals who need reliable Facebook data without manual scrolling.
- Automates browsing and scrolling through Facebook search results
- Captures full post details: text, links, and engagement stats
- Handles dynamic pages using browser automation
- Incorporates anti-detection strategies for stable runs
- Outputs structured, exportable data formats (JSON, CSV, etc.)
| Feature | Description |
|---|---|
| Custom Search Queries | Search Facebook posts by any keyword or phrase. |
| Post Limit Control | Define how many posts to scrape (default 100, up to 5000). |
| Engagement Data | Extract likes, comments, and shares for each post. |
| Media Extraction | Capture links and thumbnails attached to posts. |
| Anti-Detection Engine | Mimics human-like browsing for reliable results. |
| Multiple Export Formats | Download as JSON, CSV, HTML, XML, or Excel. |
| Field Name | Field Description |
|---|---|
| facebookUrl | URL of the Facebook page that made the post. |
| pageId | Unique identifier of the Facebook page. |
| postId | Unique identifier of the post. |
| pageName | Name of the Facebook page. |
| url | Direct URL to the post. |
| time | Human-readable post time. |
| timestamp | Unix timestamp for the post date. |
| likes | Number of likes on the post. |
| comments | Number of comments on the post. |
| shares | Number of times the post was shared. |
| text | The main content of the post. |
| link | URL of any attached link. |
| thumb | Thumbnail image URL (if available). |
| topLevelUrl | Canonical post URL. |
[
{
"facebookUrl": "https://www.facebook.com/BleacherReportFootball",
"pageId": "100044187438640",
"postId": "1150692399746997",
"pageName": "Bleacher Report Football",
"url": "https://www.facebook.com/BleacherReportFootball/posts/pfbid02KPDjc6DpFw1KDQYwptdvvUwGF4GLjsQZnfyU8g3osUAzonhcr2crgEJTKSroqWt6l",
"time": "2024-10-01 18:11:20",
"timestamp": 1727777480,
"likes": 18189,
"comments": 399,
"shares": "2.4K",
"text": "After 1,016 games and 38 trophies, 40-year-old Andrés Iniesta is finally hanging up his boots. One of the greatest to ever do it ✨🇪🇸",
"link": "https://www.facebook.com/photo/?fbid=1150688623080708&set=a.274973270652252",
"thumb": "https://scontent-ams4-1.xx.fbcdn.net/v/t39.30808-6/461867291_1150688626414041_3301490527386528216_n.jpg",
"topLevelUrl": "https://www.facebook.com/100044187438640/posts/1150692399746997"
}
]
facebook-posts-search-scraper/
├── src/
│ ├── main.py
│ ├── extractors/
│ │ ├── facebook_parser.py
│ │ └── scroll_manager.py
│ ├── utils/
│ │ ├── logger.py
│ │ └── formatter.py
│ └── config/
│ └── settings.json
├── data/
│ ├── inputs.sample.json
│ └── output.sample.json
├── requirements.txt
└── README.md
- Marketers use it to discover trending posts and content ideas.
- Researchers analyze public sentiment around products or topics.
- Agencies track competitor engagement metrics across campaigns.
- Journalists monitor discussions on breaking stories or events.
- Data analysts feed Facebook post data into dashboards or AI models.
1. How many posts can it scrape per run?
You can set the maxPosts parameter up to 5000. Default is 100.
2. Does it work with private or restricted posts? No — it only collects publicly available posts visible through Facebook search.
3. In what formats can I export data? Data can be exported as JSON, CSV, Excel, HTML, or XML directly.
4. How does it handle dynamic loading? It uses browser automation to scroll and load more results until your limit is reached.
Primary Metric: Scrapes an average of 50–80 posts per minute depending on network and system resources. Reliability Metric: Achieves a 98% completion rate on stable connections. Efficiency Metric: Uses minimal browser sessions for optimal resource use. Quality Metric: Ensures over 95% data completeness across key fields (text, likes, shares, comments).
