Facebook Ad Library Scraper (Best and Cheapest)
by accountable_row
A Facebook Ad Library scraper that makes it easy and cheap to get the results you want without digging through the noise.
Opens on Apify.com
About Facebook Ad Library Scraper (Best and Cheapest)
A Facebook Ad Library scraper that makes it easy and cheap to get the results you want without digging through the noise.
What does this actor do?
Facebook Ad Library Scraper (Best and Cheapest) is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.
Key Features
- Cloud-based execution - no local setup required
- Scalable infrastructure for large-scale operations
- API access for integration with your applications
- Built-in proxy rotation and anti-blocking measures
- Scheduled runs and webhooks for automation
How to Use
- Click "Try This Actor" to open it on Apify
- Create a free Apify account if you don't have one
- Configure the input parameters as needed
- Run the actor and download your results
Documentation
Facebook Ad Library Scraper This is a production-ready scraper for the Facebook Ad Library. Unlike other similar scrapers on Apify, it is intended to simplify the scraping output and make it much easier to handle when transferring data to your own application. The output is designed to be exactly as seen on the initial facebook ad library page. Internal cards within each ad are ignored as they often result in duplicates, and only the individual ads displayed on the initial ad library page itself are included. The scraper will output fewer ads than indicated on the results count of the facebook ad library page, because facebook counts all variations of all cards, whereas this scraper outputs only individual ads to maintain output quality. Having said this, duplicates are still unavoidable if duplicate ads are present on the ad library page itself. This is also a superior scraper in terms of cost, running at $0.6 per 1000 records. ## Inputs These are the inputs that you can use to change the results of the scraper: - startUrls: This is an array of URLs of the facebook ad library pages that you want to scrape. For example, for Shopify, the Facebook ad library url as of writing is: https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=AU&is_targeted_country=false&media_type=all&search_type=page&view_all_page_id=20409006880 Please note that any filters that you have active on the Facebook ad library page are included in the URL, and will therefor affect the results of your scrape. - maxResults: This is the maximum number of results that are to be returned by each URL listed in your startUrls array. Please note that this number is per URL, and not a total count. If any URL has less than maxResults ads available, the scraper will collect all ads available and move on to the next URL. - earliestStartDate: If earliestStartDate is included, then no ads with a start date before the earliestStartDate will be included in your results. Leave this as 0 to include all ads, regardless of start date. ## Outputs The output of this scraper is designed to be organized and easy to parse. It includes the following information: - pageId: The Page ID of the Facebook ad library page. This is a unique identifier for each page. - adId: The Library ID of the ad on the Facebook ad library page. This is a unique identifier for each ad. - startDate: The date that the ad was released. - endDate: The date that the ad stopped running. If the ad has no end date, this will be null. - description: The main description copy of the ad. - mediaType: Whether the ad is an Image or Video. - mediaUrl: The facebook-hosted url of the ad media asset. - platforms: The platforms where the ad is currently running. As of writing, this can be any combination of the following: - FACEBOOK - INSTAGRAM - AUDIENCE_NETWORK - MESSENGER - THREADS - action: An object containing the details of the call-to-action button of each ad. This includes four fields: - actionHeadline: The headline of the call-to-action. - actionDescription: The description of the call-to-action. - actionUrl: The URL shown on the call-to-action. This is also usually where the call-to-action directs to when clicked. - actionCTA: The actual call-to-action text, for example 'SHOP NOW'. This is always displayed on a button. Note that these call-to-action fields are not always all available. If some of them are present, but others are not, then those that are not will be null. If none of these fields are available, then the action object as a whole will be null. - active: Whether or not the ad is currently active. ### Example Output: [ { "pageId": "127674127382761", "adId": "701406655778205", "startDate": "5/8/2025", "endDate": null, "description": "your fave lounge just got an upgrade πΈπ©΅", "mediaUrl": "https://scontent-lga3-3.xx.fbcdn.net/v/t39.35426-6/495541029_1025834659133013_7156709320435889824_n.jpg?_nc_cat=110&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=M5M1ykpD6rAQ7kNvwFO5AHm&_nc_oc=AdnvX0fNY8wT9i6oIvTcyYdPndmJ8FYV4vktkc2W-3-O84RCg2DQLAVapRKHKh9BO9Q&_nc_zt=14&_nc_ht=scontent-lga3-3.xx&_nc_gid=0fdRyO4CHLHLomtaZfoTtw&oh=00_AfNJ1i9_48Q97vimBZm9SKCcun0wWlHwB8TWPRWm0n6GiA&oe=685022CD", "mediaType": "Image", "platforms": [ "FACEBOOK", "INSTAGRAM", "AUDIENCE_NETWORK", "MESSENGER" ], "action": { "actionHeadline": "OFFSTAGE", "actionDescription": "White Fox Boutique", "actionUrl": "https://whitefoxboutique.com.au/collections/offstage?utm_source=meta_au&utm_medium=paidsocial&utm_campaign=offstagesummerbasics", "actionCTA": "Shop Now" }, "active": true }, { "pageId": "127674127382761", "adId": "977608501251082", "startDate": "5/6/2025", "endDate": null, "description": "pov: you found THE holiday wardrobe π¦π§‘", "mediaUrl": "https://scontent-lga3-1.xx.fbcdn.net/v/t39.35426-6/494643411_982227887447023_1882870047862209879_n.jpg?_nc_cat=111&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=R1-V-ftLHKkQ7kNvwFAQ0mj&_nc_oc=Adnhh_SdkG5LOp5f0pYATcD9gY_jbS0Z_s99Jsp8TZOLFm-eE7gh7c-nLQZDnDUpnYc&_nc_zt=14&_nc_ht=scontent-lga3-1.xx&_nc_gid=0fdRyO4CHLHLomtaZfoTtw&oh=00_AfNP_nLMkt6yLzIpqrwmIU0P97A3eVKlx3RDD8OlU77EEQ&oe=68501DF1", "mediaType": "Image", "platforms": [ "FACEBOOK", "INSTAGRAM", "MESSENGER" ], "action": { "actionHeadline": "Casa Caliente\n", "actionDescription": "Euro Summer starts here", "actionUrl": "https://whitefoxboutique.com.au/collections/casa-caliente?utm_source=meta_au&utm_medium=paidsocial&utm_campaign=casacaliente", "actionCTA": "Shop Now" }, "active": true }, ]
Categories
Common Use Cases
Market Research
Gather competitive intelligence and market data
Lead Generation
Extract contact information for sales outreach
Price Monitoring
Track competitor pricing and product changes
Content Aggregation
Collect and organize content from multiple sources
Ready to Get Started?
Try Facebook Ad Library Scraper (Best and Cheapest) now on Apify. Free tier available with no credit card required.
Start Free TrialActor Information
- Developer
- accountable_row
- Pricing
- Paid
- Total Runs
- 965
- Active Users
- 86
Related Actors
π― Tweet Scraper V2 - X / Twitter Scraper
by apidojo
Instagram Scraper
by apify
TikTok Scraper
by clockworks
Instagram Profile Scraper
by apify
Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.
Learn more about ApifyNeed Professional Help?
Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.
Trusted by millions | Money-back guarantee | 24/7 Support