Facebook Ads Library Scraper: Meta Ad Library API avatar

Facebook Ads Library Scraper: Meta Ad Library API

Pricing

$0.50 / 1,000 ads

Go to Apify Store
Facebook Ads Library Scraper: Meta Ad Library API

Facebook Ads Library Scraper: Meta Ad Library API

Scrape Meta's Facebook Ad Library by keyword or advertiser in any country: ad text, images, videos, start date, days running, platforms, EU reach and age/gender data, plus a plain-English summary per advertiser. $0.50 per 1,000 ads.

Pricing

$0.50 / 1,000 ads

Rating

0.0

(0)

Developer

Meridian Labs

Meridian Labs

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

7 days ago

Last modified

Share

Facebook Ads Library Scraper shows you every ad a competitor is running on Facebook and Instagram, how long each one has been live, and a plain-English summary of their strategy. Enter a brand name ("Nike"), a page link, a keyword or a pasted Ad Library link, pick the countries, and you get each ad's text, images and videos, start date and days running, active status, platforms, button and landing site. Switch on EU transparency data for reach in the EU and the age, gender and country breakdown. It costs $0.50 per 1,000 ads, everything included, and searches that fail or find nothing are free. The form is pre-filled with Nike's US ads, so the quickest way to see it is to click Start (about $0.02).

No Facebook account, cookies or login are needed: it reads the same public pages anyone can open at facebook.com/ads/library.

Why use this Facebook Ads Library scraper?

  • Everything in one price. Days running, EU reach and age/gender data, advertiser summaries and advertiser lookup by name all cost the same $0.50 per 1,000 ads. No start fee, no extra charge for details.
  • The ads that work, first. An ad that has run for 200 days is usually one that pays for itself. Sort by days_running and you have a competitor's proven creatives.
  • A summary per advertiser. How many ads they run, how many are active, their longest-running ad, formats, platforms, landing sites and the wording they keep repeating, in one row and one paragraph.
  • Fair billing. Meta's pages repeat ads; you pay once per ad per run. Failed searches, repeats and anything past your spending limit are free.
  • Search by name. Type "Nike" instead of hunting for a page ID.

What do the output fields mean?

Every row has a record_type:

  • ad (charged): one ad.
    • ad_id and ad_library_url: the ad's Library ID and its page in the Ad Library.
    • page_name, page_id, page_url, page_likes: the advertiser.
    • start_date, end_date (empty while it's still running), is_active, days_running (calendar days from the first to the last day, today for active ads).
    • ad_text, title, link_description, cta_text (the button), link_url and landing_domain.
    • display_format (IMAGE, VIDEO, CAROUSEL, DPA = catalogue ad, DCO = dynamic creative), image_urls, video_urls, video_preview_urls.
    • platforms: facebook, instagram, messenger, threads, whatsapp, audience_network.
    • versions: how many versions of this ad the advertiser runs. contains_ai_media: Meta's AI-generated media label.
    • eu: EU transparency data (option): total_reach, top_countries, targeting_locations, targeting_age_min/max, targeting_gender, payer, beneficiary, reach_breakdown (by country, age range and gender).
    • political: spend, impressions and audience ranges, for ads about social issues, elections or politics.
  • advertiser (free): one summary per advertiser you searched for, and per advertiser with 3 or more ads in the run.
  • search (free): one line per search and country: what was found, saved and charged, or why not.

What can you use it for?

  • Competitor research: see every ad a brand is running in a country, and which ones have run the longest. An ad that has been live for 200 days is usually one that works.
  • Creative inspiration: pull the ads for a keyword ("protein powder", "car insurance") with their images, videos and copy, then sort by days_running.
  • Agency reporting and monitoring: schedule a weekly run for your clients' competitors and track new and stopped ads.
  • EU research: reach, age and gender breakdowns and payer details for ads shown in the EU, from Meta's Digital Services Act disclosures.
  • AI agents and pipelines: stable field names, a documented schema and table views.

How do I scrape the Facebook Ads Library?

  1. Add search terms, advertisers or Ad Library links (any mix).
  2. Pick countries (two-letter codes such as US, GB, DE, AU, or ALL). Each search runs once per country.
  3. Set Max ads per search. You pay per ad, so this is also your cost cap.
  4. Optional filters: active status, media type, ad category, and shown from / shown until dates.
  5. Click Start, then open the Ads, Advertisers or Searches view, or export JSON, CSV or Excel.

How do I see all of a competitor's ads?

Put the brand in Advertisers: a name ("Nike"), their Facebook page link (facebook.com/nike), their numeric page ID, or a link to their Ad Library page. Names are matched the way the Ad Library search box matches them, and the search row tells you which page was used (advertiser_name, advertiser_page_id), so you can check it's the right one. The advertiser's summary row comes with it.

Can I paste a search from the Ad Library website?

Yes. Set up a search on facebook.com/ads/library, copy the address bar into Ad Library links, and the Actor runs that exact search with its country, status, media type and date filters.

What does the advertiser summary look like?

A real one, from a US run in October 2026:

Nike has 34 ads in this run (US), all active. The longest has been running 486 days (since 20 Jun 2025). Formats: catalogue (product feed) 100%. Shown on Facebook, Instagram. Main landing site: nike.com. Recurring wording: "goes hard" (10 ads), "never misses" (9 ads), "gear" (34 ads), "field" (10 ads).

The same row has the numbers as separate fields: ads_in_run, active_ads, ads_in_library, oldest_start_date, newest_start_date, longest_running_days and a link to that ad, median_days_running, formats, platforms, top_landing_domains, top_ctas and top_phrases. It's worked out from the ads themselves, with no AI service involved, so it costs nothing extra.

What is the EU transparency data?

For ads shown in the EU, Meta publishes how many people saw the ad in the EU, a breakdown by country, age range and gender, the targeting (locations, ages, gender), and who paid for the ad and who it benefits. Switch on EU transparency data to add these to each ad's eu field. It takes one extra lookup per ad, so runs take about twice as long; the price per ad doesn't change. In our October 2026 test, 120 of 120 ads from German and French searches came back with it.

How much does it cost?

$0.50 per 1,000 ads ($0.0005 per ad). Searches that fail, find nothing or get skipped are free.

EventPriceCharged when
Ad$0.0005An ad is saved to your dataset. Each ad is charged once per run, even if several of your searches find it.
  • Free: search status rows, advertiser summaries, searches that fail or return no ads, ads already returned by an earlier search in the same run, and anything skipped because of your spending limit or the run's time limit.
  • Examples: 50 ads = $0.025. One brand's 400 ads = $0.20. 20 searches of 500 ads = 10,000 ads = $5.
  • Free to try: Apify's free plan includes $5 of usage each month, which is about 10,000 ads. Platform usage is included in the price.
  • Set a maximum cost per run in the run options and the Actor stops exactly there.

How fast is it?

The first 30 ads of a search arrive in a few seconds. After that, Meta serves ads 10 at a time, so a 500-ad search takes about two minutes. Five searches run at once by default, so in our test 20 searches of 500 ads (10,000 ads) took about 8 minutes. The EU option roughly doubles that.

Output example

One ad row (image links shortened):

{
"record_type": "ad",
"ad_id": "1547214436957116",
"ad_library_url": "https://www.facebook.com/ads/library/?id=1547214436957116",
"page_id": "6053772414",
"page_name": "Pizza Hut",
"page_url": "https://www.facebook.com/pizzahutus/",
"page_likes": 32565142,
"is_active": false,
"start_date": "2026-07-16",
"end_date": "2026-08-31",
"days_running": 47,
"ad_text": "Get the $10 Medium Stuffed Crust you love plus MORE starting at just $3 on the Throwback Value Menu.",
"cta_text": "Order now",
"link_url": "https://www.pizzahut.com/menu/throwbackmenu?utm_source=meta&utm_campaign=tbvmcap",
"landing_domain": "pizzahut.com",
"display_format": "DCO",
"image_urls": ["https://scontent-dfw5-1.xx.fbcdn.net/v/t39.35426-6/744198685_..._n.jpg?..."],
"platforms": ["facebook", "instagram", "threads"],
"versions": 1,
"contains_ai_media": false,
"political": null,
"eu": null,
"search_input": "pizza",
"search_country": "GB",
"scraped_at": "2026-10-18T11:22:47Z"
}

How do I track a competitor's ads every week?

  1. Fill in the input (their name under Advertisers, your countries, Active and inactive) and click Save as a new task.
  2. Open Schedules, then Create new, pick the task and choose weekly.
  3. Compare runs on ad_id: new IDs are new ads, and an ad whose is_active turned false has stopped.

How do I send the data to Google Sheets, Make, Zapier, n8n or an AI agent?

  • Google Sheets: schedule a saved task, then put this in cell A1 and allow access when Sheets asks: =IMPORTDATA("https://api.apify.com/v2/acts/meridianlabs~facebook-ads-library-scraper/runs/last/dataset/items?status=SUCCEEDED&format=csv&view=ads&token=YOUR_TOKEN") Use view=advertisers for the summaries. Anyone who can open the sheet can see the token, so make one with limited permissions in Console, Settings, API & Integrations.
  • Make, Zapier, n8n: use the Apify "Run an Actor" or "Actor run finished" step, then "Get dataset items".
  • AI agents (MCP): add https://mcp.apify.com?tools=meridianlabs/facebook-ads-library-scraper to your MCP client.
  • Python (pip install apify-client):
from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("meridianlabs/facebook-ads-library-scraper").call(run_input={
"advertisers": ["Nike"], "countries": ["US", "GB"], "maxAdsPerSearch": 200, "activeStatus": "all",
})
for row in client.dataset(run.default_dataset_id).iterate_items():
if row["record_type"] == "ad":
print(row["page_name"], row["start_date"], row["days_running"], row["landing_domain"])

Limitations

  • Only what the public Ad Library shows. Spend and impressions are published for ads about social issues, elections or politics, not for ordinary commercial ads. Reach and age/gender data exist only for ads shown in the EU.
  • Image and video links expire after a few days (Meta signs them). Download the files you want to keep.
  • The Ad Library caps its own counts at about 50,000 per search (ads_in_library shows 50,001 for "more than 50,000"), and its ordering is its own. Narrow a big search with dates, media type or a single advertiser.
  • Dates are Meta's. start_date is the day the ad started running; for active ads days_running counts to today.
  • Up to 10,000 ads per search and 500 searches per run.

FAQ

The Actor reads the public Ad Library pages that anyone can open without logging in. It never logs in and doesn't use accounts, cookies or tokens. In 2024 a US court found that Meta's terms didn't stop the scraping of public, logged-out data (Meta v. Bright Data), and Meta dropped the case. You are responsible for how you use the data, especially any personal data, under the laws that apply to you. This isn't legal advice.

Do I need a Facebook account or cookies?

No.

Does it collect personal data?

Ads are published by businesses and pages. Some advertisers are individuals (creators, small sellers), and the EU disclosures can name a person as payer or beneficiary, so treat those fields carefully under GDPR and similar laws. The Actor doesn't collect personal contact details and keeps nothing beyond your run's dataset.

Why did a search return fewer ads than the Ad Library says?

Usually because of Max ads per search. If a search stopped early, its search row says why in reason (for example your spending limit, the run's time limit, or Meta refusing a page after several retries). You are only charged for the ads you got.

Why does an ad appear under one search and not another?

Each ad is returned once per run. If a later search finds the same ad, it's counted in that search's duplicates_skipped and not charged again.

What happens if a run times out or restarts?

Searches that finished aren't repeated, and ads already saved are never charged twice. Searches the run didn't reach are listed as skipped and are free.

What happens when Meta changes the Ad Library?

Meta changes its internal query IDs often. The Actor detects this and picks up the new ones from Meta's public page on its own, and we run a daily test that tells us when anything else changes.

More from Meridian Labs

Support

Something looks wrong, or you need a field we don't return? Open an issue on the Issues tab with the input you used. We read every one.