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 mode

Node.js

Python

curl

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