Meta Posts Scraper
Pricing
from $1.20 / 1,000 meta starters
Meta Posts Scraper
Scrapes Facebook and Instagram posts by keywords and hashtags using Playwright. Returns raw post data including captions, engagement metrics (likes, comments, shares, views), images, and author info.
Pricing
from $1.20 / 1,000 meta starters
Rating
0.0
(0)
Developer

yourlocalhost
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Share
Scrapes Facebook and Instagram posts by keywords and hashtags using Playwright. Returns raw post data including captions, engagement metrics (likes, comments, shares, views), images, and author info.
What it does
This Actor automates scraping across both Meta platforms. Select Facebook, Instagram, or both, then provide search keywords and/or hashtags. It navigates each platform, searches for your terms, and extracts post data — author handle, caption text, full engagement metrics, post date, hashtag list, and image URLs. Supports optional login for each platform to access richer data behind authentication walls.
Use cases
- Social listening — track brand mentions, product buzz, and community sentiment
- Viral content discovery — find trending posts and viral hashtags
- Influencer analysis — benchmark engagement rates across creators
- Competitive research — monitor competitor content performance on Meta platforms
- Product discovery — feed social signals into e-commerce trend detection pipelines
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
platforms | string | No | "both" | Which platforms: "both", "facebook", or "instagram" |
searchKeywords | array | No | [] | Keywords to search for posts |
hashtags | array | No | [] | Hashtags to search (without # symbol) |
postsPerQuery | integer | No | 15 | Max posts per keyword/hashtag (1–100) |
fbEmail | string | No | — | Facebook email for login |
fbPassword | string | No | — | Facebook password (stored as secret) |
igUsername | string | No | — | Instagram username for login |
igPassword | string | No | — | Instagram password (stored as secret) |
loginFacebook | boolean | No | true | Whether to log in to Facebook before scraping |
loginInstagram | boolean | No | true | Whether to log in to Instagram before scraping |
Tip: Set
loginFacebook/loginInstagramtofalseto scrape without authentication (public data only).
Example input
{"platforms": "both","searchKeywords": ["trending products", "viral gadgets"],"hashtags": ["trending", "viralproducts"],"postsPerQuery": 15,"loginFacebook": false,"loginInstagram": false}
Output
Each post is pushed as a separate record to the Apify dataset.
| Field | Type | Description |
|---|---|---|
platform | string | "facebook" or "instagram" |
post_id | string | Unique post identifier |
post_url | string | Direct URL to the post |
author_handle | string | Author username/handle |
caption | string | Post caption/text |
likes_count | number | Number of likes/reactions |
comments_count | number | Number of comments |
shares_count | number | Number of shares |
views_count | number | Number of views (if available) |
post_date | string | When the post was published |
source | string | The keyword/hashtag that found this post |
hashtags_list | array | Hashtags used in the post |
image_urls | array | URLs of post images |
extracted_at | string | ISO 8601 date-time of extraction |
Example output
{"platform": "instagram","post_id": "CxYz123456","post_url": "https://www.instagram.com/p/CxYz123456","author_handle": "@gadget_reviews","caption": "This portable blender is a game-changer! 🔥 #viralproducts #amazonfinds","likes_count": 12400,"comments_count": 328,"shares_count": 1540,"views_count": 89000,"post_date": "2026-03-01","source": "viralproducts","hashtags_list": ["viralproducts", "amazonfinds", "gadgets"],"image_urls": ["https://scontent.example.com/post_image.jpg"],"extracted_at": "2026-03-06T14:30:00.000Z"}
How to run
On Apify Platform
- Go to the Actor's page on Apify Console
- Select platforms, enter keywords/hashtags, and optionally provide login credentials
- Click Start and wait for the run to finish
- Download results from the Dataset tab in JSON, CSV, or Excel format
Locally
$apify run
Deploy to Apify
apify loginapify push
Built with
- Apify SDK — actor framework and dataset management
- Playwright — browser automation for Facebook and Instagram