Facebook Ads Library Scraper: Meta Ads by Keyword or Page
Pricing
from $0.17 / 1,000 ads
Facebook Ads Library Scraper: Meta Ads by Keyword or Page
Meta Ad Library ads by keyword, Page or Ad Library link, with text, images, videos and dates. $0.25 per 1,000 ads. Carousel cards, platforms and political spend.
Pricing
from $0.17 / 1,000 ads
Rating
0.0
(0)
Developer
Luzi
Maintained by CommunityActor stats
0
Bookmarked
6
Total users
5
Monthly active users
11 hours ago
Last modified
Categories
Features
Share
Get the ads in the Meta Ad Library (Facebook, Instagram, Messenger, Threads, WhatsApp and Audience Network) for any words, any Facebook Page or any Ad Library link, with the Ad Library's main filters, for $0.25 per 1,000 ads and no start fee. No Facebook account, login or cookies needed.
Tested daily. Latest check: 4,946 ads from five searches in 13 minutes: a Page's ads, political ads with their spend, and searches filtered by country, media type, platform, dates and language.
What does this Actor do?
You give it searches (the words you would type in the Ad Library's search box), Facebook Page links or names, Ad Library Page ids, or Ad Library links. For each one it reads the Ad Library's results page after page, as you would by scrolling, and saves one row per ad until it reaches your limit or the end of the results.
Each row comes with:
- the ad's Library id and link, its place in the results, whether it is running now, the day it started and the last day it was shown
- the Page that runs it: id, name, link, picture, likes and categories
- the platforms it runs on (Facebook, Instagram, Messenger, Threads, WhatsApp, Audience Network) and its format (image, video, carousel, catalogue)
- the ad itself: text, title, caption, link, link description and button, every image and video (HD and SD), and every card of a carousel or catalogue ad with its own text, link, price line and image
- how many versions of the ad run (the Ad Library groups them)
- for ads about social issues, elections or politics: who paid for it (with the contact details on the disclaimer), spend, impressions, reach and currency, as ranges the Ad Library shows
- Meta's own flags: AI or digitally created media, sensitive content, financial-services rules
- the search, Page or link it came from, with the Ad Library link for it, and how many ads the Ad Library counts for that search
- for a Page's ads, that Page's About tab: who owns it (name, address and phone, when Meta shows them), the countries its admins are in, its name changes and creation date, its lifetime spend on political ads by payer, its verification, likes, and its Instagram account and followers
Why use it?
- The Ad Library's main filters. Country, active or not, ad category, media type, exact phrase, most recent first or (for political ads) impressions high to low or low to high, a date range in days or as "the last 2 months", platforms and languages, or paste an Ad Library link with the filters you already picked.
- A Page's link or name is enough. Paste facebook.com/
- Carousel and catalogue ads in full. Each card with its own product title, price line, link and image, not only the ad's first frame.
- Political ads with their paper trail. Spend, impressions, reach and the "Paid for by" disclaimer with its address, phone, email and website.
- No start fee. You pay per ad saved, nothing per search or per run.
- Use the data anywhere. Download as JSON, CSV or Excel, or send it to your own tools through Apify's API and integrations.
How to use it
- Type one or more searches into Searches, or paste Facebook Page links or Ad Library links into Links.
- Optionally, set Max ads per search, Country and the other filters.
- Click Start. When the run ends, open the Output tab to view the ads or download them.
Run it with no input to see a sample: up to 50 active US ads for "running shoes" and up to 50 from the Amazon Page, charged as usual.
Input
| Field | What it does | Default |
|---|---|---|
Searches (searchQueries) | Words to search the Ad Library for, one search each | — |
Links (startUrls) | Facebook Page links or names, Ad Library Page ids, or Ad Library links (a search or a Page's ads) | — |
Max ads per search (maxAdsPerSearch) | Stop each search, Page or link after this many ads (1 to 10,000) | 100 |
Country (country) | Ads shown in this country ("US", "GB", "VN"), or ALL | ALL |
Active or not (activeStatus) | active, inactive or all | active |
Ad category (adType) | all, or political_and_issue_ads (issues, elections or politics) | all |
Media type (mediaType) | all, image, meme, image_and_meme, video or none | all |
Exact phrase (exactPhrase) | Match the search words as one exact phrase | off |
Sort by (sortBy) | relevance, most_recent, or for political ads impressions_high_to_low / impressions_low_to_high | relevance |
Shown from / until (startDate, endDate) | Only ads shown in this date range: YYYY-MM-DD, or how long ago ("7 days", "2 months") | any |
Platforms (platforms) | Any of facebook, instagram, audience_network, messenger, threads, whatsapp | all |
Languages (languages) | Two-letter language codes ("en", "es") | all |
Give at least one search or one link. Example input:
{"searchQueries": ["running shoes"],"startUrls": ["https://www.facebook.com/amazon"],"country": "US","activeStatus": "active","maxAdsPerSearch": 200}
Output
One row per ad. An example, with made-up values:
{"ad_archive_id": "1234567890123456","ad_library_url": "https://www.facebook.com/ads/library/?id=1234567890123456","position": 1,"page_name": "A Shoe Brand","page_id": "100000000000001","page_url": "https://facebook.com/ashoebrand","page_profile_picture_url": "https://scontent.xx.fbcdn.net/…","page_like_count": 123456,"page_categories": ["Shoe store"],"page_is_deleted": false,"is_active": true,"start_date": "2026-09-01T07:00:00.000Z","end_date": "2026-10-17T07:00:00.000Z","total_active_time": null,"publisher_platforms": ["FACEBOOK", "INSTAGRAM"],"display_format": "IMAGE","body_text": "The ad's text.","title": "The ad's headline","caption": "ashoebrand.example","link_url": "https://ashoebrand.example/","link_description": null,"cta_text": "Shop now","cta_type": "SHOP_NOW","images": [{"original_image_url": "https://scontent.xx.fbcdn.net/…","resized_image_url": "https://scontent.xx.fbcdn.net/…"}],"videos": [],"cards": [],"card_count": 0,"collation_id": null,"collation_count": null,"categories": ["UNKNOWN"],"contains_digital_created_media": false,"paid_for_by": null,"spend": null,"impressions_text": null,"reach_estimate": null,"search_query": "running shoes","search_page_id": null,"search_country": "US","search_url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&…","search_total_count": 576}
| Field | What it holds |
|---|---|
ad_archive_id | The ad's id in the Ad Library |
ad_library_url | A link to the ad in the Ad Library |
position | Its place in the search's results, 1 = the first |
page_name, page_id | The Page that runs the ad |
page_url | A link to the Page |
page_profile_picture_url | The Page's picture |
page_like_count | The Page's likes |
page_categories | The Page's categories |
page_is_deleted | Whether the Page was deleted |
is_active | Whether the ad is running now |
start_date | The day it started (ISO date) |
end_date | The last day it was shown (today for a running ad) |
total_active_time | Seconds it ran, when the Ad Library gives it (some political ads) |
publisher_platforms | Where it runs: FACEBOOK, INSTAGRAM, MESSENGER, THREADS, WHATSAPP, AUDIENCE_NETWORK |
display_format | IMAGE, VIDEO, CAROUSEL, DCO (several versions), DPA (a product catalogue), MULTI_IMAGES … |
body_text | The ad's text |
title, caption | The headline and the link's caption |
link_url, link_description | Where the ad links to, and the line under the headline |
cta_text, cta_type | The button ("Shop now") and its kind |
images | Each image: full size and resized |
videos | Each video: HD and SD links and the preview image |
cards | A carousel or catalogue ad's cards, each with its text, title, link, price line, button, image or video |
card_count | How many cards the ad has (0 when it has none) |
extra_texts, extra_links, extra_images, extra_videos | The other versions' texts, links, images and videos, when the ad has them |
collation_id, collation_count | The group of versions the ad belongs to, and how many there are |
categories | The Ad Library's categories for the ad (POLITICAL, UNKNOWN …) |
contains_digital_created_media | Whether Meta marks it as AI-made or digitally created |
contains_sensitive_content | Whether Meta marks it as sensitive |
is_reshared, root_reshared_post, branded_content, event | A reshared post, branded content or an event the ad promotes, when it does |
byline, disclaimer_label | The "Paid for by" line |
paid_for_by | Who paid for an issue, election or political ad |
disclaimer | The disclaimer's details: the payer, the date it was submitted, its address, phone, email and website |
spend, currency | An issue, election or political ad's spend, as the range the Ad Library shows |
impressions_text, impressions_index | Its impressions, as the range shown |
reach_estimate | Its estimated reach, as the range shown |
targeted_or_reached_countries | The countries it reached, when the Ad Library gives them |
country_iso_code, brazil_tax_id, additional_info, ec_certificates | What the Ad Library shows for some countries' ads |
gated_type, hide_data_status, state_media_run_label, report_count, has_user_reported, menu_items | The Ad Library's own marks on the ad |
is_aaa_eligible, is_deemed_finserv, finserv_limited_delivery, tw_anti_scam_limited_delivery | Meta's rules that apply to the ad |
ad_id | The ad's delivery id, when the Ad Library shows it |
search_query | The search it came from |
search_page_id | The Page it came from |
search_country | The country searched |
search_url | The Ad Library link for that search |
search_total_count | How many ads the Ad Library counts for that search ("~576 results"; 50,001 means more than 50,000) |
search_page_name, search_page_url | For a Page's ads: the Page you gave (some of its ads run under a partner's Page) |
search_page_owner | That Page's confirmed owner: name, city, state, postal code, country and phone, when Meta shows them |
search_page_admin_countries | The countries the Page's admins are in, with how many in each |
search_page_history | The Page's creation date and name changes |
search_page_spend_lifetime, search_page_spend_weekly, search_page_spend_current_week | The Page's spend on issue, election and political ads, by who paid |
search_page_ig_username, search_page_ig_followers, search_page_ig_verified | The Page's Instagram account |
search_page_about, search_page_category, search_page_likes, search_page_verification, search_page_entity_type, search_page_alias | The Page's About text, category, likes, verification, kind and username |
search_page_hidden_ads, search_page_has_blank_ads, search_page_state_media_label, search_page_related_pages, search_page_shared_disclaimer_pages | The Ad Library's other notes on the Page |
input_url | The link you gave, when it came from one |
Spend, impressions and reach are shown by the Ad Library only for ads about
social issues, elections or politics; other ads leave them empty. The Page
fields (search_page_…) are filled for a Page's ads, and empty for a word
search. Not included: the EU audience breakdown (age, gender and country
reach of ads shown in the EU), which the Ad Library shows only on an ad's own
page.
How much does it cost?
No surcharges and no paid options; an item that fails is not charged.
You pay for what you get:
- $0.25 per 1,000 ads ($0.00025 an ad). Each ad is charged once per run.
- No start fee, and nothing per search.
So 1,000 ads cost $0.25. If you set a maximum cost for a run, the Actor stops when it reaches it and keeps every ad saved so far.
How long does a run take?
About 20 to 35 seconds for two searches of up to 50 ads each, and 11 to 13 minutes for five searches of up to 1,000 ads each (about 4,950 ads).
Good to know
- About 10 ads a page. The Ad Library lists about 30 ads on its first page and 10 at a time after it, so a large search takes a while: 11 to 13 minutes for five searches of 1,000 ads read together.
- "2 months" counts back from the run's start. A relative date in Shown from or Shown until becomes that day, in UTC, when the run starts, so a scheduled run always reads the last 2 months.
- Impressions order is for political ads. Meta shows impressions only for ads about social issues, elections or politics, so the impressions orders need Ad category set to them; with All ads the run is refused rather than silently left in the usual order.
- Read past empty pages. In "most recent" order the Ad Library sometimes answers a run of pages with no ads (18 in a row on one search we measured) and then serves ads again. The Actor keeps going through them, and stops only when the Ad Library says there are no more pages, or after 50 empty pages in a row.
- Expect fewer ads than the "results" count the Ad Library shows. Read to its last page, a search came out 3% to 34% under that number in our tests (12% on a search of 1,559): the Ad Library leaves some ads out of the pages it serves, in either order.
- An ad found by two searches is saved and charged once, under the search that reached it first, so two searches can save fewer ads than their two maximums.
- A pasted Ad Library link keeps its own filters. The fields below fill in only what the link leaves out.
- Check your links first. A link that is not a Facebook Page or an Ad
Library search stops the run before anything is read, and the message names
it. A single ad's link (
?id=) is not a search. - One search that cannot be read does not stop the run. The others carry on, and the run's status lists the ones that could not be read.
- A search with no ads is not an error. It saves nothing.
More Actors from us
- Facebook Comments Scraper: With Replies: Comments and replies from public Facebook posts, reels and videos, with reactions by type.
- Facebook Pages Scraper: Contacts, Followers & Ratings: Facebook Page details from links: exact follower count, phone, email, address, websites.
- Facebook Posts Scraper: Groups, Pages & Profiles: Posts from public Facebook groups, Pages and profiles with reaction, comment and share counts.
- Airbnb Scraper: Every Stay, Past the 15-Page Limit: Every stay of an Airbnb search, past the 15 pages Airbnb shows, checked against its count.
- Alibaba Products Scraper: Price Tiers & Suppliers: Alibaba.com products by keyword or link, with price tiers in US dollars on every row.
- AliExpress Product Scraper: Search Results & Prices: Every product of an AliExpress search to its last page, with exact sold counts and ratings.
- Amazon Product Scraper: Search Results & Prices: Every product on Amazon's search pages to the last page, sponsored marked, with monthly sales.
- App Store Reviews Scraper: All Reviews, Not 500: Every written App Store review of an app, not just the newest 500.
- Woolworths Coles ALDI Scraper: AU Grocery Prices: Woolworths, Coles and ALDI products for any search in one run, every results page to the end.
Use it from an AI agent or the API
One call starts a run and returns its items (Apify waits up to 300 seconds; for a
longer run, start it with POST /v2/acts/…/runs and read its dataset):
POST https://api.apify.com/v2/acts/luzivanlt~facebook-ads-library-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>
With the sample input as its JSON body:
{"searchQueries": ["running shoes"],"startUrls": ["https://www.facebook.com/amazon"],"maxAdsPerSearch": 50,"country": "US","activeStatus": "active","adType": "all","mediaType": "all","exactPhrase": false,"sortBy": "relevance"}
Its inputs, in the order of the input form:
| Input | What it takes | Default |
|---|---|---|
searchQueries (Searches) | Words to search the Ad Library for, one search per line, as you would type them in its search box. | — |
startUrls (Links) | Facebook Page links (https://www.facebook.com/nike, profile.php?id=…, /people/…, /pages/…, /p/…, also on m. or fb.com), a Page's name alone as in its link (nike or @nike), Page ids as the Ad Library shows them (view_all_page_id), or Ad Library links (a search, or a Page’s ads) with any filters you picked there. | — |
maxAdsPerSearch (Max ads per search) | Stop each search, Page or link after this many ads, in the Ad Library’s order. | 100 |
country (Country) | Ads shown in this country, as a two-letter code such as "US", "GB" or "VN", or "ALL" for every country. | "ALL" |
activeStatus (Active or not) | Ads running now, ads that have stopped, or both. | "active" |
adType (Ad category) | All ads, or only ads about social issues, elections or politics (these carry spend, impressions, reach and who paid for them). | "all" |
mediaType (Media type) | Keep only ads with this kind of media: images, memes, images and memes, videos, or ads with no image or video. | "all" |
exactPhrase (Exact phrase) | Match the search words as one exact phrase, in order. | false |
sortBy (Sort by) | The Ad Library’s order, the most recently started ads first, or, for issue, election and political ads only, impressions high to low or low to high (Meta shows impressions for those ads only, so with Ad category All ads an impressions order is refused). | "relevance" |
startDate (Shown from) | Keep only ads shown on or after this day: a date (YYYY-MM-DD) or how long before the run starts, such as "7 days", "2 weeks", "2 months" or "1 year". | — |
endDate (Shown until) | Keep only ads shown on or before this day: a date (YYYY-MM-DD) or how long before the run starts, such as "7 days", "2 weeks", "2 months" or "1 year". | — |
platforms (Platforms) | Keep only ads shown on any of these platforms: Facebook, Instagram, Audience Network, Messenger, Threads or WhatsApp. | — |
languages (Languages) | Keep only ads in these languages, as two-letter codes such as "en" or "es". | — |
Apify's MCP server, https://mcp.apify.com, lists it as luzivanlt/facebook-ads-library-scraper. To give an
AI agent this Actor as a tool, add the server to the agent's MCP config:
{"mcpServers": {"apify": {"url": "https://mcp.apify.com?tools=luzivanlt/facebook-ads-library-scraper"}}}
The client signs in with OAuth, or add "headers": { "Authorization": "Bearer <APIFY_TOKEN>" }.
Charged per ad delivered; the sample input above costs at most $0.03.
FAQ
Do I need a Facebook account or cookies? No. The Actor reads what anyone can see in the Ad Library.
Can I get every ad a competitor runs?
Yes. Paste the competitor's Facebook Page link, its name, or its Ad Library
Page id under Links, set Active or not to all for their past ads
too, and raise Max ads per search. Each row also carries the Page's About
tab: who owns it, where its admins are, and its name history.
Can I get only the number of ads?
Each row carries search_total_count, the Ad Library's own count for the
search. Set Max ads per search to 1 to read the count for the price of
one ad. A search with no ads saves no row, so it returns no count (and costs
nothing).
Can I run it from my own code, on a schedule, or with other apps? Yes. Like any Apify Actor, you can start it through the Apify API, run it on a schedule, and connect it to other apps with Apify's integrations and webhooks.
Is it legal to scrape the Meta Ad Library?
The Ad Library is a public transparency tool: anyone can see these ads without logging in. Check Meta's terms and the laws that apply to you before you use the data, and only collect personal data (such as a disclaimer's contact details) when you have a legitimate reason to. If you are unsure, ask a lawyer.
Support
Found a problem or missing a feature? Open an issue on the Issues tab and include the run's link.
This Actor is not affiliated with, endorsed by or sponsored by Meta or Facebook.