Facebook Ads Library Scraper: Meta and Instagram ads avatar

Facebook Ads Library Scraper: Meta and Instagram ads

Pricing

from $0.50 / 1,000 ads

Go to Apify Store
Facebook Ads Library Scraper: Meta and Instagram ads

Facebook Ads Library Scraper: Meta and Instagram ads

Scrape Meta's Ad Library by keyword, advertiser page or Ad Library URL: ad text, images, videos, carousel cards, links, dates, platforms, and spend, impressions and EU reach where Meta shows them. Any country, political ads included. No login, no browser.

Pricing

from $0.50 / 1,000 ads

Rating

0.0

(0)

Developer

Spyridon Pikoulas

Spyridon Pikoulas

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

Facebook Ads Library Scraper

Scrape Meta's Ad Library, the public archive of every ad running on Facebook, Instagram, Messenger, Threads and the Audience Network:

  • Search terms: the ads whose text contains a keyword, or an exact phrase.
  • Advertisers: every ad a Facebook page runs, by page name (Nike), page ID or page URL.
  • Ad Library URLs: paste a search from facebook.com/ads/library with its filters, an advertiser's ads (view_all_page_id=...), or a single ad (?id=...).

Every ad comes with its advertiser (name, ID, page URL, likes, categories), its text, title, link, call to action, images, videos (HD and SD MP4s), carousel and catalog cards, the dates it started and stopped, whether it is still running, the platforms it runs on, and how many ads share its creative. Political and issue ads also come with who paid for them, their spend, impressions and reach. Turn on includeAdDetails for what the ad's details panel shows: its EU reach by country, age and gender, the ages, gender and places it targets, its payer and beneficiary, and the advertiser's Instagram account.

You can filter by country (or all countries), active or inactive, ad category (political, housing, employment, credit), media type, platform, language and dates. It needs no login and no browser. It costs $0.50 per 1,000 ads.

What people use it for

  • Competitor research: every ad a competitor runs, since when, and on which platforms.
  • Creative inspiration: the ads that have run longest, with their images and videos.
  • Political ad tracking: who pays for issue ads, how much they spend and how many people see them.
  • Lead generation: the businesses advertising in a niche or a country, with their pages.

How to scrape the Facebook Ads Library

  1. Click Try for free; Apify's free plan covers a first run.
  2. Enter Search terms, Advertisers (Facebook pages) or Ad Library URLs, the countries, and how many ads you want.
  3. Click Start, then download the results as JSON, CSV, Excel or HTML, or read them through the API.

An input with more options:

{
"searchTerms": ["running shoes", "meal kit"],
"pages": ["Nike", "https://www.facebook.com/HelloFreshUS"],
"urls": ["https://www.facebook.com/ads/library/?active_status=all&ad_type=political_and_issue_ads&country=US&q=climate"],
"countries": ["US", "GB"],
"activeStatus": "active",
"mediaType": "video",
"platforms": ["instagram"],
"startDate": "2026-09-01",
"maxAds": 500
}

Each search term and page runs once per country; maxAds counts per search and country. An ad found by two searches comes once. The filters don't apply to urls, which keep their own.

Output

An ad:

{
"adArchiveId": "925321173274919",
"url": "https://www.facebook.com/ads/library/?id=925321173274919",
"pageId": "89516513179",
"pageName": "Nordstrom Rack",
"pageUrl": "https://www.facebook.com/NordstromRack/",
"pageLikes": 2518158,
"pageCategories": ["Clothing (Brand)"],
"isActive": true,
"startDate": "2026-08-03T07:00:00+00:00",
"endDate": "2026-09-27T07:00:00+00:00",
"platforms": ["FACEBOOK", "INSTAGRAM", "MESSENGER"],
"displayFormat": "VIDEO",
"title": "Fast & Free Pickup",
"body": "Buy online and pick up in store for free! Get up to 70% off Nike, Vince, Madewell, adidas and more.",
"caption": "Nordstromrack.com",
"linkUrl": "https://fb.com/canvas_doc/1072291375736811",
"ctaText": "Learn more",
"images": [],
"videos": [{"hdUrl": "https://video-cph2-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQPMHFei….mp4", "sdUrl": "https://video-cph2-1.xx.fbcdn.net/….mp4", "previewUrl": "https://scontent-cph2-1.xx.fbcdn.net/….jpg"}],
"cards": [],
"collationCount": 2,
"search": "nike",
"country": "US"
}

A political ad adds its spend and reach:

{
"pageName": "Natural Allies for a Clean Energy Future",
"title": "Accelerating Our Clean Energy Future",
"categories": ["POLITICAL"],
"paidFor": "Natural Allies, Inc.",
"spend": "$10K - $15K",
"currency": "USD",
"impressions": ">1M",
"reach": ">1M"
}

With includeAdDetails, an ad shown in the EU adds:

{
"euTotalReach": 1177115,
"euAgeGenderReach": [{"country": "BE", "ageGender": [{"age": "18-24", "male": 84, "female": 57, "unknown": 2}]}],
"targetAges": {"min": 18, "max": 65},
"targetGender": "All",
"targetLocations": [{"name": "Anglet, France", "type": "CITY", "excluded": false}],
"payer": "adidas AG",
"beneficiary": "adidas AG",
"pageVerification": "BLUE_VERIFIED",
"instagramUsername": "adidasoriginals",
"instagramFollowers": 33660400
}

Catalog ads (DPA, DCO) show their products as cards, and their title and body come from the first card.

Use it as an API

One call runs it and returns the results as JSON (for runs under 5 minutes; longer ones start a run and read its dataset). Apify's Python and JavaScript clients, and its Make, Zapier and n8n integrations, work the same way.

curl -X POST "https://api.apify.com/v2/acts/pikoulas~facebook-ads/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"searchTerms": ["running shoes"], "countries": ["US"], "maxAds": 50}'

AI agents can call it as a tool through Apify's MCP server: https://mcp.apify.com?tools=pikoulas/facebook-ads.

How much does it cost to scrape the Facebook Ads Library?

You pay $0.0005 per ad, which is $0.50 per 1,000, with or without the ad details. Runs that go through Apify's residential proxy also pay its traffic, $0.0012 per 100 KB: about 3 KB an ad, or 15 KB with the details, so about $0.04 or $0.18 per 1,000 ads. There are no monthly fees.

Good to know

  • Meta shows spend, impressions and reach only for political and issue ads, and EU reach only for ads shown in the EU. Other ads have them as null.
  • A running ad's endDate is today's date.
  • Meta limits how fast one IP can search the library. When it starts refusing, the actor switches to Apify's residential proxy by itself, with its traffic charged as above.

FAQ

It collects only what Meta's Ad Library shows publicly, without logging in. Scraping public data is generally legal, but personal data is protected by laws such as the GDPR and the CCPA, and Meta's terms may limit how you use what you collect. If you're unsure, ask a lawyer; Apify's Is web scraping legal? is a good start.

Something missing or not working?

Open an issue on the Issues tab with the input you used, or ask there for a field you need.