![Facebook ad library scraper avatar](https://images.apifyusercontent.com/P0g3oK3LUlMd_3jWnM4KBXWNQC6EfaaWeDHLiIakX6I/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9YdGFXRmhidGZ4eXpxckZtZC9aaEcyTXJNdThMTXBTNktrcS1mYWNlYm9vay5qcGVn.webp)
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](https://images.apifyusercontent.com/P0g3oK3LUlMd_3jWnM4KBXWNQC6EfaaWeDHLiIakX6I/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9YdGFXRmhidGZ4eXpxckZtZC9aaEcyTXJNdThMTXBTNktrcS1mYWNlYm9vay5qcGVn.webp)
![Facebook ad library scraper](https://images.apifyusercontent.com/P0g3oK3LUlMd_3jWnM4KBXWNQC6EfaaWeDHLiIakX6I/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9YdGFXRmhidGZ4eXpxckZtZC9aaEcyTXJNdThMTXBTNktrcS1mYWNlYm9vay5qcGVn.webp)
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
- 209 monthly users
- 18 stars
- 100.0% runs succeeded
- 17 hours response time
- Created in Aug 2023
- Modified 14 days ago
Categories