Facebook Ads Scraper

  • apify/facebook-ads-scraper
  • Modified
  • Users 1.4k
  • Runs 13.5k
  • Created by Author's avatarApify

Extract advertising data from one or multiple Facebook Pages. Get page details, reach estimates, publisher platforms, report count, number of impressions, ad IDs, timestamps, and more. Download Facebook ads data in JSON, CSV, and Excel and use it in apps, spreadsheets, and reports.

Pay $5.00 for 1,000 Campaigns

Facebook Ads Scraper

Pay $5.00 for 1,000 Campaigns

What is Facebook Page Ads Scraper?

It's a simple and powerful tool that allows you to extract data from Facebook ads. To get that data, just insert the Facebook page URL and click "Save & Start" button.

What Facebook pages ads data can I extract?

With this Facebook API, you will be able to extract the following data from Facebook:

📝 Page details🔗 Page URL
🛍 Ad text, type, URL and title 💸 Ad spend
⏱ Timestamps 🌄 Images
🖱 CTA type🧮 Report count
👀 Reach estimates📢 Publisher platforms

Why scrape Facebook page ads?

💪 Competition intelligence

🕵️ Market research or analysis

📈 Monitoring trends and brand sentiment

🤳 Social media analysis

🥸 Identifying hot spots of misinformation

How do I use Facebook Ads Scraper?

Facebook Page Ads Scraper was designed to be easy to start with even if you've never extracted data from the web before. Here's how you can scrape Facebook data with this tool:

  1. Create a free Apify account using your email.
  2. Open Facebook Page Ads Scraper.
  3. Add one or more Facebook page URLs to scrape its ads or Ads URLs.
  4. Click "Start" and wait for the data to be extracted.
  5. Download your data in JSON, XML, CSV, Excel, or HTML.

For a step-by-step guide on how to scrape Facebook Page Ads, follow our Facebook Page Ads Scraper tutorial 📝.

Please note that this scraper displays the extracted results only at the very end of the run. The rest of the time it will display 0 results. Please be patient until the end of the scraper run to see all the extracted data.


The input for Facebook Ads Scraper should be either

  • Facebook Page URLs such as https://www.facebook.com/drive4quantix/
  • or Facebook Ads URLs such as https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=ALL&q=%7B%7D&sort_data[direction]=desc&sort_data[mode]=relevancy_monthly_grouped&start_date[min]=2022-10-12&start_date[max]=&search_type=keyword_unordered&media_type=video. You can find the long Facebook Ads URL in Facebook Ad Library. Before you copy&paste this URL, don't forget to include settings, filters and the amount of scrolls for ads per page.
  • Note that zero scrolls will return the initial set of ads. Each scroll is expected to return 30 ads. Facebook limits the max amount of ads displayed per page, so some older ads might not be available.

Click on the input tab for a full explanation of input in JSON.

{ "startUrls": [ { "url": "https://www.facebook.com/SHEINOFFICIAL" } ], "scrollsAmount": 4 }

Output sample

The results will be wrapped into a dataset which you can find in the Storage tab. Here's an excerpt from the JSON dataset you'd get if you apply the input parameters above. You can choose in which format to download your Facebook data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

[{ "adid": "0", "adArchiveID": "1298602714065085", "archiveTypes": [ 1 ], "categories": [ 0 ], "collationCount": 1, "collationID": 1535040990319522, "currency": "", "endDate": 1680764400, "entityType": "regular_page", "fevInfo": null, "gatedType": "eligible", "hasUserReported": false, "hiddenSafetyData": false, "hideDataStatus": "NONE", "impressionsWithIndex": { "impressionsText": null, "impressionsIndex": -1 }, "isAAAEligible": false, "isActive": true, "isProfilePage": false, "pageID": "380039845369159", "pageInfo": null, "pageIsDeleted": false, "pageName": "SHEIN", "politicalCountries": [], "reachEstimate": null, "reportCount": null, "snapshot": { "ad_creative_id": "23853501580290642", "cards": [], "body_translations": {}, "byline": null, "caption": "play.google.com", "cta_text": "Install now", "dynamic_item_flags": {}, "dynamic_versions": null, "edited_snapshots": [], "effective_authorization_category": "NONE", "event": [], "extra_images": [], "extra_links": [], "extra_texts": [], "extra_videos": [], "instagram_shopping_products": [], "display_format": "image", "title": "Celebramos DÍA S del 5 al 7 de cada mes", "link_description": "Meet the SHEIN app - Your one-stop shop at prices you'll Love!", "link_url": "http://play.google.com/store/apps/details?id=com.zzkko", "page_welcome_message": null, "images": [ { "original_image_url": "https://scontent-dfw5-1.xx.fbcdn.net/v/t39.35426-6/339909067_1366281674149524_839016310171111822_n.jpg?_nc_cat=105&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=ohKvhxvZu9wAX95Ssh6&_nc_ht=scontent-dfw5-1.xx&oh=00_AfAZ2JiQY_pYM6wrqP0Y6TJvrcYaP1VtswOes0rYvFF1Qg&oe=64334A64", "resized_image_url": "https://scontent-dfw5-1.xx.fbcdn.net/v/t39.35426-6/339572809_1631465734038300_7692943675119564941_n.jpg?stp=dst-jpg_s600x600&_nc_cat=111&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=xkUyRyowgOAAX_1X381&_nc_ht=scontent-dfw5-1.xx&oh=00_AfCF5JG9JiuBQAlcVoHf99HVB0QPPGfHNn9xk8xbXNvrDA&oe=64336E86", "image_crops": {} } ], "videos": [], "creation_time": 1680780538, "page_id": 380039845369159, "page_name": "SHEIN", "page_profile_picture_url": "https://scontent-dfw5-1.xx.fbcdn.net/v/t39.35426-6/339829931_549860997278610_316256852917459443_n.jpg?stp=dst-jpg_s60x60&_nc_cat=109&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=qYjLVyCauxoAX-F-uKG&_nc_ht=scontent-dfw5-1.xx&oh=00_AfBOn8V7BWyFcJ3cQp3ZNwKH0AhNe1bv7MV4UqHfTnftbA&oe=64332DC4", "page_categories": { "2209": "Clothing (Brand)" }, "page_entity_type": "regular_page", "page_is_profile_page": false, "instagram_actor_name": "SHEIN.COM", "instagram_profile_pic_url": "https://scontent-dfw5-2.xx.fbcdn.net/v/t39.35426-6/339893279_6031633613587805_5406372930440883094_n.jpg?_nc_cat=102&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=KR8ikQE-xdYAX_VESro&_nc_ht=scontent-dfw5-2.xx&oh=00_AfARBT4xR7FxAbzjRFrjG3iOam8JSyXbMxGDRpgKB5yitg&oe=6433FD0B", "instagram_url": "", "instagram_handle": "", "is_reshared": false, "version": 3, "body": { "context": {}, "markup": { "__html": "Una campaña especial llamada “DÍA S” se realizará del 5 al 7 de cada mes para agradecerles su apoyo." }, "callerHash": "91584ef3e37183a71399c913ead7a8c2" }, "brazil_tax_id": null, "branded_content": null, "current_page_name": "SHEIN", "disclaimer_label": null, "page_like_count": 27827577, "page_profile_uri": "https://www.facebook.com/SHEINOFFICIAL/", "page_is_deleted": false, "root_reshared_post": null, "cta_type": "INSTALL_MOBILE_APP", "additional_info": null, "ec_certificates": null, "country_iso_code": null, "instagram_branded_content": null }, "spend": null, "startDate": 1680764400, "stateMediaRunLabel": null, "publisherPlatform": [ "facebook", "instagram", "audience_network", "messenger" ], "menuItems": [], "endDateFormatted": "2023-04-06T07:00:00.000Z", "startDateFormatted": "2023-04-06T07:00:00.000Z" }, { "adid": "0", "adArchiveID": "255511376905800", "archiveTypes": [ 1 ], "categories": [ 0 ], "collationCount": 2, "collationID": 3368857446776324, "currency": "", "endDate": 1680764400, "entityType": "regular_page", "fevInfo": null, "gatedType": "eligible", "hasUserReported": false, "hiddenSafetyData": false, "hideDataStatus": "NONE", "impressionsWithIndex": { "impressionsText": null, "impressionsIndex": -1 }, "isAAAEligible": false, "isActive": true, "isProfilePage": false, "pageID": "380039845369159", "pageInfo": null, "pageIsDeleted": false, "pageName": "SHEIN", "politicalCountries": [], "reachEstimate": null, "reportCount": null, "snapshot": { "ad_creative_id": "23854209337050318", "cards": [ { "original_image_url": "https://scontent-dfw5-1.xx.fbcdn.net/v/t39.35426-6/340085024_900467907842792_2058670623938543832_n.jpg?_nc_cat=103&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=fQdFXh1oMVUAX8L3ZAZ&_nc_ht=scontent-dfw5-1.xx&oh=00_AfD-uo3EJJC9cvyQZL1NEpRVGVtJqKKqD8HWxCIA2aWvFw&oe=6434B334", "resized_image_url": "https://scontent-dfw5-2.xx.fbcdn.net/v/t39.35426-6/339997754_914287486443941_556512467268781020_n.jpg?stp=dst-jpg_s600x600&_nc_cat=108&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=OFUkkZwekA4AX87ND8l&_nc_ht=scontent-dfw5-2.xx&oh=00_AfDt20etbNFo4K0C3g76ElSG0T3U0ygwMZ4J1A0bkzRUoQ&oe=64332195", "image_crops": {}, "body": " ", "caption": "m.shein.co.uk", "cta_type": "INSTALL_MOBILE_APP", "cta_text": "Install Now", "title": "So Many Options", "link_description": " ", "link_url": "http://play.google.com/store/apps/details?id=com.zzkko" }, { "original_image_url": "https://scontent-dfw5-1.xx.fbcdn.net/v/t39.35426-6/340085355_514770540860988_4018281338420390688_n.jpg?_nc_cat=110&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=fROHXKPeMYUAX9nebEN&_nc_ht=scontent-dfw5-1.xx&oh=00_AfCCMhCjFASYSf_wWDLe6uqleEwp9cW5vGYnnQF_n_AjOw&oe=6432F668", "resized_image_url": "https://scontent-dfw5-1.xx.fbcdn.net/v/t39.35426-6/340236375_909027907007839_6770418461945907370_n.jpg?stp=dst-jpg_s600x600&_nc_cat=103&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=nCu05B76AHcAX-_dp1I&_nc_ht=scontent-dfw5-1.xx&oh=00_AfCD1zWavbIBJtt2oX6rCZS8rw4ERnBtX-eKne8Q__Z8qQ&oe=6433BF7C", "image_crops": {}, "body": " ", "caption": "m.shein.co.uk", "cta_type": "INSTALL_MOBILE_APP", "cta_text": "Install Now", "title": "Make A Difference", "link_description": " ", "link_url": "http://play.google.com/store/apps/details?id=com.zzkko" }, { "original_image_url": "https://scontent-dfw5-1.xx.fbcdn.net/v/t39.35426-6/339110630_1224693641500600_1903506660817988699_n.jpg?_nc_cat=110&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=jwe3ks2kf64AX83rkFs&_nc_ht=scontent-dfw5-1.xx&oh=00_AfDwfamjO8_TFEYJ1aDB-1GF38akOJ-WEwFwCsEBOJw2Eg&oe=64340DB0", "resized_image_url": "https://scontent-dfw5-2.xx.fbcdn.net/v/t39.35426-6/340087272_2408407416003995_8671815936920715800_n.jpg?stp=dst-jpg_s600x600&_nc_cat=106&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=aY9pCNC8LwIAX_jx_kp&_nc_ht=scontent-dfw5-2.xx&oh=00_AfAvr8Fd574sanAS-aPXz8PXo_TNEnFXgpUDPwdbzkpmsQ&oe=64339AF9", "image_crops": {}, "body": " ", "caption": "m.shein.co.uk", "cta_type": "INSTALL_MOBILE_APP", "cta_text": "Install Now", "title": "Shop New Arrivals", "link_description": " ", "link_url": "http://play.google.com/store/apps/details?id=com.zzkko" }, { "original_image_url": "https://scontent-dfw5-1.xx.fbcdn.net/v/t39.35426-6/339135641_783137396218248_6756980895657331924_n.jpg?_nc_cat=101&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=K2wFcGVfClsAX9sLtZl&_nc_ht=scontent-dfw5-1.xx&oh=00_AfB6UIHUZnRPe9ezziilTttDpvaQ3gmAjANy34K7pHJiWw&oe=6433B68D", "resized_image_url": "https://scontent-dfw5-2.xx.fbcdn.net/v/t39.35426-6/339994838_904640110847987_4448732498877358855_n.jpg?stp=dst-jpg_s600x600&_nc_cat=104&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=7Z11TUyV1UgAX-2knpe&_nc_ht=scontent-dfw5-2.xx&oh=00_AfCq82AClxL1wn6Uap922zDRZK59VKsuuCLlxmABf4jYKA&oe=6433C7E3", "image_crops": {}, "body": " ", "caption": "m.shein.co.uk", "cta_type": "INSTALL_MOBILE_APP", "cta_text": "Install Now", "title": "View More", "link_description": " ", "link_url": "http://play.google.com/store/apps/details?id=com.zzkko" }, { "original_image_url": "https://scontent-dfw5-2.xx.fbcdn.net/v/t39.35426-6/339926963_714868850337086_3255916530856347542_n.jpg?_nc_cat=106&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=jqWr9xYKyYQAX9HhrjK&_nc_ht=scontent-dfw5-2.xx&oh=00_AfAaXYxRcuCEA_z6Xdk0ba-29vM7j9uLikqI5uwepfqBFg&oe=64346260", "resized_image_url": "https://scontent-dfw5-1.xx.fbcdn.net/v/t39.35426-6/340124563_948685596155243_3341265228868994529_n.jpg?stp=dst-jpg_s600x600&_nc_cat=105&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=sXQ6MB1KK28AX-HN8no&_nc_ht=scontent-dfw5-1.xx&oh=00_AfBmUOvNT-ZOjIGg9SX2duqXXMB7sJ7lQgyn6K3IQDU-Eg&oe=6432EE3A", "image_crops": {}, "body": " ", "caption": "m.shein.co.uk", "cta_type": "INSTALL_MOBILE_APP", "cta_text": "Install Now", "title": "Wait There's More", "link_description": " ", "link_url": "http://play.google.com/store/apps/details?id=com.zzkko" } ], "body_translations": {}, "byline": null, "caption": "play.google.com", "cta_text": "Install now", "dynamic_item_flags": {}, "dynamic_versions": null, "edited_snapshots": [], "effective_authorization_category": "NONE", "event": [], "extra_images": [], "extra_links": [], "extra_texts": [], "extra_videos": [], "instagram_shopping_products": [], "display_format": "carousel", "title": "New Fashion Experience", "link_description": null, "link_url": "http://play.google.com/store/apps/details?id=com.zzkko", "page_welcome_message": null, "images": [], "videos": [], "creation_time": 1680775116, "page_id": 380039845369159, "page_name": "SHEIN", "page_profile_picture_url": "https://scontent-dfw5-2.xx.fbcdn.net/v/t39.35426-6/340029473_944543710307195_3023501245840356205_n.jpg?stp=dst-jpg_s60x60&_nc_cat=108&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=V8nD8UhK7IkAX-xOAL4&_nc_ht=scontent-dfw5-2.xx&oh=00_AfDCazll-RanJWkfoDfAp3-fNL1kHiVAIQx4MYmwIo9qGA&oe=6432EFBD", "page_categories": { "2209": "Clothing (Brand)" }, "page_entity_type": "regular_page", "page_is_profile_page": false, "instagram_actor_name": "SHEIN.COM", "instagram_profile_pic_url": "https://scontent-dfw5-1.xx.fbcdn.net/v/t39.35426-6/340140663_137615865764776_3134383454797964740_n.jpg?_nc_cat=101&ccb=1-7&_nc_sid=cf96c8&_nc_ohc=frG_Ik-gtzkAX8dtble&_nc_ht=scontent-dfw5-1.xx&oh=00_AfA-7CpSUfWi7yg97PmaTQ3Kud0qc4f6u4GJu8mXxmLTBg&oe=6434094E", "instagram_url": "", "instagram_handle": "", "is_reshared": false, "version": 3, "body": { "context": {}, "markup": { "__html": "Be Your Own Stylist!<br /> New Clothing Arrivals<br /> Create Your Own Style" }, "callerHash": "91584ef3e37183a71399c913ead7a8c2" }, "brazil_tax_id": null, "branded_content": null, "current_page_name": "SHEIN", "disclaimer_label": null, "page_like_count": 27827577, "page_profile_uri": "https://www.facebook.com/SHEINOFFICIAL/", "page_is_deleted": false, "root_reshared_post": null, "cta_type": "INSTALL_MOBILE_APP", "additional_info": null, "ec_certificates": null, "country_iso_code": null, "instagram_branded_content": null }, "spend": null, "startDate": 1680764400, "stateMediaRunLabel": null, "publisherPlatform": [ "facebook", "instagram", "audience_network", "messenger" ], "menuItems": [], "endDateFormatted": "2023-04-06T07:00:00.000Z", "startDateFormatted": "2023-04-06T07:00:00.000Z" }, ...

Please note that startDate and endDate when-if available will be added as formatted ISO values as startDateFormatted: "2022-10-12T07:00:00.000Z" and endDateFormatted: "2022-10-12T07:00:00.000Z"

How many results can you scrape with Facebook Ads Scraper?

Facebook Ads Scraper can return hundreds of results on average. However, you have to keep in mind that scraping facebook.com has many variables to it and may cause the results to fluctuate case by case. There’s no one-size-fits-all-use-cases number. The maximum number of results may vary depending on the complexity of the input, location, and other factors. Some of the most frequent cases are:

  • website gives a different number of results depending on the type/value of the input
  • website has an internal limit that no scraper can cross
  • scraper has a limit that we are working on improving

Therefore, while we regularly run Actor tests to keep the benchmarks in check, the results may also fluctuate without our knowing. The best way to know for sure for your particular use case is to do a test run yourself.

How much will scraping Facebook Ads cost you?

When it comes to scraping, it can be challenging to estimate the resources needed to extract data as use cases may vary significantly. That's why the best course of action is to run a test scrape with a small sample of input data and limited output. You’ll get your price per scrape, which you’ll then multiply by the number of scrapes you intend to do.

Watch this video for a few helpful tips. And don't forget that choosing a higher plan will save you money in the long run.

Want to scrape Facebook comments or groups?

You can use the dedicated scrapers below if you want to scrape specific Facebook data. Each of them is built particularly for the relevant Facebook scraping case be it a group, reviews, comments or photos. Feel free to browse them:

🗓 Facebook Events Scraper 💬 Facebook Comments Scraper
📝 Facebook Posts Scraper👥 Facebook Groups Scraper
🌟 Facebook Reviews Scraper🚩 Facebook Pages Scraper

Not your cup of tea? Build your own scraper

Facebook Ads Scraper doesn’t exactly do what you need? You can always build your own! We have various scraper templates in Python, JavaScript, and TypeScript to get you started. Alternatively, you can write it from scratch using our open-source library Crawlee. You can keep the scraper to yourself or make it public by adding it to Apify Store (and find users for it).

Or let us know if you need a custom scraping solution.

Integrations and Facebook Ads Scraper

Last but not least, Facebook Ads Scraper can be connected with almost any cloud service or web app thanks to integrations on the Apify platform. You can integrate with Make, Zapier, Slack, Airbyte, Asana, GitHub, Google Sheets, Google Drive, and more.

You can also use webhooks to carry out an action whenever an event occurs, e.g., get a notification whenever Facebook Ads Scraper successfully finishes a run.

Using Facebook Ads Scraper with the Apify API

The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify actors. The API also lets you access any datasets, monitor actor performance, fetch results, create and update versions, and more. To access the API using Node.js, use the apify-client NPM package. To access the API using Python, use the apify-client PyPI package.

Check out the Apify API reference docs for full details or click on the API tab for code examples.

Our Facebook scrapers are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. However, you should be aware that your results could contain personal data. You should not scrape personal data unless you have a legitimate reason to do so.

If you're unsure whether your reason is legitimate, consult your lawyers. You can also read our blog post on the legality of web scraping and ethical scraping.

Your feedback

We’re always working on improving the performance of our Actors. So if you’ve got any technical feedback for Facebook Ads Scraper or simply found a bug, please create an issue on the Actor’s Issues tab in Apify Console.