Facebook Ads Library avatar

Facebook Ads Library

Pricing

$0.50 / 1,000 results

Go to Apify Store
Facebook Ads Library

Facebook Ads Library

🧲 ONLY 0.5$/1000 Results : Scrape Facebook Ad Library at scale. Extract ads, creatives, videos, CTAs, links & platforms. Enable Ad Details for EU reach, demographics & audience targeting. Multi-URL, auto-pagination, MCP ready

Pricing

$0.50 / 1,000 results

Rating

5.0

(2)

Developer

Data Xplorer

Data Xplorer

Maintained by Community

Actor stats

0

Bookmarked

91

Total users

19

Monthly active users

7 days ago

Last modified

Share

🎯 Facebook Ads Library Scraper: Meta Ad Library Data, Reach, Demographics & Targeting

Scrape the Meta (Facebook) Ads Library without an API key. This Facebook Ads Library Scraper extracts competitor ads, creative assets, ad spend transparency, and detailed demographic reach into clean JSON, CSV, or Excel, ready for competitive intelligence, media planning, and creative research.

Whether you need competitor ad monitoring, audience targeting insights, EU reach & demographic breakdowns, or a creative swipe file, this tool collects and structures everything in one run. No login, no API key, no proxy setup, no maintenance on your side.

🎯 What can you use the Facebook Ad Library (Meta) Scraper for?

  • 🔍 Competitor intelligence: see which ads your competitors run right now, how their creative strategy evolves, which platforms, formats and calls to action they favour
  • 📊 Media buying & planning: analyze reach by age, gender, and country to benchmark or refine your own targeting
  • 🎨 Creative research: build a swipe file of high-performing creatives across formats (image, video, carousel) and study copy and CTA patterns
  • 🏢 Brand safety & compliance: track who runs ads mentioning your brand, audit payer and beneficiary transparency, detect unauthorized use of brand assets
  • 📈 Market research: compare advertising strategies across countries, industries and seasons
  • 🤖 AI agents & LLM workflows: feed structured ad data into your agents via MCP for automated competitive reporting

💎 Why choose this Facebook Ads Library Scraper?

  • 📄 Complete ad data: creative content, images, videos, CTAs, links, platforms, and publication dates in every run
  • 🔬 Ad Details mode: unlock EU reach, demographics, age × gender breakdowns, and targeting data on demand, at no extra cost
  • 🔁 Auto-pagination: fetches every page of results automatically, no manual scrolling, no missed ads
  • 🎯 Multi-URL support: scrape several pages, brands, or search queries in a single run
  • 🖼️ Smart media extraction: images, video thumbnails, and HD/SD video URLs across all ad formats
  • 🛡️ Anti-blocking built in: residential proxy enabled by default, nothing to configure
  • 💸 Simple pricing: one flat price per ad, the same on every Apify plan
  • 🤖 MCP-ready: use it as a tool for Claude, ChatGPT, or any AI agent via the Apify MCP Server

🔮 How it works

1. 🔗 Provide Ad Library URLs

Paste one or more Facebook Ad Library URLs. You can scrape:

  • A specific page's ads: use the view_all_page_id parameter
  • Search results: use the q keyword parameter
  • Filtered results: active or inactive ads, country, media type

2. 📦 Set your limit

maxAds is the maximum number of ads for each URL (default 100, 0 for unlimited). With two URLs and maxAds set to 100, you get up to 200 ads in total.

3. 🔬 Enable Ad Details (optional)

Turn on fetchDetails to enrich each ad with:

  • 📈 EU total reach
  • 👥 Demographic breakdowns (age × gender × country)
  • 🎯 Audience targeting (age range, gender, locations)
  • 💼 Payer & beneficiary transparency data

4. ⚡ Run & export

Results are pushed as the run progresses, so you can use the data before it finishes. Export to JSON, CSV, Excel, or pull it through the API.

💰 How much does it cost to scrape the Facebook Ads Library?

The Actor uses pay per result pricing. You pay for the ads saved in your dataset, and Apify platform usage is included.

What you getPrice
1,000 ads$0.50
  • The price is the same on every Apify plan, including the free plan.
  • There is no start fee and no minimum.
  • Ad Details are included: turning on fetchDetails does not change the price per ad.
Ads scrapedCost
100 ads$0.05
1,000 ads$0.50
10,000 ads$5.00
100,000 ads$50.00

Every Apify account receives free monthly credits, enough to test the Actor on your own searches before paying anything. To cap your spending, set a maximum cost per run in the run options, or keep maxAds low while you validate a query.

📋 Quick start

  1. Click Try for free to open the Actor in the Apify Console.
  2. Paste one or more Facebook Ad Library URLs (page or search).
  3. Set maxAds, and enable fetchDetails if you need reach and demographics.
  4. Click Start and download your data as JSON, CSV, or Excel.

Input parameters

ParameterTypeDefaultDescription
urlsarrayrequiredOne or more Facebook Ad Library URLs to scrape
maxAdsnumber100Maximum ads to scrape per URL (0 = unlimited)
fetchDetailsbooleanfalseFetch detailed reach, demographics and targeting for each ad
proxyConfigobjectResidentialProxy configuration. The default works for most runs

Input example: scrape a page's ads

{
"urls": [
{ "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=FR&view_all_page_id=434174436675167&media_type=all" }
],
"maxAds": 100,
"fetchDetails": false
}

Input example: search by keyword

{
"urls": [
{ "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=running%20shoes&media_type=all" }
],
"maxAds": 50,
"fetchDetails": false
}

Input example: with reach & demographics

{
"urls": [
{ "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=FR&view_all_page_id=434174436675167&media_type=all" }
],
"maxAds": 30,
"fetchDetails": true
}

Input example: several pages at once

Up to 100 ads from each page, so up to 200 ads in total:

{
"urls": [
{ "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=FR&view_all_page_id=434174436675167&media_type=all" },
{ "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&view_all_page_id=139594698297&media_type=all" }
],
"maxAds": 100,
"fetchDetails": false
}

✨ What you'll get

📋 Standard fields (always included)

FieldDescription
adArchiveIdUnique Facebook Ad Library ID
collationIdGroups ad variations together
pageNameAdvertiser page name
imagePreview image URL (or video thumbnail)
bodyTextAd copy / body text
titleAd title
publicationDateStart and end dates, as text and as timestamps
adVariationsNumber of creative variations
ctaTextCall-to-action button text (Learn More, Shop Now, etc.)
linkUrlDestination URL
isActiveWhether the ad is currently running
hasVideoWhether the ad contains video
platformsDistribution platforms (Facebook, Instagram, Messenger, Audience Network)
mediaTypeIMAGE, VIDEO, or TEXT
all_imagesAll image URLs found in the ad
all_videosAll video URLs (HD/SD)
graphql_rawThe full ad record as returned by Meta, for any field not listed above

🔬 Detail fields (when fetchDetails is enabled)

FieldDescription
audienceTargeting info: gender, age range (min/max), locations
reachTotal EU reach and breakdown by country, age range, and gender
payerEntity paying for the ad
beneficiaryEntity benefiting from the ad
details_rawThe full details record as returned by Meta

Output example: standard

A real ad, shortened (links cut for readability):

{
"adArchiveId": "1680430643516326",
"collationId": "",
"pageName": "Apple",
"image": "https://scontent.fsof9-1.fna.fbcdn.net/v/t39.35426-6/...",
"bodyText": "Autonomie et performances inouïes. Ouverture variable, meilleures photos par faible luminosité et plus de profondeur de champ.",
"title": "iPhone 18 Pro",
"publicationDate": {
"startDate": "2026-09-26T07:00:00.000Z",
"endDate": "2026-10-07T07:00:00.000Z",
"startDate_timestamp": 1790406000,
"endDate_timestamp": 1791356400
},
"adVariations": 0,
"ctaText": "Learn more",
"linkUrl": "https://www.apple.com/fr/iphone-18-pro/?cid=...",
"isActive": true,
"hasVideo": true,
"platforms": ["Facebook"],
"mediaType": "VIDEO",
"all_images": [],
"all_videos": ["https://video.fsof10-1.fna.fbcdn.net/o1/v/t2/f2/m366/..."]
}

Output example: with Ad Details

The same ad with fetchDetails enabled. Only the added fields are shown, and the breakdown is shortened:

{
"adArchiveId": "1680430643516326",
"audience": {
"gender": "All",
"age": { "min": 18, "max": 65 },
"locations": [
{ "name": "France", "type": "countries", "excluded": false }
]
},
"reach": {
"total": 1246012,
"breakdown": [
{ "country": "FR", "age_range": "18-24", "male": 18174, "female": 5427, "unknown": 243 },
{ "country": "FR", "age_range": "25-34", "male": 120468, "female": 31957, "unknown": 1044 }
]
},
"payer": "APPLE INC.",
"beneficiary": "APPLE INC."
}

📡 How to monitor a competitor's ads

  1. Search the brand on the Facebook Ad Library and copy the URL of its page (it contains view_all_page_id).
  2. Keep active_status=active in the URL to follow the ads that are running now.
  3. Run the Actor and save the configuration as a task.
  4. Add a schedule, for example every Monday.
  5. At each run, compare the adArchiveId values with those of the previous run: the ones you have not seen before are the new ads. publicationDate.startDate tells you the first day each one ran.
  6. Add a webhook or a Make or n8n scenario to get a message when a run finishes.

🔌 Can I use the scraper through the API?

Yes. Every run can be started from code with the Apify API, and the ads come back as JSON.

Python:

from apify_client import ApifyClient
client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("data_xplorer/facebook-ads-library").call(run_input={
"urls": [
{"url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=FR&view_all_page_id=434174436675167&media_type=all"},
],
"maxAds": 50,
"fetchDetails": False,
})
for ad in client.dataset(run["defaultDatasetId"]).iterate_items():
print(ad["adArchiveId"], ad["pageName"], ad["ctaText"], ad["isActive"])

Node.js:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });
const run = await client.actor('data_xplorer/facebook-ads-library').call({
urls: [
{ url: 'https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=FR&view_all_page_id=434174436675167&media_type=all' },
],
maxAds: 50,
fetchDetails: false,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const ad of items) console.log(ad.adArchiveId, ad.pageName, ad.ctaText, ad.isActive);

cURL (one request that starts the run and returns the ads):

curl -X POST "https://api.apify.com/v2/acts/data_xplorer~facebook-ads-library/run-sync-get-dataset-items" \
-H "Authorization: Bearer <YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"urls":[{"url":"https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=FR&view_all_page_id=434174436675167&media_type=all"}],"maxAds":20}'

🤖 Use the scraper with AI agents (MCP)

Through the Apify MCP server, assistants such as Claude, Cursor or VS Code can use this Actor as a tool. The agent chooses the page or the keyword, the Actor returns the ads as JSON, and the agent answers with real data from the Meta Ad Library.

Use this server URL to give your agent this Actor only:

https://mcp.apify.com?tools=data_xplorer/facebook-ads-library

Claude Code:

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

Cursor, VS Code and other MCP clients (MCP config file):

{
"mcpServers": {
"facebook-ads-library": {
"url": "https://mcp.apify.com?tools=data_xplorer/facebook-ads-library"
}
}
}

In Claude Desktop, add a custom connector with the same URL. You sign in to your Apify account the first time the tool is used.

Example prompts for ad research agents

  • "Get the active ads Apple runs in France and summarise the angles and calls to action they use."
  • "Fetch the 20 newest ads of this Ad Library page and tell me which ones use video."
  • "For this page, with ad details, which age group and gender saw its ads the most?"

Tips for agents

  • Keep maxAds low (20 to 50) so the answer fits in the agent's context.
  • Turn on fetchDetails only when the question is about reach, demographics or targeting.
  • Remember that maxAds applies to each URL, so one URL per question keeps the volume predictable.

💡 Pro tips

  • 🔥 For competitive analysis: use view_all_page_id to scrape every ad from a specific competitor page. Find the page ID by searching the brand in the Facebook Ad Library and checking the URL.
  • 📈 For demographic insights: enable fetchDetails: true for the full breakdown, invaluable for media planning.
  • 🌍 For multi-market analysis: run the same page ID across different country parameters to compare how a brand advertises in each market.
  • ⚡ For maximum speed: keep fetchDetails: false for fast bulk scraping, and enable it only when you need reach and demographic data.
  • 💰 For cost control: start with a small maxAds to validate your query, then scale up.
  • 🔄 For ongoing monitoring: schedule the Actor daily or weekly and combine it with webhooks, as described above.

🔒 Reliability & performance

  • Results delivered as the run progresses
  • Residential proxy rotation and anti-detection built in
  • Smart pagination and retry handling
  • Consistent output schema across single and multi-URL runs

🔗 Integrations

Connect this scraper to your favorite tools and automate your ad intelligence workflows:

Need more data sources for your projects? Check out our other fast, reliable scrapers:

  • 🎵 TikTok Ads Library FAST: competitor ads from the TikTok Ads Library, with targeting, reach by country and advertiser profiles.
  • 📢 TikTok Ads Scraper: TikTok Ads Library and Creative Center data in one Actor.
  • 💼 LinkedIn Ad Library Scraper: track B2B ad campaigns, targeting, and creatives from LinkedIn's Ad Library.
  • 📈 Google Trends Scraper: pair ad monitoring with search interest data to see whether a brand's ad push is moving demand.
  • 📰 Google News Scraper: track press coverage alongside ad activity for a full picture of a brand's market presence.

❓ Frequently asked questions (FAQ)

💰 How much does it cost?

$0.50 per 1,000 ads, on every Apify plan, with no start fee. Ad Details are included. See the pricing section above for examples.

📦 Does maxAds apply to each URL or to the whole run?

To each URL. If you paste 3 URLs and set maxAds to 100, the run can save up to 300 ads. To stay under a total, divide it by the number of URLs, or run one URL at a time.

Does Meta offer an official API for the Ad Library?

Meta's Ad Library API exists but requires approval, has rate limits, and returns limited fields. This Actor gives you the same public data (creatives, targeting, reach, payer and beneficiary) in clean JSON, CSV, or Excel, without an approval process or quota management.

How do I scrape all ads from a specific competitor?

Search for the brand on the Facebook Ad Library website, copy the URL (it includes view_all_page_id), and paste it into the urls input. Set maxAds to 0 to go through every ad the page is running.

Can I get reach and demographic data, not just creatives?

Yes. Enable fetchDetails: true. Each ad is enriched with EU total reach and a full breakdown by country, age range, and gender, plus targeting (age, gender, locations) and payer and beneficiary transparency data.

Does this only cover the EU, or global ads too?

Ad creatives (copy, images, videos, CTAs) are available globally. Reach and demographic breakdowns are provided for ads shown in the EU, in line with what Meta's Ad Library transparency requirements expose.

Can I search by keyword instead of a specific page?

Yes. Use a Facebook Ad Library search URL with the q parameter (for example q=running shoes) instead of view_all_page_id, and the Actor will scrape the matching search results.

What are graphql_raw and details_raw?

They hold the complete records returned by Meta for each ad (graphql_raw) and for its details (details_raw, only with fetchDetails). Use them if you need a field that is not in the cleaned columns. If you export to CSV or Excel, you can leave these two columns out.

Can I monitor a competitor automatically and get alerted on new ads?

Yes. See the monitoring section above: schedule the Actor, compare adArchiveId values between runs, and connect a webhook, Make or n8n to be notified.

The Ad Library is a public transparency tool that Meta itself makes available for anyone to browse. This Actor only collects publicly visible data with no login required. That said, you are responsible for complying with Meta's terms and applicable data protection laws for how you use the results.

What are the best alternatives for cross-platform ad intelligence?

Combine this Actor with our TikTok Ads Library FAST and LinkedIn Ad Library Scraper to get a full picture of a brand's paid strategy across Meta, TikTok, and LinkedIn in one pipeline. See the Related Actors section above.

🤝 Support & resources

Need help or have a feature request? Open an issue on the Actor's Issues tab. We read and answer every one.

❤️ Did this scraper save you time? A short review helps other people find it: leave a review here.


Built with ❤️ for marketers, media buyers, and competitive intelligence professionals