ParseForge Scrapers

Facebook Ads Library Scraper

parseforge/facebook-ads-library-scraper

Social mediaDeveloper toolsE-commerce

Scrape Facebook Ads Library to track competitors' ad creatives, copy changes, and ad activity.

Run this scraper See the API call
Total users
45
Monthly active
5
Total runs
27.2K
Bookmarked
1
Rating
Not rated yet
Last modified
14 hours ago

Overview

ParseForge

Facebook Ads Library Scraper

Scrape Facebook Ads Library for any advertiser, keyword, or page, up to a million ads per run. Each ad comes with its creative, copy, impressions, spend, and demographic reach. No API key or login required. Export to CSV, JSON, Excel, or XML.

The Facebook Ads Library is the definitive public record of ads running across Meta platforms, but manually searching and copying data from it is slow and doesn't scale. This Facebook Ads Library scraper reads the public ad archive directly, filtering by advertiser, keyword, country, active status, media type, and date range, and returns every matching ad in one consistent, flat schema.

Who uses it What they scrape Facebook Ads Library for
Market researchers Benchmark competitor ad creative and messaging strategies across different countries.
Political transparency groups Archive and analyze political and issue-based ad campaigns, including spend and reach.
E-commerce brand managers Monitor competitor product launches and promotional tactics on Facebook and Instagram.
Ad agencies Build a searchable database of high-performing ad examples for creative inspiration.

What it does

This Actor collects ads from the Facebook Ads Library by advertiser page ID, keyword search, or direct URL, and returns each one as a flat row with its creative details, copy, and performance ranges.

  • ๐Ÿ” Advertiser or keyword search: Find ads by entering a Facebook Page ID or a free-text keyword phrase.
  • ๐ŸŒ Country and platform filters: Target ads by the country they reached and the Meta platform they appeared on, including Facebook, Instagram, Messenger, and WhatsApp.
  • ๐Ÿ“… Date range control: Limit results to ads that started within a preset period like the last 7 days, or set a custom start and end date.
  • ๐ŸŽฌ Media type selection: Filter for image ads, video ads, memes, or ads with no media at all.
  • ๐Ÿท๏ธ Run tagging: Add a custom tag to every row in a run so you can track which dataset came from which campaign.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with Facebook Ads Library data

๐Ÿ“ˆ Monitor competitor ad strategy.

A market researcher enters a competitor's Facebook Page ID and the US country code to collect every active ad, then analyzes the creative themes and copy angles the brand is testing this quarter.

๐Ÿ—ณ๏ธ Archive political ad campaigns.

A transparency watchdog searches for political and issue ads by keyword, filters for the last 90 days, and exports a CSV of ad spend ranges and impression counts for a public report.

๐Ÿ›๏ธ Track product launches across markets.

An e-commerce manager scrapes ads for a keyword like 'wireless earbuds' across the US, GB, and DE to see which features competitors are highlighting in each region.

๐ŸŽจ Build a creative swipe file.

An agency creative director runs a search for video ads from a set of admired brands, filters for active ads only, and downloads the results to build an inspiration library for the next pitch.

Why choose this scraper

What you get
No official API needed Access the public Facebook Ads Library without app registration, OAuth, or rate limits.
Full ad transparency data Get spend and impression ranges, demographic reach, and the platforms each ad ran on.
Multi-country targeting Search for ads that reached specific countries using 2-letter ISO codes.
Flexible output control Set a maximum number of ads to collect, from a 10-ad preview up to 1,000,000 per run.

How it compares

This Actor focuses on the public Facebook Ads Library archive, while other Facebook scrapers target organic page content or page metadata.

Feature ParseForge Facebook Ad Library Scraper Facebook Posts Scraper Facebook Pages Scraper
Scrapes the Facebook Ads Library Yes Yes Not listed Not listed
Filters by ad active status Yes Not listed Not listed Not listed
Filters by ad type (political, housing, etc.) Yes Not listed Not listed Not listed
Returns ad spend and impression ranges Yes Not listed Not listed Not listed
Returns demographic reach data Yes Not listed Not listed Not listed
Filters by country reached Yes Not listed Not listed Not listed

Configure the run

Drive the Actor from advertiser page IDs, keyword searches, and direct URLs, alone or together, and filters run as each ad is read so only matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

{
  "searchQuery": "coca cola",
  "adReachedCountries": [
    "US"
  ],
  "maxItems": 10
}

A larger pull:

{
  "searchQuery": "coca cola",
  "adReachedCountries": [
    "US"
  ],
  "maxItems": 200
}

Pricing

Pay-per-result: $0.025 per result collected. You pay only for the results written to your dataset.

Results collected Approximate cost
100 results $2.50
1,000 results $25.00
10,000 results $250.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the Facebook Ads Library Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to Facebook Ads Library through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/facebook-ads-library-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results?

Check that your search query or page ID is valid and that your filters, especially the Ad Active Status and Date Range, are not too restrictive. Try setting the status to 'All ads' and the date range to 'All time' to widen the net.

Why does the scraper stop after only 10 ads?

Free Apify accounts are limited to a 10-ad preview. Upgrade to a paid plan and set the Maximum ads field to a higher number to collect more results.

Why are my country filters not working as expected?

The first country code in your Ad Reached Countries list is used to initialize the browsing session. Make sure the first code is a primary market for your search, and use standard 2-letter ISO codes.

Why do I get an error when using both a search query and a page ID?

The search query and advertiser page ID fields are mutually exclusive. Use one or the other, not both in the same run.

FAQ

Question Answer
Do I need a Facebook account or API key to use this scraper? No. This Actor reads the public Facebook Ads Library interface directly. You do not need a Facebook account, an app registration, or any API key.
What data does the Facebook Ads Library scraper return? Each row includes the ad creative (images and videos), body text, page name, ad start and end dates, spend and impression ranges, demographic reach, and the platforms the ad appeared on.
Can I scrape ads from a specific Facebook page? Yes. Enter the advertiser's Facebook Page ID in the Advertiser Page ID field, and the Actor will return every ad from that page that matches your other filters.
How do I find a Facebook Page ID? You can often find a page's ID in the URL of its Facebook page, or by using a free online lookup tool. The ID is a numeric string, such as 14226545351 for Red Bull.
Can I filter ads by the country they reached? Yes. Use the Ad Reached Countries field with 2-letter ISO country codes like US, GB, or DE. The first country in your list is used to initialize the session.
Does this scraper collect political and issue ads? Yes. Set the Ad Type filter to 'Political and issue ads' to return only that category, or choose from housing, employment, and credit ad types as well.
Can I search for ads by a keyword phrase? Yes. Enter a keyword or phrase in the search query field. You can choose to match keywords in any order or as an exact phrase.
What is the maximum number of ads I can scrape in one run? Paid users can collect up to 1,000,000 ads per run. Free users are limited to a 10-ad preview to test the Actor before upgrading.
Can I filter ads by media type, like video only? Yes. The Media Type filter lets you select images, memes, videos, or a combination. You can also choose to return only ads with no media.
How do I export the scraped ad data? Your results are stored in Apify's dataset and can be exported in CSV, JSON, Excel, XML, or other formats directly from the run console.

Related actors

  • facebook-posts-scraper: Use this instead when you need organic page posts, reactions, and comments rather than paid ads from the Ad Library.
  • facebook-pages-scraper: Use this instead when you need page profile details like likes, followers, emails, and website URLs, not ad creatives.

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

โš ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Meta Platforms, Inc. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

Input

FieldTypeWhat it doesDefault
urls array List of Facebook Ad Library search URLs or Page URLs. Parameters from the URL are extracted automatically. You can also use Search Query or Advertiser Page ID instead. not set
searchQuery string Keyword or phrase to search for in ad content. Use this OR Advertiser Page ID: not both. coca cola
advertiserPageId string Facebook Page ID of an advertiser (e.g. 14226545351 for Red Bull). Use this OR Search Query: not both. not set
adReachedCountries array 2-letter ISO country codes (e.g. US, GB, DE). Use ALL to target all countries. First country is used for session init. ["US"]
adActiveStatus string (3 options) Filter by active/inactive status. active
adType string (5 options) Type of ads to retrieve. ALL
searchType string (2 options) How to match the search query. KEYWORD_UNORDERED
period string (6 options) Only keep ads whose start date falls within this window. Overridden by Start Date if both are set. not set
startDate string Only keep ads that started on or after this date (YYYY-MM-DD). Overrides Date Range if both are set. not set
endDate string Only keep ads that started on or before this date (YYYY-MM-DD). Optional. not set
mediaType string (6 options) Filter by the creative format of the ad. all
publisherPlatforms array Only return ads shown on these platforms. Leave empty for all platforms. not set
maxItems integer Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000 10
runTag string Add this value to a 'runTag' column in every output row. Useful for identifying runs. not set
requestDelayMs integer Delay between pagination requests in milliseconds. 500

Pricing

from $16.00 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.016 to $0.025

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST ยท run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~facebook-ads-library-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run Facebook Ads Library Scraper on Apify All scrapers