How to export the Facebook Ad Library to CSV, Excel or JSON
The Meta Ad Library shows every ad running on Facebook, Instagram, Messenger and Threads, to anyone, without an account. What it does not have is an export button. This page shows how to get a keyword search, an advertiser's whole catalogue or a single ad into a spreadsheet, what each row contains, and which filters are worth setting before you start.
What the Ad Library shows, and what it hides
Open facebook.com/ads/library, pick a country and type a keyword or a page name. For every ad you get the advertiser page, the ad text and title, the call to action, the landing link, the images or the video, the start date, whether it is still running, and the platforms it runs on. For ads shown in the European Union there is a transparency block with the total reach and the split by country, age and gender. For political and issue ads Meta adds spend and impression ranges and keeps them for seven years.
What it does not show: clicks, cost per result, or anything about performance. Nobody outside the advertiser has that. Anyone who sells you "competitor ad performance data" is estimating it from the running time and the number of versions, which you can do yourself with the export below.
The manual way, and why it stops at page two
The library loads about thirty ads per scroll and forgets your place when you refresh. Copying an advertiser with 400 active ads by hand is an afternoon, and by next week a third of it is stale. Screenshot tools give you pictures, not data you can sort by start date or group by landing page.
The export in three steps
- Open the Facebook Ads Library Scraper and type a keyword, paste an advertiser page ID (the number after
view_all_page_id=in a library URL), or paste the library URL itself. Several at once are fine. - Pick the country (or
ALL), the ad status, and any of the media, platform, category or start-date filters. Set how many ads you want per search. - Start it. Rows appear as they are found; when it finishes, download the dataset as CSV, Excel or JSON, or read it through the API from Google Sheets, n8n, Make or Zapier.
One hundred ads take about fifteen seconds, a thousand about a minute and a half. With the ad details switched on (advertiser info and the EU reach breakdown) it is roughly twice that.
What each row contains
| Column | Meaning |
|---|---|
pageName, pageID | The advertiser and its page ID, which you can paste back in to get everything else the page runs. |
isActive, startDateFormatted, endDateFormatted | Running now or not, and the dates. Days between them is the single most useful number in the whole export. |
snapshot.body.text, snapshot.title, snapshot.linkDescription | The ad copy as shown. |
snapshot.ctaText, snapshot.linkUrl | The button and the landing page. Group by landing domain and you see which offers get the budget. |
snapshot.images, snapshot.videos, snapshot.cards | Creative URLs: original and resized images, HD and SD video, and the cards of a carousel. |
publisherPlatform | Facebook, Instagram, Messenger, Audience Network, Threads. |
collationCount | How many versions of the ad Meta groups together. Ten versions means the advertiser is testing that concept hard. |
ad_details | Optional: the advertiser's About text, likes, Instagram handle and follower count, payer and beneficiary, and the EU reach by country, age and gender. |
The field names are the ones the official Apify Facebook Ads Scraper uses, so anything written for that tool reads this export unchanged.
Filters worth knowing
- Country.
ALLreturns an advertiser's global catalogue; a single country returns what people there actually see. For competitor work use the country you sell in. - Active only. Past ads are useful for seasonality; for "what works now" switch them off.
- Media type. Video only, image only, or ads without any creative (mostly text posts turned into ads).
- Started after. Run it weekly with last week's date and you get only the new launches.
- Exact phrase. A brand name or a product name; the default finds the words in any order.
Into Google Sheets every Monday
The scraper runs on a schedule and every run has a webhook, so the usual automation tools pick it up: an n8n, Make or Zapier workflow that starts the run, waits for it and appends the rows to a sheet is three steps. A ready-made n8n workflow is in the swipe-file repository folder next to the script that turns an export into a browsable page of ads.
Questions people ask
Is this allowed?
The Ad Library exists because Meta committed to ad transparency, and it shows the same ads to everyone, signed in or not. Reading public pages as a signed-out visitor is the position a US court protected in Meta v. Bright Data. Respect the creatives' copyright and use the data for research, not for republishing.
Why does my export have fewer ads than the number on the page?
The library's headline count includes every version of an ad; the list groups them. The export returns one record per group and tells you the size of the group in collationCount.
Can I get one specific ad?
Paste its library URL, the one with ?id=. You get the same record.
What does it cost?
$0.50 per 1,000 ads, platform usage and proxies included, no start fee, ad details included. The official Apify scraper for the same library charges $5.80 per 1,000.
Open the Facebook Ads Library Scraper Read: analysing a competitor's ads