# Facebook Ad Library Scraper

curious_coder/facebook-ads-library-scraper

Scrape facebook ads from ad library search results and ads run by facebook pages - Fast and lightweight. $0.75 per 1000 results

## Pricing

$0.75 / 1,000 ads

## Rating

4.6

(84)

## Developer

[Curious Coder](https://apify.com/curious_coder)

## Actor stats

- **Bookmarks**: 757
- **Total users**: 24K
- **Monthly active users**: 3K
- **Issues response**: 6.7 hours
- **Last modified**: 5 days ago

## Categories

- [Social media](https://apify.com/store/categories/social-media)
- [Lead generation](https://apify.com/store/categories/lead-generation)
- [E-commerce](https://apify.com/store/categories/ecommerce)

## Facebook Ad Library Scraper API

You can access the Facebook Ad Library Scraper programmatically from your own applications by using the Apify API. You can also choose the language preference as shown below. To use the Apify API, you’ll need an Apify account and your API token.

### API Token Setup

```bash
# Set API token
$API_TOKEN=<YOUR_API_TOKEN>

# Prepare Actor input
$cat > input.json << 'EOF'
<{
<  "urls": [\
<    {\
<      "url": "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=IN&q=linkedin&search_type=keyword_unordered&media_type=all"\
<    },\
<    {\
<      "url": "https://www.facebook.com/ZapierApp"\
<    }\
<  ],
<  "count": 100,
<  "scrapePageAds.period": "",
<  "scrapePageAds.activeStatus": "all",
<  "scrapePageAds.sortBy": "impressions_desc",
<  "scrapePageAds.countryCode": "ALL"
<}
<EOF

# Run the Actor using an HTTP API
# See the full API reference at https://docs.apify.com/api/v2
$curl "https://api.apify.com/v2/acts/curious_coder~facebook-ads-library-scraper/runs?token=$API_TOKEN" \
<  -X POST \
<  -d @input.json \
<  -H 'Content-Type: application/json'
```

## Run Actor Endpoints

### Run Actor (POST)

```http
```

### Run Actor synchronously and get dataset items (POST)

```http
```

### Get Actor (GET)

```http
```

Actors can be used to scrape web pages, extract data, or automate browser tasks using the Facebook Ad Library Scraper API programmatically.
