At a glance
What the Facebook Ad Library Search & API does
- Search by
- Keyword, Facebook page ID or Ad Library URL
- Filters
- Country, active/inactive status, media type, exact max ads per query
- Output
- 33 fields per ad, 41 with EU transparency; JSON, CSV, Excel, API
- Automate
- Schedules, Slack or webhook digest, Zapier, Make, n8n, Google Sheets, MCP for AI agents
Who it is for
- Marketers and agencies studying competitors' ad copy and creatives
- E-commerce brands tracking which products rivals advertise, with the new-ads feed
- Copywriters collecting ad examples by keyword and country
- Sales teams finding businesses that are actively advertising
Output
What you get
- Advertiser page name, id, link, categories and like count
- Ad id and public Ad Library link
- Ad text, headline, link description, display link, button text and type, landing page URL
- Image and video creative links, carousel/dynamic cards
- Start and stop dates in ISO 8601 UTC, active flag
- Platforms (Facebook, Instagram, Messenger, Audience Network, Threads)
- Spend range and impressions where Meta publishes them
- Number of near-identical versions Meta groups with the ad
- Optional EU transparency: EU reach, reach by country/age/gender, targeted locations/gender/ages, payer and beneficiary
Example
Input and output
Input
{
"queries": [
"meal kit",
"https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=CA&q=shopify"
],
"country": "US",
"activeStatus": "active",
"maxResultsPerQuery": 50
}One output record
{
"ad_id": "4477357355914906",
"page_id": "1811034678977534",
"page_name": "Coohom",
"page_url": "https://facebook.com/coohom",
"page_categories": [
"Business"
],
"page_like_count": 39638,
"is_active": true,
"start_date": "2026-08-26T07:00:00Z",
"end_date": "2026-11-04T08:00:00Z",
"platforms": [
"facebook",
"instagram",
"audience_network"
],
"search_country": "ALL",
"reached_countries": [],
"ad_text": "From design to production, all in one connected workflow.\n\n✔ Design & render faster\n✔ Quote accurately in real time\n✔ Generate CAM-ready production data\n✔…",
"title": "AI-Powered Design to Production",
"link_description": "Create designs and renders in minutes.",
"caption": "fb.me",
"cta_text": "Get quote",
"cta_type": "GET_QUOTE",
"link_url": "http://fb.me/",
"display_format": "DCO",
"image_urls": [
"https://scontent-phl2-1.xx.fbcdn.net/v/t39.35426-6/775280732_2238348630340852_5154949849446191823_n.jpg?_nc_cat=104&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=tAi5np9bX3…",
"https://scontent-phl2-1.xx.fbcdn.net/v/t39.35426-6/778735461_1427873105866349_7149590165820850646_n.jpg?_nc_cat=100&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=cM74U5KQ55…",
"https://scontent-phl2-1.xx.fbcdn.net/v/t39.35426-6/779357208_1579852603619327_4038369567686651060_n.jpg?_nc_cat=105&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=mKT2Gotyqb…",
"… 9 more"
],
"video_urls": [
"https://video-phl2-1.xx.fbcdn.net/o1/v/t2/f2/m412/AQNWAem6W_OqTU0qvfnndgBECIVlL_Co5FiUTxZVrq9uU7fm_5dZlE9waeqy8weHO2Y_YK7Z46Sr44snspwq6mr9kLCW8qiOIknHpeVSLA.…"
],
"cards": [
{
"body": "From design to production, all in one connected workflow.\n\n✔ Design & render faster\n✔ Quote accurately in real time\n✔ Generate CAM-ready production data\n✔…",
"title": "AI-Powered Design to Production",
"link_url": "http://fb.me/",
"image_url": "https://scontent-phl2-1.xx.fbcdn.net/v/t39.35426-6/775280732_2238348630340852_5154949849446191823_n.jpg?_nc_cat=104&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=tAi5np9bX3…",
"video_url": null
},
{
"body": "From design to production, all in one connected workflow.\n\n✔ Design & render faster\n✔ Quote accurately in real time\n✔ Generate CAM-ready production data\n✔…",
"title": "Design Faster. Sell Smarter.",
"link_url": "http://fb.me/",
"image_url": "https://scontent-phl2-1.xx.fbcdn.net/v/t39.35426-6/778735461_1427873105866349_7149590165820850646_n.jpg?_nc_cat=100&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=cM74U5KQ55…",
"video_url": null
},
{
"body": "From design to production, all in one connected workflow.\n\n✔ Design & render faster\n✔ Quote accurately in real time\n✔ Generate CAM-ready production data\n✔…",
"title": "AI-Powered Design to Production",
"link_url": "http://fb.me/",
"image_url": "https://scontent-phl2-1.xx.fbcdn.net/v/t39.35426-6/779357208_1579852603619327_4038369567686651060_n.jpg?_nc_cat=105&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=mKT2Gotyqb…",
"video_url": null
},
"… 15 more"
],
"variants_count": 1,
"collation_id": "1087839470334171",
"spend_range": null,
"impressions_range": null,
"impressions_text": null,
"reach_estimate": null,
"currency": null,
"ad_library_url": "https://www.facebook.com/ads/library/?id=4477357355914906",
"source_url": "https://www.facebook.com/ads/library/?id=4477357355914906",
"scraped_at": "2026-11-04T16:15:38Z"
}From a real run of this tool; long text and lists shortened here.
How to use it
Three steps
- Put search terms (e.g. 'meal kit'), Facebook page ids or Ad Library URLs into Queries.
- Optionally pick a country, active/inactive status, media type and the exact number of ads per query; turn on 'Only new ads since last run' for a feed.
- Click Start, then download JSON, CSV or Excel, or schedule it and send results to Google Sheets, Zapier, Make or n8n.
API
Call it from Python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("aurelix/facebook-ad-library-scraper").call(run_input={'queries': ['meal kit',
'https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=CA&q=shopify'],
'country': 'US',
'activeStatus': 'active',
'maxResultsPerQuery': 50})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)pip install apify-client. The same input works from the Apify console, a schedule, Make, n8n, Zapier or an AI agent through the Apify MCP server.
Pricing
Pay per result
| Per 1,000 ads, free plan | $0.70 |
| Per 1,000 ads, paid plans | $0.60 |
| Eu details, per 1,000, free plan | $0.20 |
| Start fee per run | $0.003 |
Live prices from the Apify Store; no subscription and no platform usage billed on top. See the Store page.
Honest limits
What it does not do
- Data comes from the public Ad Library web pages, not Meta's official API (which needs a personally verified developer account). A Meta layout change can break it until fixed; the daily health run catches that within 24 hours.
- Meta rate-limits datacenter addresses quickly, so the Actor starts on datacenter proxy and switches to residential proxy (included in the price) after the first rate limit.
- The personal-page filter is a heuristic on Meta's page categories and page names. A person with an unusual name who files their page under a business category can slip through; a business with no category, or one named exactly like a person (e.g. 'Sarah Jane'), is dropped.
- Meta groups near-identical ad versions; each version is returned as its own row with 'variants_count'.
- Reached-countries, spend and impressions are only filled where Meta publishes them (mostly EU and political ads).
- Meta rate-limits the Ad Library from time to time. The Actor waits and retries with up to 8 fresh sessions (new IP addresses), backing off up to a minute between tries. If Meta still refuses, that query stops early: the status message names it as PARTIAL ('stopped at N ads (Meta rate limit)') and does not count it as complete; the run still succeeds and you pay only for the ads returned. A query that stops on another error after saving ads is also named as PARTIAL.
- A run that would outlast its timeout stops by itself shortly before it, keeps and charges only the ads already saved, and ends SUCCEEDED with a PARTIAL status message. With the default 1-hour timeout that is several thousand ads; raise the timeout for bigger pulls.
- EU transparency data exists only for ads Meta shows it for (delivered in the EU); it adds about 0.2 s per ad to the run.
FAQ
Questions buyers ask
Is there a cheaper alternative to Apify's Facebook Ads Scraper?
Yes. This Actor costs $0.70 per 1,000 ads on the free plan and $0.60 on paid plans; apify/facebook-ads-scraper costs $5.80 and $5.00, and curious_coder/facebook-ads-library-scraper $0.75. This Actor takes plain keywords (the other two take Ad Library URLs) and stops at exactly the number of ads you set. Its start fee is $0.003 per run, higher than curious_coder's $0.00005, so tiny runs can cost less there.
How do I monitor competitor Facebook ads in Google Sheets, n8n or an AI agent?
Two ways. For a fixed workflow, add Apify's n8n or Make node, choose **Run Actor**, enter aurelix/facebook-ad-library-scraper and map the dataset to the next step. For an AI agent (Claude, ChatGPT, Cursor or an n8n AI Agent node), add https://mcp.apify.com/?tools=aurelix/facebook-ad-library-scraper as an MCP server and ask for ads in plain words; setup for each client is in the section above. Runs bill your own Apify account at the same per-result price.
How much does the Facebook Ad Library Search & API cost?
$0.70 per 1,000 ads ($0.60 on paid Apify plans), billed through your Apify account; you pay only for results. Apify's free plan includes $5 of credit a month, enough for about 7,142 ads.
Do I need a Facebook account or an access token?
No. The Actor reads the public Ad Library pages that anyone can open without logging in. It never logs in and uses no account.
Is this legal?
It reads only public data any logged-out visitor can see: the Meta Ad Library. It goes at a polite pace, never logs in and never solves CAPTCHAs. It returns ad fields for business advertisers (page, ad text, media links, dates, platforms, status); political ads and personal pages are excluded. To have a record removed, open an issue on this Actor's Issues tab; if Meta formally asks us to stop, this Actor will stop. You are responsible for using the data lawfully, incl. anti-spam and privacy laws; this is not legal advice.
How are political and personal advertisers excluded?
An ad is dropped if Meta labels it political or issue, carries a 'Paid for by' disclaimer, comes from a page whose category is a person (Public figure, Politician, Profile, Digital creator, Entrepreneur, Coach and similar) or has no category at all, or from a page named like a person (a common first name plus surname, e.g. 'Dr. Jane Smith'). Dropped ads are counted in the log and never charged.
Why are spend and impressions empty?
Meta publishes spend and impressions only for political/issue ads and some EU-delivered ads. Political ads are excluded, so these fields are usually empty. For EU reach and audience data, turn on 'Add EU transparency data'.
What EU transparency data do I get?
Turn on 'Add EU transparency data'. For ads delivered in the EU (Meta's 'See ad details' panel), each row gets eu_total_reach, eu_reach_breakdown (country, age range, male, female, unknown), eu_target_locations, eu_target_gender, eu_target_age_min/max and eu_payer_beneficiary. Other ads get empty EU fields and are not charged the $0.20 per 1,000.
Does the limit really hold?
Yes. 'Max ads per query' is an exact cap applied after exclusions and duplicates are removed, and Apify's spending limit is respected too.
Can I use it from an AI assistant?
Yes. The input is described for agents: give 'queries' and optional filters. It works through Apify's MCP server and API.
What happens if a search finds no ads?
The run still succeeds with 0 ads and a status message such as '0 ads; 1/1 queries complete'. You pay only the start fee, since ads are charged one by one as they are saved. If every query fails (blocked, or no results page) and nothing was saved, the run ends FAILED and names the queries.
Which parts of a pasted Ad Library URL are used?
The search term (q) or the page id (view_all_page_id), plus country, active_status, media_type and search_type, so an exact-phrase search stays exact. These override the Country, Ad status and Media type fields for that URL. Other filters in the URL, such as language, platform or date range, are ignored. A URL with neither a search term nor a page id is skipped with a warning in the log.
How do I get every ad of one advertiser?
Put the advertiser's page id into queries, as digits (e.g. 20409006880) or as page:20409006880, or paste the Ad Library URL of their page view, which contains view_all_page_id. A normal facebook.com/brand link is not recognised as a page and is searched as a keyword. Set Ad status to 'Active and inactive' to include stopped ads.
How does 'Only new ads since last run' work?
The Actor remembers the ad ids it returned, in a store named after your queries, country, status and media type (or after 'Incremental state name' if you set one). Ads returned before are skipped, not charged and not counted against 'Max ads per query'. An ad not seen again for 60 days is forgotten. Changing the queries or filters starts a new feed unless you keep the same state name.
Are duplicates removed?
Yes. Within a run each ad id is returned once, even when several queries match it, and a query entered twice runs once. Meta groups near-identical versions of an ad; each version is its own row, with variants_count and collation_id telling you which belong together.
How long does a run take?
The Actor pauses 1.5 s between result pages of about 30 ads. In our tests 150 ads over two queries took 49 s and 60 ads from one page took 31 s, while 400 ads took about 6 minutes because Meta rate-limited the run. EU transparency data adds about 0.2 s per ad.
Which countries can I search?
Any two-letter country code the Ad Library accepts, e.g. US, GB, CA or FR, or ALL for every country. Each row's search_country records the filter used. reached_countries is filled only where Meta publishes it, and EU transparency data exists only for ads delivered in the EU.
Guides
Tutorials using this tool
Related
Related tools
Try the Facebook Ad Library Search & API
Open it on the Apify Store, paste the example input above and click Start. Results download as CSV, Excel or JSON.