How to extract all data from Facebook Ads

Learn how to extract advertising data from Facebook Ads at scale by using Facebook Ads Library Scraper.

The Meta Ad Library serves as a public archive of all ads that run on Facebook and its associated platforms. If you want to scrape data from the Ad Library, Meta makes it possible through the Marketing API and the Ad Library API, but only with approved access and strict limits. Since ads are dynamically loaded through JavaScript, often after user interaction or scrolling, they're hard to detect with generic HTML scrapers.

With Apify Facebook Ads Scraper, you don’t need to build a Meta app, request approvals, or juggle tokens just to research ads. Proxies, CAPTCHAs, and human behavior emulation are handled for you. The Actor can also be connected with almost any cloud service or web app, including Make, Zapier, Asana, Google Drive, and more.

ℹ️
Apify is the largest marketplace of tools for AI, with 30,000 Actors that automate everything from filling out web forms and sending emails to crawling millions of pages and transforming large datasets.

Actors have access to platform features such as built-in proxy management, anti-bot evasion support, integrated storage with structured CSV/Excel/JSON exports, and standardized input parameters (URLs, keywords, limits, etc.).

Step-by-step guide to scraping Facebook Ads


Step 1. Go to Facebook Ads Library Scraper

Find Facebook Ads Library Scraper on Apify Store and try it for free. Apify provides $5 in free usage every month on the Free plan, meaning you can scrape up to 1,000 ads for free. If you don’t have an Apify account yet, it’s easy to sign up with your GitHub or email account from any provider. You’ll enter Apify Console, a workspace to run or build automation tools for any website, including Facebook.

Creating a free account with third-party sign-ins
Sign up to enter Apify Console

Step 2. Configure the Actor

Decide which Facebook Page you want to extract advertising data from. You can use either Facebook Page URLs or Facebook Ads URLs as your starting point.

Scraping ads from a Facebook page

Head over to facebook.com, find the Facebook page of the brand or public figure whose ads you’re interested in, and copy their page URL(s). This method is the easiest since you don’t have to search for the ads themselves; a page is all you need. For our example, we’ll use Polaroid’s Facebook Page.

Polaroid Facebook Page
Polaroid Facebook homepage

Scraping ads from the Ads Library

Alternatively, head over directly to the Ads Library. Facebook ads are publicly available, so you don’t need any special access to see the ads running presently, for any brand. This method works well if you need to narrow down your search: You get to pick the country, type, and filter the results by keyword before scraping them.

With Facebook Ads Library Scraper, you can easily collect all Meta advertising data - from Facebook, Instagram, WhatsApp, Threads, and Messenger, just as you would manually, while filtering Ads Library results:

Meta Ads Library filtering options
Meta Ads Library filtering options

Pick the location, ad type, and brand you’re interested in:

Meta Ads Library search options
Search for the brand you want to scrape

Once done, copy the Ads Library URL.

Meta Ads Library results page
Copy the Ads Library URL

Now paste the Facebook page/Library Ads URL into the scraper. You can also set up how many ads you want to scrape or decide on the activity status of the scraped ads.

Facebook Ads Scraper configuration
Facebook Ads Scraper UI with initial setup

Step 3. Run the scraper by clicking Start

Click Save & Start to run the scraper. After a couple of minutes, the run will finish, and you’ll be able to check the results in the preview table.

Facebook Ads Scraper run finished successfully
Facebook Ads Scraper finished running

Step 4. Download your Facebook Ads data

You can download Facebook data in several formats, including JSON, CSV, and Excel. You can customize your export and exclude fields you’re not interested in, reducing the information noise.

Export dataset screen with various download options
Download your data

Step 5 (optional). Send data to Google Sheets

You can also send ads directly to your Google Drive. Go back to the Actor's page and select the Integrations tab. Start typing “GDrive” in the search bar, and select the Upload results to GDrive integration.

Actor page Intergrations tab in Apify Console
Find the integration you need

Give the integration a unique name. In our example, we’ll use Facebook Ads - Polaroid. Click Save to continue and connect your Google account. If you’re using your Google account with Apify Console, your email address might already be on the list of accounts to select.

Since we want the data to be sent to the spreadsheet once the scraper finishes running, we’ll select Run succeeded as our starting point. Select a format of the Google Drive file that the Apify integration will create (we’ll go with the XLSX) and click Save.

The intergration set up and ready to start
Configure the integration

The workflow is ready - from now on, every time you run a scraping session, a new file with scraped results will be created in your Google Drive automatically, ready to analyze and compare over time.

You can check if the integration is set up correctly by refreshing the Integrations tab.

Integrations enabled in Apify Console

Step 6 (optional). Schedule automated runs

If you want to scrape Facebook ads regularly, you can schedule the Ac to run automatically and collect data without manual input.

First, make sure your scraper is properly configured, then click the Save as a new task button in the top-right corner.

Give your task a name and save it.

Now, you can easily schedule the task by accessing Schedules in the left-hand navigation and clicking the Create a schedule button:

Creating a schedule

We’ve already saved our task, so now it’s time to add it to the schedule. Click Add task at the bottom to customize your schedule, select a task, and choose how often you want the scraper to run - daily, weekly, monthly, or on any day that works best for you. Click Save & enable to complete your setup.

Using data from Facebook Ads

The Meta Ad Library is a public, searchable record of nearly every ad running across Meta's platforms, which makes it one of the most useful free resources for understanding how brands talk to their audiences. You can study tactics, messaging, and (for political and social issue ads) spending across marketing, journalism, research, and politics. With Facebook Ads Library Scraper, you can:

  • Get details about each ad: activity timeframe, advertiser, location, format, and more.
  • Search for ads from a particular advertiser to see how top brands are reaching your audience.
  • Use any keyword you want, or even target a specific country or ad type.

Here's what that data looks like in practice:

Track your competitors

See which ads a competitor is running right now, how long each one has been live, and how often they refresh their creative. An ad that's stayed active for months is usually one that converts.

Store the best creative examples

Every ad in the library comes with its copy, format (image, video, or carousel), and call to action. Pull a batch from the brands you admire, and you have an archive of hooks, offers, and landing pages to study before your next campaign.

Run the scraper on a whole category instead of a single brand, and patterns start to surface: seasonal pushes, new product launches, and shifts in promotional messaging across competitors.

Support research, journalism, and reporting

For political and social issue ads, the library also exposes reach estimates, report counts, and (in many regions) spend ranges and funding entities. Journalists can trace who's paying to influence an election, and researchers can study ad targeting at scale.

Because Facebook Ads Library Scraper connects to tools like Make, Zapier, Google Sheets, and Slack, you can route fresh ad data into the reports and dashboards your team already uses.

Start collecting and analyzing ads

That's the whole workflow: find the Facebook page or Ads Library URL you care about, paste it into Facebook Ads Library Scraper, run it, and export the results to JSON, CSV, or Excel. No Meta app, no API approvals, no tokens.

If you're trying to get specific Facebook data, such as comments or page reviews, Apify Store offers many ready-to-use Actors specifically designed to scrape Facebook. They are all free to try out.

Apify logo
Largest marketplace of tools for AI
30,000+ Actors to automate your business. Get real-time web data, track competitors, generate leads, monitor social media, and integrate your apps and agents.
Browse Facebook scrapers
On this page

Publish and earn on Apify Store

The largest marketplace of tools for AI

Start here