Facebook ad library scraper avatar
Facebook ad library scraper
Try for free

3 days trial then $30.00/month - No credit card required now

View all Actors
Facebook ad library scraper

Facebook ad library scraper

curious_coder/facebook-ads-library-scraper
Try for free

3 days trial then $30.00/month - No credit card required now

Scrape facebook ads search and ads run by facebook pages - Fast and lightweight

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more

1# Set API token
2API_TOKEN=<YOUR_API_TOKEN>
3
4# Prepare Actor input
5cat > input.json <<'EOF'
6{
7  "urls": [
8    {
9      "url": "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=IN&q=linkedin&search_type=keyword_unordered&media_type=all"
10    },
11    {
12      "url": "https://www.facebook.com/ZapierApp"
13    }
14  ],
15  "scrapePageAds.activeStatus": "all",
16  "count": 100,
17  "proxy": {
18    "useApifyProxy": true,
19    "apifyProxyGroups": [
20      "RESIDENTIAL"
21    ]
22  }
23}
24EOF
25
26# Run the Actor using an HTTP API
27# See the full API reference at https://docs.apify.com/api/v2
28curl "https://api.apify.com/v2/acts/curious_coder~facebook-ads-library-scraper/runs?token=$API_TOKEN" \
29  -X POST \
30  -d @input.json \
31  -H 'Content-Type: application/json'
Developer
Maintained by Community
Actor metrics
  • 284 monthly users
  • 13 stars
  • 97.0% runs succeeded
  • 3.1 days response time
  • Created in Aug 2023
  • Modified 10 days ago