Ultimate Facebook Ad Library Scraper avatar
Ultimate Facebook Ad Library Scraper

Pricing

$1.50 / 1,000 ads

Go to Apify Store
Ultimate Facebook Ad Library Scraper

Ultimate Facebook Ad Library Scraper

Scrape Facebook ad data to uncover market trends and competitor strategies – fast, lightweight, and designed to maximize your ad ROI.

Pricing

$1.50 / 1,000 ads

Rating

5.0

(1)

Developer

Abbas Meb

Abbas Meb

Maintained by Community

Actor stats

2

Bookmarked

12

Total users

8

Monthly active users

4 hours ago

Last modified

Share

Facebook Ad Library Scraper

Overview

The Facebook Ad Library Scraper is a powerful tool designed to extract ad data from the Facebook Ad Library. Whether you are a marketer, researcher, or business owner, this actor helps you gain insights into advertising strategies, creative trends, and competitor campaigns. It provides a reliable way to access public ad data for analysis and inspiration.

Features

  • Comprehensive Ad Extraction: Retrieve ads from any Facebook page or keyword search.
  • Flexible Filtering: Filter ads by active status, category (political, housing, employment, credit), and country.
  • Detailed Data: Get rich data including ad copy, creative details, start dates, and more.
  • Easy to Use: Supports both direct Ad Library URLs and Facebook Page URLs.

How to Use

You can use this scraper in two ways:

Method 1: Using a Facebook Page URL

If you want to scrape ads for a specific advertiser:

  1. Enter the Facebook Page URL (e.g., https://www.facebook.com/Google/) into the Target URL field.
  2. Configure the filters using the input fields:
    • Active Status: Choose between All, Active, or Inactive ads.
    • Ad Category: Select a specific category like Housing, Employment, or All.
    • Country: Specify the country to filter ads by (e.g., US, GB, BR).

If you prefer to set up your search directly on Facebook:

  1. Go to the Facebook Ad Library.
  2. Perform your search and apply any desired filters (country, category, keywords).
  3. Copy the URL from your browser's address bar.
  4. Paste it into the Target URL field in the actor input.
    • Note: When using this method, the actor will prioritize the filters in the URL over the input parameters (except for maxResults).

You can search for ads by keyword directly without needing a URL:

  1. Enter your keyword (e.g., Gaming Chair) directly into the Target URL field.
  2. The scraper will automatically detect that you've entered a keyword (not a URL) and search for ads containing those words.

Unordered Search (Default)

By default, keyword searches use unordered matching, which finds ads containing all the words in any order.

Example:

{
"targetUrl": "Gaming Chair",
"country": "US",
"activeStatus": "active"
}

This will find ads that contain both "Gaming" and "Chair" anywhere in the ad.

To search for an exact phrase, wrap your keyword in double quotes ("):

Example:

{
"targetUrl": "\"Gaming Chair\"",
"country": "US",
"activeStatus": "active"
}

This will only find ads that contain the exact phrase "Gaming Chair" in that order.

Tip: In JSON, you need to escape the double quotes with a backslash (\"). So "Gaming Chair" becomes \"Gaming Chair\" in your input.

Input Parameters

ParameterTypeDescription
Target URLStringA Facebook Page URL, Ad Library search URL, or a keyword to search for ads.
Max ResultsNumberThe maximum number of ads to scrape.
Active StatusSelectFilter for Active, Inactive, or All ads.
Ad CategorySelectFilter by category (e.g., Political, Housing, Employment).
CountrySelectFilter ads by specific country code (e.g., US, CA, ALL).

Output

The scraper stores the results in a dataset, which can be downloaded in various formats (JSON, CSV, Excel, etc.). Each item represents an ad and contains details such as:

  • Ad ID
  • Ad Creative (Images/Videos)
  • Ad Copy (Text)
  • Start Date
  • Publisher Platforms
  • And more...