Facebook Ads Library Spy Scraper avatar
Facebook Ads Library Spy Scraper

Pricing

$15.00/month + usage

Go to Apify Store
Facebook Ads Library Spy Scraper

Facebook Ads Library Spy Scraper

This Python script uses Playwright to scrape Facebook Ads data from the Facebook Ads Library based on a user-provided keyword. It captures ads in real-time as the page loads and scrolls, then saves them into a JSON file.

Pricing

$15.00/month + usage

Rating

0.0

(0)

Developer

Data Pilot

Data Pilot

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

10 days ago

Last modified

Categories

Share

🚀 Facebook Ads Library Spy Scraper

An advanced Facebook Ads scraper designed to collect real-time data based on specific keywords. This tool intercepts direct backend network traffic to ensure high data accuracy and reliability.


🌟 Key Features

  • Multi-Keyword Support: Process multiple keywords simultaneously by separating them with a comma (,).
  • Residential Proxy Support: Optimized to work with Residential Proxies to effectively bypass Facebook's anti-scraping measures.
  • Spy-Tool Style Data: Structured output including Ad IDs, Page Information, and Direct Media URLs, similar to premium spy tools.
  • Deduplication: Automatically filters out duplicate advertisements to keep your dataset clean and unique.

📥 Input Parameters

Use the following parameters to configure the Actor:

FieldTypeDescriptionDefault
keywordStringThe search queries for finding ads (e.g., samsung, gadgets)samsung, shoes
max_scrollsIntegerThe number of times the scraper scrolls per keyword to load more data10

📊 Output Schema

The following information is collected for every captured advertisement:

  • Ad ID: The unique identifier for the advertisement.
  • Page Info: Includes the Page Name, Page ID, and the direct Facebook Page URL.
  • Media URLs: Direct download links for images and videos used in the ad.
  • CTA Text: The Call-To-Action button text (e.g., "Shop Now", "Learn More").
  • Running Since: The date when the advertisement started running.
  • Ad URL: A direct link to view the ad in the Facebook Ads Library.

🛠️ How to Run

  1. Open this Actor in your Apify Console.
  2. Go to the Input tab and enter your keywords and preferred scroll count.
  3. In Proxy Settings, ensure that Residential Proxy is enabled for the best success rate.
  4. Click Start and wait for the process to complete.
  5. Export your data from the Storage tab in CSV, JSON, or Excel formats.

⚠️ Important Notes

  • Proxies: Always use Residential Proxies to avoid being blocked by Facebook's high-security filters.

Happy Scraping! 😊