If you run ads, sell online or work at an agency, the Meta Ad Library is the best free competitive intelligence source there is. Every active Facebook and Instagram ad of every brand is in it, with the creative, the copy and the date it started.
The problem is getting the data out. There is no export button, the page scrolls forever, and the official API won't return most commercial ads.
This post covers what the library and its API actually give you, the manual workflow, what I learned building a scraper for it, and how to get a clean dataset plus daily "new ads" alerts in a few minutes.
Disclosure: I built the Meta Ads Library Scraper & Competitor Ad Monitor Actor on Apify that I use below. Everything else in this post works without it.
What the Meta Ad Library shows (and what it doesn't)
On the website you can search any brand or keyword, in any country, and see:
- every active ad of a Page: image, video or carousel, ad copy, headline, call to action;
- the start date of each ad and the platforms it runs on (Facebook, Instagram, Messenger, Audience Network, Threads);
- how many ads share the same creative;
- for ads about social issues, elections or politics, and for ads delivered in the EU, extra transparency data such as reach, spend ranges and targeted countries.
What about the official Ad Library API?
Meta does have an Ad Library API, but read the scope carefully. Meta describes it as covering ads about social issues, elections or politics, plus ads delivered to the EU and associated territories. To use it you need a developer account, and you have to confirm your identity and location.
In practice, if your competitor is a US e-commerce brand running normal product ads in the US, the API will not return them. The website will. That gap is why most marketers end up scraping the website.
The manual way
For a one-off look at one brand, the website is enough:
- Open facebook.com/ads/library.
- Choose the country and the "All ads" category.
- Type the brand name and select its Page in the suggestions. This fills
view_all_page_idin the URL, so you only see that advertiser. - Filter by active status, platform or media type, then scroll.
It breaks down quickly when you need to:
- compare 5 or 10 competitors;
- sort ads by how long they've been running (the long runners are usually the winners);
- share the result with a client or your team;
- know what changed since last week;
- keep the creatives. Image and video links are signed and expire.
If you want to build a scraper yourself
Here's what I ran into, so you can skip a few days of trial and error:
- You need a real browser. The first batch of ads is server-rendered as JSON inside
<script type="application/json">tags. More ads load through GraphQL requests as you scroll. Walking that JSON for objects that have anad_archive_idand asnapshotgives you clean ads. - Datacenter IPs get nothing. In my tests, the same search from a cloud datacenter IP returned zero ads. Residential IPs work.
- The page is heavy. Meta preloads videos and images as you scroll. Blocking requests to the
fbcdn.netmedia hosts took a run from about 48 MB of traffic to about 12 MB. That matters a lot when you pay for residential bandwidth. - Keyword search is fuzzy. "decathlon" also returns other Pages that use the word. Use the Page ID to follow exactly one advertiser.
If you'd rather not maintain that, here is the hosted version.
Step by step with the Apify Actor
1. Run it from the Console (no code)
Open the Actor page and click Try for free. The free Apify plan includes monthly credits, which is enough for a few thousand ads.
Fill in the input. All fields are optional except one search term or Page ID:
{ "searchTerms": ["decathlon"], "pageIds": ["122695097770591"], "country": "FR", "activeStatus": "ACTIVE", "mediaType": "ALL", "maxAdsPerSearch": 200 } -
searchTerms: brand names or keywords. Put a term in double quotes for an exact phrase. -
pageIds: a numeric Page ID or an Ad Library URL containingview_all_page_id=…. -
country: an ISO code (US,GB,DE…) orALL. -
activeStatus:ACTIVE,INACTIVEorALL. -
mediaType:ALL,IMAGE,VIDEOorMEME.
Click Start. In my tests a 100-ad search finishes in under a minute.
2. What you get
Each ad is one flat JSON row. Here is a real one (image URLs shortened):
{ "adId": "1749363949758525", "pageName": "Decathlon France", "pageId": "122695097770591", "pageUrl": "https://www.facebook.com/Decathlon.France/", "pageLikes": 1075826, "pageCategories": ["Sporting Goods"], "isActive": true, "firstShown": "2026-06-05", "lastShown": "2026-11-18", "daysRunning": 167, "platforms": ["FACEBOOK", "INSTAGRAM", "MESSENGER", "THREADS"], "displayFormat": "DPA", "isDynamicProductAd": true, "bodyText": "Retournez sur le terrain avec Decathlon ! 🏂 …", "title": "{{product.name}}", "caption": "decathlon.fr", "ctaText": "Shop now", "landingUrl": "http://www.decathlon.fr/", "imageUrls": ["https://scontent…fbcdn.net/…"], "cardsCount": 6, "reachEstimate": null, "spend": null, "targetedCountries": [], "adLibraryUrl": "https://www.facebook.com/ads/library/?id=1749363949758525", "searchTerm": "decathlon", "country": "FR" } A few fields worth knowing:
-
daysRunningis the number to sort by. An ad that has been live for 167 days is almost certainly profitable. -
isDynamicProductAdflags catalog ads, whose headline is a template like{{product.name}}. -
reachEstimate,spendandtargetedCountriesare only filled when Meta publishes them: EU-delivered ads, and political or issue ads.
The run also saves two files in its key-value store:
-
SUMMARY(JSON), one entry per advertiser: ads collected, active ads, new ads in the last 7 and 30 days, longest-running ad, platforms, formats and top landing domains. -
REPORT(HTML), a shareable page with the same summary and the ads. It's handy to send to a client as is.
3. Call it from Python
pip install apify-client from decimal import Decimal from apify_client import ApifyClient client = ApifyClient("YOUR_APIFY_TOKEN") run = client.actor("stumadethat/meta-ads-library-monitor").call( run_input={ "searchTerms": ["decathlon", "intersport"], "country": "FR", "activeStatus": "ACTIVE", "maxAdsPerSearch": 200, }, max_total_charge_usd=Decimal("1.00"), # hard cap for this run ) ads = client.dataset(run.default_dataset_id).list_items().items # The ads that have been running longest are usually the winners for ad in sorted(ads, key=lambda a: a["daysRunning"] or 0, reverse=True)[:10]: print(ad["daysRunning"], ad["pageName"], ad["ctaText"], ad["landingUrl"]) # Per-advertiser summary summary = client.key_value_store(run.default_key_value_store_id).get_record("SUMMARY")["value"] for s in summary: print(s["advertiserName"], s["adsCollected"], "ads,", s["newAdsLast7Days"], "new this week") This is written for apify-client 3.x. On 2.x, run is a dict, so use run["defaultDatasetId"] and run["defaultKeyValueStoreId"].
4. Turn it into a competitor monitor
This is the part I actually built the Actor for. Set:
{ "pageIds": ["122695097770591"], "country": "FR", "onlyNewAds": true } The first run stores a baseline of the ads it has seen. Every later run with the same search (same terms, country, status and media type) returns only ads it has never seen before.
To run it every morning:
- On the Actor page, save your input as a Task.
- Go to Schedules → Create new, pick a time (for example daily at 08:00) and add the task.
- Optionally, add an integration on the task (email, Slack or a webhook) to be notified when a run finishes.
If you want to start from scratch later, change monitorStoreName, and the history resets.
5. Export to CSV, Excel or Google Sheets
- From the Console: open the run's Storage tab and export the dataset as CSV, Excel or JSON.
- From Python:
csv_bytes = client.dataset(run.default_dataset_id).get_items_as_bytes(item_format="csv") open("meta_ads.csv", "wb").write(csv_bytes) - Into Google Sheets automatically: Make, Zapier and n8n all have Apify modules. Trigger on "run succeeded" from your schedule, then append the dataset rows to a sheet.
Pricing and limits
The Actor is pay-per-result:
| Event | Price |
|---|---|
| Ad | $0.80 per 1,000 ads |
| Summary + HTML report | $0.01 per search |
Example: 500 ads from 3 searches cost $0.43. You can set a maximum cost per run, and the Actor stops cleanly when it reaches it.
Honest limits:
- It uses residential proxies by default, because Meta returns nothing to datacenter IPs. Don't switch that off.
- Image and video links expire. They are signed by Meta, so download what you want to keep.
- Reach and spend data only exist for the ads Meta publishes them for (EU-delivered ads, and political or issue ads).
- Keyword searches are fuzzy. Use a Page ID for exact tracking.
Is it legal?
The Actor only reads ads that Meta publishes in its public Ad Library, without logging in and without any account. That data exists precisely so that anyone can see who advertises what. Still, check Meta's terms and your local laws for your use case, and don't use the data to target individuals.
The same workflow for Google and TikTok
Competitors rarely advertise on one network only. I built two sister Actors with the same input style, the same daysRunning, the same monitoring mode and the same HTML report:
- Google Ads Transparency Scraper & Competitor Ad Monitor: Search, YouTube, Shopping, Maps and Play ads of any advertiser, in any country.
- TikTok Ads Library Scraper & Competitor Ad Monitor: TikTok ads shown in Europe, with targeting, payer and landing page.
If something is missing for your use case, open an issue on the Actor page. I read them.


