« Facebook Ads Library Data Scraper

Facebook Ads Library API Video Downloads Scraper

Download Data to Excel & CSV Files

Steve Spagnola
Written by Steve Spagnola
Last updated April 23, 2024

Download Videos from Facebook Ads Library

If you need some creative inspiration for producing video advertisements, you can always “borrow” from what your competitors are doing on Facebook & Instagram.

Download Facebook Ad Videos

You can legally do this by using the Facebook Ads Library where you can jump to any advertiser or search term and see the video ads they’re running.

We’ll show you how to legally intercept this data from your web browser and transform it into a CSV file of ad creatives with URLs to their videos, which would theoretically allow you to download the raw HD video files of the advertisements you’re interested in.

1. Browse Facebook Ads Library

Head to the Facebook Ads Library and run a search for the type of ads you’re interested in or search for a specific advertiser like “Starbucks” and head to their page from the search auto-suggest box.

Once you’re on the page of the ad videos you want to download, look for the filter button and set media types to only show video ads (this step is optional).

When you’re happy with the ads showing on the page, right click on the page and hit “Inspect” to open up developer tools, which will begin recording your network traffic so you can capture the URLs to the videos.

Browse Ads from Any Advertiser

Now refresh the page to reload the first set of results and then scroll down through the page to get the Facebook Ads Library API to keep loading more and more ads into your web browser. Some advertisers like Starbucks have a few hundred ads running at once, so it may take a minute or two.

2. Export a HAR File

When you’re done scrolling through the results, find the “Network” tab under developer tools and click the down arrow labeled “Export HAR…” to download a HAR file containing all of the raw network data that Facebook sent to your browser, complete with full URLs to downloadable video files for the ads.

Click Parse Group

You’ll then want to upload that file to the HAR File Web Scraper to parse out the recorded traffic into a combined CSV file. Look for the group labeled /ads/library/async/search_ads/ and click “Parse Group” to get the data into downloadable collections.

3. Download Facebook Ads Videos

On the next page, you’ll see 2 collections that will be of interest. One will contain the “root” level ads shown in the Facebook Ads Library, which may be the simplest to download and analyze, as it will be the most straightforward. The other collection will contain a row per ad variation, which will contain more rows but contain duplicates ad the overall ad level.

Root Level Ads

Each row in the payload › results collection will reference a top-level ad shown on the Facebook Ads Library with a reference to the first “card” (or ad variation) for that root ad.

Main Advertising Data

Some ads will have multiple “variations,” like one variation for a portrait video and another variation for a square video. In practice, these are typically the same and you should see the URL to the video creative in the snapshot.cards[0].video_hd_url column and/or snapshot.videos[0].video_hd_url column.

Ad Creative Variations

If you need more granular data on the specific ad variations, you want to look for the payload › results › snapshot › cards collection.

Ad Creative Variations

Each row will be a specific ad variation and will contain the video URL in the video_hd_url column. If you click “Download CSV,” then you’ll see additional columns on the right of each ad variation that reference the root ad, so you can see exactly what the ad copy & landing pages are for every single ad variation collected.

Downloading Video URLs

While we can’t legally suggest that anyone attempt to download any of the video URLs found in the network traffic and shown in the files above (as it may violate the Facebook Terms of Service), if one hypothetically did, the files that are downloaded would likely be MP4 files.

Therefore, if downloaded, one would need to append .mp4 to the end of those filenames to see the videos properly.

Sign Up to Scrape Facebook Ads Library Video Downloads