Meta Ad Library Scraper – Facebook & Instagram Ads avatar

Meta Ad Library Scraper – Facebook & Instagram Ads

Pricing

Pay per usage

Go to Apify Store
Meta Ad Library Scraper – Facebook & Instagram Ads

Meta Ad Library Scraper – Facebook & Instagram Ads

Scrape the public Meta Ad Library (Facebook, Instagram, Messenger) by keyword, advertiser page or filtered URL: ad text, dates, platforms, call to action and destination domain. No login. Residential proxy by default.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Douglas Gouvea Manoel

Douglas Gouvea Manoel

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

36 minutes ago

Last modified

Categories

Security

Limited permissions

Share

Meta Ad Library Scraper – Facebook & Instagram Ads by Keyword or Page

Meta Ad Library Scraper

Watch the demo: https://youtu.be/lJhZ60G_6OU

Part of Errand Code: https://errandcode.com/meta-ad-library-scraper

Scrape the public Meta Ad Library (ads on Facebook, Instagram, Messenger and Audience Network) as clean dataset rows, without a login or a Facebook account. Search by keyword, by advertiser page (numeric page ID), or paste an Ad Library URL with your filters already applied.

Example, input {"pages": ["15087023444"], "country": "BR", "activeStatus": "all", "maxAds": 200} returned (real run, 9 Nov 2026) 186 unique ads of the Nike page in 23 requests, 0 retries and 39 s. One of them: ad 1702938977100376, active since 2025-04-07 on Facebook, Instagram, Audience Network and Messenger, text "Bring sports more fully into your day with the Nike App.", call to action "Install now", destination domain itunes.apple.com.

What you get (one row per ad)

adArchiveId, adUrl, pageId, pageName, pageProfileUrl, pageLikeCount, isActive, startDate, endDate, platforms, displayFormat, text, title, linkDescription, ctaText, linkUrl, linkDomain, imageUrls, videoUrls, cards (carousel items), variations (versions of the same ad that Meta groups together), isBrandedContent, searchCountry, searchQuery, sourceUrl, scrapedAt.

If a search is blocked, finds nothing or an input cannot be used, you get a free status row (blocked, no_results, error, invalid_input) with a reason instead of ads.

Input

FieldDefaultNotes
searchTermsnikeKeywords or brand names, one search each
pages–Numeric Facebook page IDs, profile.php?id= links or Ad Library links with view_all_page_id
libraryUrls–Links copied from facebook.com/ads/library, filters included
countryUSUS, BR, GB… or ALL
activeStatusactiveactive, inactive, all
mediaTypeallall, image, video, meme, none
exactPhrasefalseMatch the keyword as an exact phrase
maxAds50Ads per search. Volumes above 200 per search are not tested
proxyConfigurationResidential (Apify Proxy)Residential by default. See Why Residential proxy below

Page names such as facebook.com/nike cannot be resolved without a login: use the numeric page ID (it is in the Ad Library link of that advertiser).

Why Residential proxy is the default

The first page of results (about 27–30 ads) comes with the Ad Library page itself. The next pages come from Meta's own paging request, which Meta rate-limits (Rate limit exceeded, code 1675004). Without a proxy and with datacenter IPs that paging failed in every attempt of our comparison, so only the first page came back. On a rate limit the Actor waits, retries and switches to a new exit IP.

Our tests on 9 Nov 2026:

ProxyResult
None (Apify datacenter IP)3 of 3 searches returned ads, only the first page (27–30 each, 50 requested)
Datacenter (Apify Proxy)3 of 3 returned ads, only the first page (27–30 each)
Residential (default)10 of 10 searches returned ads; 8 of 10 reached the 50 requested, 2 stopped around 30

Volume test on Residential: "running shoes", US, active ads, maxAds 200: 200 of 200 unique ads, 21 requests, 0 retries, 41 s. Nike page, BR, all statuses, maxAds 200: 186 unique ads, 23 requests, 0 retries, 39 s; the run ended without a status row, probably because that is the page's total for the filter (not confirmed). Residential traffic was about 1 MB per 200 ads and is part of your Apify platform usage.

These are small samples, not a guarantee.

Pricing

Early access: no Actor fee yet. You pay only standard Apify platform usage, including the Residential proxy (in our tests on 9 Nov 2026: about US$ 0.05–0.08 per 1,000 ads). Pay-per-result pricing may be introduced later; Apify notifies users 14 days in advance.

Pairs with Google Ads Transparency

The Google Ads Transparency Scraper covers Google's ad library. This Actor returns pageName and linkDomain; the Google one returns the advertiser name and, for search ads, the display URL. You can line up the same advertiser in both libraries yourself, for example by brand name or by a domain such as nike.com. There is no automatic cross-matching and no monitor mode in this version.

Limits

  • Not affiliated with Meta. Independent tool.
  • Public Ad Library data only, no login. Respect Meta's terms of use and check what you may do with the data.
  • Meta rate-limits the paging: some searches stop around 30 ads even on Residential. Volumes above 200 ads per search were not tested.
  • It depends on undocumented Ad Library internals, including a query ID that Meta can change. When that happens, runs fail with a clear status and the Actor needs maintenance.
  • Partnership (branded content) ads appear under the advertiser's pageId with the creator's name in pageName; isBrandedContent marks them.
  • Meta does not show spend or reach for non-political ads, so those figures are not collected.
  • Information only, not legal or advertising advice.

Develop

uv venv --python 3.13 .venv && uv pip install --python .venv/bin/python -r requirements.txt -r requirements-dev.txt
.venv/bin/python -m pytest -q
uvx ruff check .
.venv/bin/python scripts/live_local.py "nike" page:15087023444 # real request from your machine, no proxy

How it works: the page's own HTML carries the first ~30 ads as JSON; the following pages come from the same GraphQL endpoint the website uses. No browser is needed.

More from Errand Code

This Actor is built and maintained by Errand Code. See the other tools: an Americanas Product Scraper, a Buscapé Price Scraper, a Google Ads Transparency Scraper, a Google Trends Scraper, YouTube Transcripts, a CNPJ Due Diligence Actor, an AI visibility check (GEO audit), a Google Sheets add-on and MCP servers for AI agents. Not affiliated with Meta.