Facebook Ads Library Scraper
Pricing
Pay per event
Facebook Ads Library Scraper
Scrape Facebook Ad Library by keyword, advertiser, or country. Extract ad creatives, copy, links, images, videos, platforms, spend, and more. Flattened output — ready for spreadsheets. No login required.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Stas Persiianenko
Actor stats
0
Bookmarked
9
Total users
2
Monthly active users
a day ago
Last modified
Categories
Share
Scrape ads from the Facebook Ad Library at scale. Search by keyword, advertiser page URL, or browse by country. Extract ad creatives, copy, destination links, images, videos, spend data, and more — all in a flat, spreadsheet-ready format. No Facebook login required.
What does Facebook Ads Library Scraper do?
This actor searches the Facebook Ad Library and extracts structured data from every ad it finds. It uses a real browser (Playwright) to load the Ad Library page, intercepts the server-side rendered data, and outputs clean, flattened records you can immediately use in spreadsheets, databases, or downstream workflows.
Each search query returns up to 30 ads from the initial page of results. To collect more ads, use multiple search keywords or advertiser page URLs — the actor processes each one separately and combines all results into a single dataset.
Who is Facebook Ads Library Scraper for?
- Digital marketers — Research competitor ad strategies, discover winning ad creatives, and find inspiration for your own campaigns.
- Competitive intelligence teams — Monitor what competitors are advertising, how much they spend, and which platforms they target.
- Brand monitoring professionals — Track unauthorized use of your brand in ads, or monitor how partners represent your brand.
- Agencies — Audit client competitors' ad presence across Facebook, Instagram, Messenger, and Audience Network.
- Researchers & journalists — Analyze political advertising, track ad transparency, and study advertising trends at scale.
Why use Facebook Ads Library Scraper?
- No login required — The Facebook Ad Library is publicly accessible. No Facebook account needed.
- Structured output — All ad data is flattened into clean rows with consistent field names. Ready for Google Sheets, Excel, Airtable, or any database.
- Multiple search modes — Search by keyword, advertiser page URL, or both. Filter by country, ad status (active/inactive), and media type.
- Rich media extraction — Get direct URLs for ad images, videos, and video preview thumbnails.
- Spend and impressions data — When available, includes estimated spend ranges and impression counts.
- Platform breakdown — See which platforms each ad runs on (Facebook, Instagram, Messenger, Audience Network).
What data can you extract?
| Field | Type | Description |
|---|---|---|
adArchiveId | string | Unique Ad Library ID |
adLibraryUrl | string | Direct link to the ad in Ad Library |
pageId | string | Facebook page ID of the advertiser |
pageName | string | Name of the advertiser page |
pageUrl | string | URL of the advertiser's Facebook page |
pageProfilePictureUrl | string | Advertiser's profile picture URL |
pageCategories | array | Categories of the advertiser page |
pageLikeCount | number | Number of page likes |
isActive | boolean | Whether the ad is currently running |
startDate | string | Date the ad started running (YYYY-MM-DD) |
endDate | string | Date the ad stopped running (YYYY-MM-DD) |
platforms | array | Platforms where the ad runs (facebook, instagram, messenger, audience_network) |
bodyText | string | Main ad copy / body text |
title | string | Ad headline / title |
ctaText | string | Call-to-action button text (e.g., "Shop Now") |
ctaType | string | Call-to-action type identifier |
linkUrl | string | Destination URL the ad links to |
linkCaption | string | Display URL caption |
linkDescription | string | Link description text |
displayFormat | string | Ad format (e.g., "image", "video", "carousel") |
imageUrls | array | Direct URLs to ad images |
videoUrls | array | Direct URLs to ad videos (HD preferred) |
videoPreviewUrls | array | Video thumbnail/preview image URLs |
categories | array | Ad categories (e.g., "EMPLOYMENT", "HOUSING") |
containsAiMedia | boolean | Whether the ad contains AI-generated media |
impressions | string | Impression count text (when available) |
spend | object | Estimated spend range (lowerBound, upperBound) |
currency | string | Currency code for spend data |
gatedType | string | Gated content type (if applicable) |
collationCount | number | Number of ad variations in this collation group |
cardsCount | number | Number of carousel cards |
How much does it cost to scrape Facebook ads?
Facebook Ads Library Scraper uses pay-per-event pricing. You only pay for what you use — no monthly minimums.
| Charge event | Price (Bronze) | Description |
|---|---|---|
| Run started | $0.005 | One-time charge per actor run |
| Ad scraped | $0.0005/ad | Per ad extracted |
Volume discounts are available on higher Apify plans:
| Plan | Per-ad price | Discount |
|---|---|---|
| Free | $0.000575 | — |
| Bronze (Starter) | $0.0005 | Baseline |
| Silver (Scale) | $0.00039 | 22% off |
| Gold (Business) | $0.0003 | 40% off |
| Platinum (Enterprise) | $0.0002 | 60% off |
| Diamond (Enterprise+) | $0.00014 | 72% off |
Example cost: Scraping 30 ads from one search query costs approximately $0.005 + (30 x $0.0005) = $0.02 on the Bronze plan.
How to scrape Facebook ads
- Go to Facebook Ads Library Scraper on Apify Store.
- Click Try for free to open the actor in Apify Console.
- Enter your search keywords (e.g., "running shoes", "shopify") or advertiser page URLs.
- Optionally set the country code (default: US), ad status filter, and media type filter.
- Click Start and wait for the run to finish.
- Download your data as JSON, CSV, Excel, or connect to any integration.
Input parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
searchQueries | array of strings | — | Keywords to search for in the Ad Library |
pageUrls | array of strings | — | Facebook page URLs to scrape all ads from specific advertisers |
country | string | "US" | ISO country code (e.g., "US", "GB", "DE") or "ALL" for all countries |
activeStatus | enum | "all" | Filter by status: "all", "active", or "inactive" |
mediaType | enum | "all" | Filter by media: "all", "image_and_meme", or "video" |
maxAds | integer | 30 | Max ads per search query (up to 30 per search from the first page) |
Tip: You must provide at least one search keyword or advertiser page URL. You can use both — results from all sources are combined into one dataset.
Output example
{"adArchiveId": "123456789012345","adLibraryUrl": "https://www.facebook.com/ads/library/?id=123456789012345","pageId": "987654321","pageName": "Shopify","pageUrl": "https://www.facebook.com/shopify/","pageProfilePictureUrl": "https://scontent.xx.fbcdn.net/...","pageCategories": ["E-commerce website"],"pageLikeCount": 4200000,"isActive": true,"startDate": "2025-11-15","endDate": null,"platforms": ["facebook", "instagram"],"bodyText": "Start your online store today. No coding required.","title": "Free Trial — Start Selling Online","ctaText": "Sign Up","ctaType": "SIGN_UP","linkUrl": "https://www.shopify.com/free-trial","linkCaption": "shopify.com","linkDescription": "Try Shopify free for 3 days.","displayFormat": "image","imageUrls": ["https://scontent.xx.fbcdn.net/..."],"videoUrls": [],"videoPreviewUrls": [],"categories": [],"containsAiMedia": false,"impressions": null,"spend": null,"currency": "USD","gatedType": null,"collationCount": 1,"cardsCount": 0}
Tips for best results
- Use specific keywords — Broad terms like "shoes" return many results. Try "Nike running shoes" or "Allbirds" for more targeted ads.
- Search by advertiser page URL — If you know the exact advertiser, use their Facebook page URL for precise results.
- Combine search modes — Use both keywords and page URLs in a single run to collect ads from multiple angles.
- Use multiple keywords for more data — Each keyword search returns up to 30 ads. Run 10 related keywords to get up to 300 ads across different queries.
- Filter by status — Use "active" to see only currently running ads, or "inactive" to study past campaigns.
- Filter by media type — Use "video" to focus on video ads or "image_and_meme" for static creatives.
- Check different countries — The same advertiser may run different ads in different markets. Try US, GB, DE, etc.
Integrations
Connect Facebook Ads Library Scraper to your existing tools:
- Google Sheets — Automatically export scraped ads to a spreadsheet for team review.
- Slack — Get notifications when new competitor ads are detected.
- Airtable — Build a competitive ad library with rich media attachments.
- Zapier / Make / n8n — Trigger downstream workflows when new ads are found.
- Webhooks — Send results to your own API endpoint for custom processing.
- Google BigQuery / Snowflake — Load ad data into your data warehouse for analysis.
Example workflows
- Competitor monitoring: Schedule daily runs with competitor brand names. Compare new ads against previous runs to spot new campaigns.
- Ad creative research: Search for product categories ("protein powder", "SaaS tools") to build a library of ad inspiration.
- Brand protection: Search for your brand name to detect unauthorized ads using your trademark.
- Market research: Compare ad strategies across countries for the same advertiser.
Using the Apify API
You can start and retrieve results programmatically using the Apify API.
Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });const run = await client.actor('automation-lab/facebook-ads-library').call({searchQueries: ['shopify'],country: 'US',maxAds: 30,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Python
from apify_client import ApifyClientclient = ApifyClient('YOUR_API_TOKEN')run = client.actor('automation-lab/facebook-ads-library').call(run_input={'searchQueries': ['shopify'],'country': 'US','maxAds': 30,})items = client.dataset(run['defaultDatasetId']).list_items().itemsprint(items)
cURL
# Start a runcurl -X POST "https://api.apify.com/v2/acts/automation-lab~facebook-ads-library/runs?token=YOUR_API_TOKEN" \-H "Content-Type: application/json" \-d '{"searchQueries": ["shopify"], "country": "US", "maxAds": 30}'# Get results (replace RUN_ID with the actual run ID)curl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_API_TOKEN"
Use with AI agents via MCP
Facebook Ads Library Scraper is compatible with the Model Context Protocol (MCP). This allows AI agents (Claude, GPT-4, etc.) to call the actor as a tool and analyze the results.
Example use case: Ask an AI agent to "find all active Facebook ads from Nike in the US and summarize their messaging strategy." The agent calls this actor, receives structured ad data, and generates insights.
Is it legal to scrape Facebook Ad Library?
The Facebook Ad Library is a public transparency tool created by Meta to provide public access to all ads running across Facebook, Instagram, Messenger, and Audience Network. It was created in response to regulatory requirements for ad transparency.
- The Ad Library is publicly accessible without a Facebook account.
- All data in the Ad Library is intentionally made public by Meta.
- This actor accesses only publicly available data from the Ad Library.
Always review and comply with Meta's Terms of Service and applicable laws in your jurisdiction before using this actor.
FAQ
Q: How many ads can I scrape per run? Each search query returns up to ~30 ads from the first page of Ad Library results. To get more ads, use multiple search keywords in a single run — each keyword runs a separate search.
Q: Can I scrape all ads from a specific advertiser?
Yes. Enter the advertiser's Facebook page URL (e.g., https://www.facebook.com/nike) in the "Advertiser page URLs" field. The actor will extract ads specifically from that page.
Q: Does it support pagination beyond the first page? Currently, the actor extracts ads from the initial server-side rendered page (up to ~30 ads per search). For broader coverage, use multiple related search keywords.
Q: Do I need a Facebook account? No. The Facebook Ad Library is publicly accessible. No login or authentication is needed.
Q: What countries are supported? All countries available in the Facebook Ad Library are supported. Use the ISO country code (e.g., "US", "GB", "DE", "BR", "IN") or "ALL" to search globally.
Q: Why are some fields null? Not all ads have all data. Spend and impression data are only available for ads about social issues, elections, or politics. Some ads may not have video URLs, CTA buttons, or link descriptions.
Q: The actor returned 0 ads. What should I do?
- Check that your search keyword matches ads in the Facebook Ad Library directly.
- Try a broader keyword or different country.
- If searching by page URL, make sure the URL is a valid Facebook page URL.
Q: Can I filter by date range?
The actor currently uses the Ad Library's default date handling. You can filter active vs. inactive ads using the activeStatus parameter. Post-processing the startDate and endDate fields lets you filter by any date range.
Q: How often can I run this actor? As often as you need. There are no built-in rate limits. However, very frequent runs against the same search terms may trigger Facebook's anti-bot measures.
Other marketing scrapers from Automation Lab
- Instagram Scraper — Extract profiles, posts, comments, and hashtag results from Instagram.
- TikTok Scraper — Scrape TikTok profiles, videos, and engagement data.
- Twitter/X Scraper — Extract tweets, profiles, and engagement metrics.
- Reddit Scraper — Scrape Reddit posts, comments, and subreddit data.
- Google Maps Lead Finder — Find local business leads with contact info from Google Maps.
- YouTube Scraper — Extract video metadata, channel info, and comments from YouTube.