Facebook Ads Library Scraper: Meta Ads by Keyword or Page avatar

Facebook Ads Library Scraper: Meta Ads by Keyword or Page

Pricing

from $0.17 / 1,000 ads

Go to Apify Store
Facebook Ads Library Scraper: Meta Ads by Keyword or Page

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

Luzi

Maintained by Community

Actor stats

0

Bookmarked

6

Total users

5

Monthly active users

11 hours ago

Last modified

Features

Limited permissions

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

  1. Type one or more searches into Searches, or paste Facebook Page links or Ad Library links into Links.
  2. Optionally, set Max ads per search, Country and the other filters.
  3. 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

FieldWhat it doesDefault
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 ALLALL
Active or not (activeStatus)active, inactive or allactive
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 noneall
Exact phrase (exactPhrase)Match the search words as one exact phraseoff
Sort by (sortBy)relevance, most_recent, or for political ads impressions_high_to_low / impressions_low_to_highrelevance
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, whatsappall
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
}
FieldWhat it holds
ad_archive_idThe ad's id in the Ad Library
ad_library_urlA link to the ad in the Ad Library
positionIts place in the search's results, 1 = the first
page_name, page_idThe Page that runs the ad
page_urlA link to the Page
page_profile_picture_urlThe Page's picture
page_like_countThe Page's likes
page_categoriesThe Page's categories
page_is_deletedWhether the Page was deleted
is_activeWhether the ad is running now
start_dateThe day it started (ISO date)
end_dateThe last day it was shown (today for a running ad)
total_active_timeSeconds it ran, when the Ad Library gives it (some political ads)
publisher_platformsWhere it runs: FACEBOOK, INSTAGRAM, MESSENGER, THREADS, WHATSAPP, AUDIENCE_NETWORK
display_formatIMAGE, VIDEO, CAROUSEL, DCO (several versions), DPA (a product catalogue), MULTI_IMAGES …
body_textThe ad's text
title, captionThe headline and the link's caption
link_url, link_descriptionWhere the ad links to, and the line under the headline
cta_text, cta_typeThe button ("Shop now") and its kind
imagesEach image: full size and resized
videosEach video: HD and SD links and the preview image
cardsA carousel or catalogue ad's cards, each with its text, title, link, price line, button, image or video
card_countHow many cards the ad has (0 when it has none)
extra_texts, extra_links, extra_images, extra_videosThe other versions' texts, links, images and videos, when the ad has them
collation_id, collation_countThe group of versions the ad belongs to, and how many there are
categoriesThe Ad Library's categories for the ad (POLITICAL, UNKNOWN …)
contains_digital_created_mediaWhether Meta marks it as AI-made or digitally created
contains_sensitive_contentWhether Meta marks it as sensitive
is_reshared, root_reshared_post, branded_content, eventA reshared post, branded content or an event the ad promotes, when it does
byline, disclaimer_labelThe "Paid for by" line
paid_for_byWho paid for an issue, election or political ad
disclaimerThe disclaimer's details: the payer, the date it was submitted, its address, phone, email and website
spend, currencyAn issue, election or political ad's spend, as the range the Ad Library shows
impressions_text, impressions_indexIts impressions, as the range shown
reach_estimateIts estimated reach, as the range shown
targeted_or_reached_countriesThe countries it reached, when the Ad Library gives them
country_iso_code, brazil_tax_id, additional_info, ec_certificatesWhat the Ad Library shows for some countries' ads
gated_type, hide_data_status, state_media_run_label, report_count, has_user_reported, menu_itemsThe Ad Library's own marks on the ad
is_aaa_eligible, is_deemed_finserv, finserv_limited_delivery, tw_anti_scam_limited_deliveryMeta's rules that apply to the ad
ad_idThe ad's delivery id, when the Ad Library shows it
search_queryThe search it came from
search_page_idThe Page it came from
search_countryThe country searched
search_urlThe Ad Library link for that search
search_total_countHow many ads the Ad Library counts for that search ("~576 results"; 50,001 means more than 50,000)
search_page_name, search_page_urlFor a Page's ads: the Page you gave (some of its ads run under a partner's Page)
search_page_ownerThat Page's confirmed owner: name, city, state, postal code, country and phone, when Meta shows them
search_page_admin_countriesThe countries the Page's admins are in, with how many in each
search_page_historyThe Page's creation date and name changes
search_page_spend_lifetime, search_page_spend_weekly, search_page_spend_current_weekThe Page's spend on issue, election and political ads, by who paid
search_page_ig_username, search_page_ig_followers, search_page_ig_verifiedThe Page's Instagram account
search_page_about, search_page_category, search_page_likes, search_page_verification, search_page_entity_type, search_page_aliasThe 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_pagesThe Ad Library's other notes on the Page
input_urlThe 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

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:

InputWhat it takesDefault
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.

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.