Facebook Ad Archive
This Project aims to provide a searchable and complete copy of the political ads on the Facebook Ad LibrarySince 17.08.2023 it also contains ads run in the EU.
You can find further information on the source of the data and whole database downloads on Github
This project is not authorized or associated by Facebook in any way.
Here you can access ads by their ad/page id or search for them by their page name. You can even download the whole dataset!There are total {{ total_ads }} ads in the archive.
The access is restriced to people who can themselves access the Facebook Ad Library API. See the Disagreements with Facebook section on Github for more information why.
Get Access Not verified yet!Already Verfied!
You have to complete the following steps to receive access to the datasets:- Create a Meta developers account
- Get verified to run political ads here: https://www.facebook.com/ID. You have to get verified for running the ads to access the Ad Library!
- Create an App of categorie Other -> Business. You don't have to put it into Live App Mode, the developement mode is enough.
- Add Facebook Login with
https://ad-archive.nexxxt.cloud/verification
as Valid OAuth Redirect URI - Enter you App-Id below and Login using your Facebook account!
Available Dataset-Dump Downloads
Only accessable to people who got themselves verified!
These are very large full dumps of the database. They contain all ads crawled from the Facebook Ad Library. The data is typically stored in .bson files.
V6
Since V6 there is a _last_updated field. It's automatically updated to the current time whenever the ad crawled from the Facebook ad library. It doesn't matter if the data actually changed. This aims to allow knowledge of the persistence of ads inside the database. Older ads may not have the field, but still exist in the ad library.
V5
On the 17.08.2023 all EU ads since that date appeared in the database. It's now more than double the size before. EU ads contain extra fields as specificed above. The fields used for rendering have been removed (except for lost) and are now handled seperatly.
V4
Downloading the database into a JSON file and compressing it took me increasingly long. That's why I switched to compressed BSON files (bson.gz). These are native to mongodb and can be created way faster and more reliable. These are created using the mongodump tool and can be loaded into your own mongodb using mongorestore. You can also convert them into normal json files using their bsondump tool. In addition to this you can use the metadata file to restore the indices used in my database.
V3
Ads have been crawled using the empty query (*) across all countries. Should in theory now contain all ads in the library. Field `rendered` added for the previews. No `todo.json` collection file as the stats are wrong and weren't relevant for this crawl.
V2
**V2 and older:** `todo.json`-File: based on the Ad-reports and contains all pages crawled from with the crawled from with the timestamp of the last crawl and the paging cursor (after)Also contains page stats for multiple disclaimers and countries. Large pages should be complete now. Multiple reports from different dates were used for updating.
V1
I first crawled the German and US Library and then decided to create a full crawl.Full Crawl of all countries from all reports:
For this crawl `todo.json` contains a `lang` field specifying the report the page came from. The reports were all automatically loaded into the db using the `import_reports.py` script.
Individual countries crawled from:
- Germany (DE)
- USA (US)
Single Ad
Find Ads by Page ID or Page Name
Lost Ads
These Ads sorted by creation time weren't found on the Facebook Ad Library while trying to render them. This doesn't has to mean they are still lost!
Active Ads
These Ads sorted by creation time are still active. This means they've got a start but no stop time.
Latest Added/Updated Ads
This query uses the reverse natural order by MongoDB. Lastly added or updated ads will therefore show first. The "Load More" Button might return ads already loaded when new ads are added.