Facebook Ad Library Scraper (Best and Cheapest) avatar
Facebook Ad Library Scraper (Best and Cheapest)

Pricing

$0.60 / 1,000 results

Go to Store
Facebook Ad Library Scraper (Best and Cheapest)

Facebook Ad Library Scraper (Best and Cheapest)

Developed by

Curado

Curado

Maintained by Community

A Facebook Ad Library scraper that makes it easy and cheap to get the results you want without digging through the noise.

0.0 (0)

Pricing

$0.60 / 1,000 results

0

Total users

3

Monthly users

3

Runs succeeded

>99%

Last modified

9 days ago

Facebook Ad Library Scraper

This is a production-ready scraper for the Facebook Ad Library. Unlike other similar scrapers on Apify, it is intended to simplify the scraping output and make it much easier to handle when transferring data to your own application.

The output is designed to be exactly as seen on the initial facebook ad library page. Internal cards within each ad are ignored as they often result in duplicates, and only the individual ads displayed on the initial ad library page itself are included.

The scraper will output fewer ads than indicated on the results count of the facebook ad library page, because facebook counts all variations of all cards, whereas this scraper outputs only individual ads to maintain output quality. Having said this, duplicates are still unavoidable if duplicate ads are present on the ad library page itself.

This is also a superior scraper in terms of cost, running at $0.6 per 1000 records.

Inputs

These are the inputs that you can use to change the results of the scraper:

  • startUrls: This is an array of URLs of the facebook ad library pages that you want to scrape. For example, for Shopify, the Facebook ad library url as of writing is:

    https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=AU&is_targeted_country=false&media_type=all&search_type=page&view_all_page_id=20409006880

    Please note that any filters that you have active on the Facebook ad library page are included in the URL, and will therefor affect the results of your scrape.

  • maxResults: This is the maximum number of results that are to be returned by each URL listed in your startUrls array. Please note that this number is per URL, and not a total count. If any URL has less than maxResults ads available, the scraper will collect all ads available and move on to the next URL.

  • earliestStartDate: If earliestStartDate is included, then no ads with a start date before the earliestStartDate will be included in your results. Leave this as 0 to include all ads, regardless of start date.

Outputs

The output of this scraper is designed to be organized and easy to parse. It includes the following information:

  • pageId: The Page ID of the Facebook ad library page. This is a unique identifier for each page.

  • adId: The Library ID of the ad on the Facebook ad library page. This is a unique identifier for each ad.

  • startDate: The date that the ad was released.

  • endDate: The date that the ad stopped running. If the ad has no end date, this will be null.

  • description: The main description copy of the ad.

  • mediaType: Whether the ad is an Image or Video.

  • mediaUrl: The facebook-hosted url of the ad media asset.

  • platforms: The platforms where the ad is currently running. As of writing, this can be any combination of the following:

    • FACEBOOK
    • INSTAGRAM
    • AUDIENCE_NETWORK
    • MESSENGER
    • THREADS
  • action: An object containing the details of the call-to-action button of each ad. This includes four fields:

    • actionHeadline: The headline of the call-to-action.
    • actionDescription: The description of the call-to-action.
    • actionUrl: The URL shown on the call-to-action. This is also usually where the call-to-action directs to when clicked.
    • actionCTA: The actual call-to-action text, for example 'SHOP NOW'. This is always displayed on a button.

    Note that these call-to-action fields are not always all available. If some of them are present, but others are not, then those that are not will be null. If none of these fields are available, then the action object as a whole will be null.

  • active: Whether or not the ad is currently active.

Example Output:

[
{
"pageId": "127674127382761",
"adId": "701406655778205",
"startDate": "5/8/2025",
"endDate": null,
"description": "your fave lounge just got an upgrade 🌸🩵",
"mediaUrl": "https://scontent-lga3-3.xx.fbcdn.net/v/t39.35426-6/495541029_1025834659133013_7156709320435889824_n.jpg?_nc_cat=110&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=M5M1ykpD6rAQ7kNvwFO5AHm&_nc_oc=AdnvX0fNY8wT9i6oIvTcyYdPndmJ8FYV4vktkc2W-3-O84RCg2DQLAVapRKHKh9BO9Q&_nc_zt=14&_nc_ht=scontent-lga3-3.xx&_nc_gid=0fdRyO4CHLHLomtaZfoTtw&oh=00_AfNJ1i9_48Q97vimBZm9SKCcun0wWlHwB8TWPRWm0n6GiA&oe=685022CD",
"mediaType": "Image",
"platforms": [
"FACEBOOK",
"INSTAGRAM",
"AUDIENCE_NETWORK",
"MESSENGER"
],
"action": {
"actionHeadline": "OFFSTAGE",
"actionDescription": "White Fox Boutique",
"actionUrl": "https://whitefoxboutique.com.au/collections/offstage?utm_source=meta_au&utm_medium=paidsocial&utm_campaign=offstagesummerbasics",
"actionCTA": "Shop Now"
},
"active": true
},
{
"pageId": "127674127382761",
"adId": "977608501251082",
"startDate": "5/6/2025",
"endDate": null,
"description": "pov: you found THE holiday wardrobe 🦀🧡",
"mediaUrl": "https://scontent-lga3-1.xx.fbcdn.net/v/t39.35426-6/494643411_982227887447023_1882870047862209879_n.jpg?_nc_cat=111&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=R1-V-ftLHKkQ7kNvwFAQ0mj&_nc_oc=Adnhh_SdkG5LOp5f0pYATcD9gY_jbS0Z_s99Jsp8TZOLFm-eE7gh7c-nLQZDnDUpnYc&_nc_zt=14&_nc_ht=scontent-lga3-1.xx&_nc_gid=0fdRyO4CHLHLomtaZfoTtw&oh=00_AfNP_nLMkt6yLzIpqrwmIU0P97A3eVKlx3RDD8OlU77EEQ&oe=68501DF1",
"mediaType": "Image",
"platforms": [
"FACEBOOK",
"INSTAGRAM",
"MESSENGER"
],
"action": {
"actionHeadline": "Casa Caliente\n",
"actionDescription": "Euro Summer starts here",
"actionUrl": "https://whitefoxboutique.com.au/collections/casa-caliente?utm_source=meta_au&utm_medium=paidsocial&utm_campaign=casacaliente",
"actionCTA": "Shop Now"
},
"active": true
},
]