# Scrape Facebook Ads from an Ad Library URL

**Use case:** 

Paste a Facebook Ad Library search URL and export every ad it returns filters like country and media type carry over automatically.

## Input

```json
{
  "URLAds": [
    {
      "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&content_languages[0]=en&country=ALL&is_targeted_country=false&media_type=video&publisher_platforms[0]=facebook&q=pokemon&search_type=keyword_unordered&sort_data[mode]=relevancy_monthly_grouped&sort_data[direction]=desc&source=fb-logo"
    }
  ],
  "searchQueries": [
    "apify"
  ],
  "searchAdvertisers": [
    "Nike",
    "15087023444"
  ],
  "maxResultsPerQuery": 50,
  "enrichWithAdDetails": false,
  "sortBy": "SORT_BY_TOTAL_IMPRESSIONS",
  "activeStatus": "ALL",
  "adType": "ALL",
  "mediaType": "ALL"
}
```

## Output

```json
{
  "media.primary_thumbnail": {
    "label": "🖼️ Primary Thumbnail",
    "format": "image"
  },
  "ad_url": {
    "label": "🔗 Ad Library URL",
    "format": "link"
  },
  "id": {
    "label": "🆔 Ad ID",
    "format": "text"
  },
  "page_name": {
    "label": "📄 Page Name",
    "format": "text"
  },
  "title": {
    "label": "📹 Ad Title",
    "format": "text"
  },
  "text": {
    "label": "📝 Ad Text",
    "format": "text"
  },
  "media.type": {
    "label": "🎨 Media Type",
    "format": "text"
  },
  "is_active": {
    "label": "✅ Is Active",
    "format": "boolean"
  },
  "page_likes": {
    "label": "👍 Page Likes",
    "format": "number"
  },
  "platforms": {
    "label": "📱 Platforms",
    "format": "array"
  },
  "start_date": {
    "label": "📅 Start Date",
    "format": "datetime"
  },
  "end_date": {
    "label": "📅 End Date",
    "format": "datetime"
  },
  "ad_category": {
    "label": "🏷️ Ad Category",
    "format": "text"
  },
  "scraped_at": {
    "label": "⏰ Scraped At",
    "format": "datetime"
  }
}
```

## About this Actor

This example demonstrates how to use [Facebook Ads Scraper Pro](https://apify.com/dz_omar/facebook-ads-scraper-pro) with a specific input configuration. Visit the [Actor detail page](https://apify.com/dz_omar/facebook-ads-scraper-pro) to learn more, explore other use cases, and run it yourself.