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

101

Total users

13

Monthly active users

10 hours ago

Last modified

Features

Limited permissions

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: nothing to configure, the Actor handles connections for you
  • ๐Ÿ’ธ 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, keywords, or both

Search by URL: 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

Search by keyword: no URL needed. Type your keywords (a brand, a product, a topic) and pick the filters:

  • Country: pick it from the list, or all countries
  • Ad category: all ads, or social issues and politics, housing, employment, financial products (the categories offered depend on the country)
  • Ad status: active, inactive or all ads
  • Media type: images, videos, memes, or all
  • Platforms: Facebook, Instagram, Messenger, WhatsApp, Threads, Audience Network
  • Ad language: one or several languages
  • Dates: only ads shown between two dates
  • Sort: by relevance, most impressions first, or most recent first
  • Exact phrase: match the exact phrase instead of all the words in any order

Each keyword is a separate search. You can combine URLs and keywords in the same run.

2. ๐Ÿ“ฆ Set your limit

maxAds is the maximum number of ads for each URL and each keyword (default 100, 0 for unlimited). With two URLs, one keyword and maxAds set to 100, you get up to 300 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), or type keywords and pick a country.
  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
urlsarrayOne or more Facebook Ad Library URLs to scrape
keywordsarrayKeywords to search, one search per keyword
countrystringALLKeyword search: 2-letter country code, or ALL
adCategorystringallKeyword search: all, political_and_issue_ads, housing_ads, employment_ads or credit_ads
adStatusstringactiveKeyword search: active, inactive or all
mediaTypestringallKeyword search: all, image, video, meme, image_and_meme or none
platformsarrayallKeyword search: facebook, instagram, messenger, whatsapp, threads, audience_network
languagesarrayallKeyword search: language codes such as en, fr, de
dateFrom / dateTostringKeyword search: only ads shown between these dates (YYYY-MM-DD)
sortBystringrelevanceKeyword search: relevance, impressions or recent
exactPhrasebooleanfalseKeyword search: match the exact phrase
maxAdsnumber100Maximum ads to scrape per URL and per keyword (0 = unlimited)
fetchDetailsbooleanfalseFetch detailed reach, demographics and targeting for each ad

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, no URL

{
"keywords": ["running shoes", "trail running"],
"country": "US",
"adStatus": "active",
"mediaType": "video",
"platforms": ["instagram"],
"languages": ["en"],
"dateFrom": "2026-10-01",
"dateTo": "2026-10-31",
"sortBy": "impressions",
"maxAds": 50
}

Input example: search by keyword with a URL

{
"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 and each keyword, so one URL or one keyword 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
  • Anti-blocking built in, nothing to configure
  • 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, each keyword, or the whole run?

To each URL and each keyword. If you paste 3 URLs, or type 3 keywords, 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 and keywords, or run one 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