# Scrape a Page's Newest Facebook Ads First

**Use case:** 

Sort a Facebook Page's ads by most recent to catch fresh creatives and new campaigns the moment they go live. Export creative, copy, and dates.

## Input

```json
{
  "urls": [
    {
      "url": "https://www.facebook.com/nike"
    }
  ],
  "count": 100,
  "scrapeAdDetails": false,
  "scrapePageAds.period": "",
  "scrapePageAds.activeStatus": "all",
  "scrapePageAds.sortBy": "most_recent",
  "scrapePageAds.countryCode": "ALL"
}
```

## Output

```json
{
  "page_name": {
    "label": "Advertiser",
    "format": "text"
  },
  "ad_text": {
    "label": "Ad text",
    "format": "text"
  },
  "headline": {
    "label": "Headline",
    "format": "text"
  },
  "cta_text": {
    "label": "CTA",
    "format": "text"
  },
  "media_type": {
    "label": "Media",
    "format": "text"
  },
  "is_active": {
    "label": "Active",
    "format": "boolean"
  },
  "ad_duration_days": {
    "label": "Duration (days)",
    "format": "number"
  },
  "is_long_running": {
    "label": "Long-running",
    "format": "boolean"
  },
  "start_date_iso": {
    "label": "Started",
    "format": "date"
  },
  "end_date_iso": {
    "label": "Ended",
    "format": "date"
  },
  "link_url": {
    "label": "Link",
    "format": "link"
  },
  "image_urls": {
    "label": "Images",
    "format": "array"
  },
  "video_urls": {
    "label": "Videos",
    "format": "array"
  },
  "card_count": {
    "label": "Cards",
    "format": "number"
  },
  "publisher_platform": {
    "label": "Platforms",
    "format": "array"
  },
  "page_url": {
    "label": "Page URL",
    "format": "link"
  },
  "page_like_count": {
    "label": "Page likes",
    "format": "number"
  },
  "page_categories": {
    "label": "Page categories",
    "format": "array"
  },
  "impressions_lower": {
    "label": "Impressions min",
    "format": "number"
  },
  "impressions_upper": {
    "label": "Impressions max",
    "format": "number"
  },
  "reach_lower": {
    "label": "Reach min",
    "format": "number"
  },
  "reach_upper": {
    "label": "Reach max",
    "format": "number"
  },
  "spend_lower": {
    "label": "Spend min",
    "format": "number"
  },
  "spend_upper": {
    "label": "Spend max",
    "format": "number"
  },
  "currency": {
    "label": "Currency",
    "format": "text"
  },
  "categories": {
    "label": "Categories",
    "format": "array"
  },
  "ad_archive_id": {
    "label": "Ad archive ID",
    "format": "text"
  },
  "page_id": {
    "label": "Page ID",
    "format": "text"
  },
  "ad_library_url": {
    "label": "Ad Library URL",
    "format": "link"
  },
  "search_term": {
    "label": "Search term",
    "format": "text"
  },
  "input_url": {
    "label": "Input URL",
    "format": "link"
  },
  "runTag": {
    "label": "Run tag",
    "format": "text"
  },
  "scraped_at": {
    "label": "Scraped at",
    "format": "date"
  }
}
```

## About this Actor

This example demonstrates how to use [Facebook Ads Library Scraper - Creative & Reach ($0.50/1k)](https://apify.com/harshmaur/facebook-ads-library-scraper) with a specific input configuration. Visit the [Actor detail page](https://apify.com/harshmaur/facebook-ads-library-scraper) to learn more, explore other use cases, and run it yourself.