# Facebook Video Ads: HD Video Links from Ad Library (`deepmine/facebook-video-ads`) Actor

Find Facebook and Instagram video ads by keyword, advertiser or country in the Meta Ad Library and get HD and SD MP4 links, preview images, ad text, headline, CTA, landing page and start date for each ad. Build swipe files and creative research sets. No login.

- **URL**: https://apify.com/deepmine/facebook-video-ads.md
- **Developed by:** [DeepMine](https://apify.com/deepmine) (community)
- **Categories:** Marketing, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 ads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Facebook Video Ads: HD Video Links from Ad Library

Search the Meta Ad Library for **video ads only**, by keyword, advertiser or country, and get each ad's **MP4 video links (HD and SD)** with its text, headline, button, landing page and start date.

| Advertiser | Ad text | Headline | Button | Format | Started | Days active |
|---|---|---|---|---|---|---|
| Pureskin | Say goodbye to acne and hello to confidence 👋 ☁️ 1… | End Acne Forever. | Shop now | Video | 2026-01-06 | 264 |
| Beauty From Bees | If your skin feels tight, flaky, or itchy no matte… | 20% OFF: Code SERUM20 | Shop now | Video | 2026-01-19 | 251 |
| Eau Thermale Avène | Powerful cleanse, gentle on skin. NEW! Dermatologi… | Trusted by Dermatologists | Learn more | Video | 2026-08-19 | 39 |

<sub>Collected 2026-09-28 from the prefilled run (`skincare`, US, videos, most impressions first): 99 of the 100 ads came with a video file link. Every row also has the video's preview picture, the landing page, the platforms and the ad's Ad Library link.</sub>

**$0.60 per 1,000 ads** on Starter ($0.75 Free, $0.50 Scale, $0.40 Business); with ad details $1.25 per 1,000 ($1.40 Free, $1.15 Scale, $1.05 Business). The prefilled run (up to 100 ads) costs about $0.06.

Use it for swipe files, creative research and hook libraries: long-running video ads (*Days active*) are usually the ones that work. No Facebook account, login or cookies.

### Where the video links are

- `videoUrl`: the ad's video file (standard definition MP4), in the clean part of every row and in the **🎨 Creatives** table.
- `snapshot.videos[]` (`videoHdUrl`, `videoSdUrl`, `videoPreviewImageUrl`): every video of the ad in **HD and SD**. Dynamic and carousel ads keep each card's media in `snapshot.cards[]`, with the same `videoHdUrl` / `videoSdUrl` fields.
- `image`: the video's preview picture.

**Download soon.** The links are Meta's signed CDN links (fbcdn.net) and stop working about 5 days after the run. The Actor returns links, not the files.

### What you can do with it

- **Creative research / ad spy**: every video ad running for "skincare", "running shoes" or any product, most impressions first, in any country.
- **Swipe files and hook libraries**: download the videos with their first lines, headlines and buttons.
- **Competitor video ads**: put a brand's Facebook page in **Advertisers** to pull just its video ads.
- **New creatives as they launch**: turn on **Only new ads** (under *Filters*) and schedule the run daily.

### Input

| Field | What it does |
|---|---|
| **Search terms** | Keywords, as in the Ad Library search box. One search per line. |
| **Advertisers** | A Facebook page link (`facebook.com/nike`), a page id (`15087023444`), an advertiser's Ad Library link, or the page name exactly as it appears on its ads. |
| **Media type** | Videos (the default). Pick all, images, memes, images and memes, or no media to get other ads instead. |
| **Country** | Two-letter code where the ads ran (`US`, `GB`, `DE`, ...) or `ALL` (US in the form, `ALL` if left out). |
| **Max ads per search** | Stop each search after this many ads (100 in the form, 200 if left out, up to 10,000). You pay per ad. Searches read about 1,000 ads in 3 minutes. |
| **Include ad details** | Adds the advertiser's profile and EU/UK reach data to each ad, at the with-details price (one more request per ad, so slower). |

Under **Filters and Ad Library URLs**:

| Field | What it does |
|---|---|
| **Ad Library URLs** | Searches copied from [facebook.com/ads/library](https://www.facebook.com/ads/library/). The link's own filters are used. |
| **Ad status** | Active (default), inactive, or both. |
| **Only new ads (monitor)** | Return only ads started since the last run that this Actor hasn't returned before for the same search. You pay only for the new ads. |
| **Ad category** | All ads, or only ads about social issues, elections or politics (these carry spend, impressions and reach). |
| **Exact phrase** | Match the search terms as an exact phrase. |
| **Shown on or after / before** | The Ad Library's date filter: ads that were shown in that period, whatever day they started. |

Give at least one search term, advertiser or Ad Library URL; a run with none fails with a message. Example:

```json
{
  "searchQueries": ["skincare"],
  "advertisers": ["https://www.facebook.com/sephora/"],
  "mediaType": "video",
  "country": "US",
  "maxAdsPerQuery": 100
}
```

### Output

One row per ad, in Meta's order (most impressions first; with *Only new ads*, most recent first). An ad found by several searches appears once, under the first search that found it.

Each row has two parts:

1. **The clean fields first** (below): flat, readable values for spreadsheets and the Console tables. Every row has them in the same order; a value Meta doesn't give is `null`.
2. **Then the apify/facebook-ads-scraper fields**, under that Actor's names: Meta's full ad record, with the HD links ([below](#facebook-ads-scraper-fields)). They're what makes a row about 15 KB.

Clean fields, in row order:

- `image`: the creative's picture: the video's preview frame, its first image, or the first card's image.
- `pageName`: the advertiser (its Facebook page).
- `adText`, `adTextSnippet`: the ad's primary text in full, and its first 50 characters on one line.
- `headline`: the headline under the creative.
- `adLibraryUrl`: the ad in the Meta Ad Library.
- `landingUrl`: where the ad's button leads.
- `ctaText`: the button text, e.g. *Shop now*.
- `format`: Video, Dynamic creative, Carousel, Image, Catalog, ...
- `platforms`: Facebook, Instagram, Messenger, Threads, Audience Network, WhatsApp.
- `isActive`: still running when the run read it.
- `pageLikes`: likes of the advertiser's Facebook page.
- `collationCount`: how many ads use this creative and text. Meta says it on one ad of each group, so it's often `null`.
- `daysActive`: days from `startedAt` to `lastShownAt`.
- `startedAt`: the day the ad started (YYYY-MM-DD).
- `lastShownAt`: the last day it ran: the day it stopped, or the run's day for active ads.
- `rank`: the ad's place in its search (1 = most impressions).
- `videoUrl`: the ad's video file (standard definition), for video ads.
- `pageUrl`: the advertiser's Facebook page.
- `adArchiveId`, `pageId`: the ad's Library ID and the advertiser's page id.
- `searchInput`: the search term, advertiser or Ad Library URL that found the ad.
- `scrapedAt`: when the run started (UTC).

Dynamic and catalog ads keep placeholders like `{{product.name}}` in their top text; the clean fields take the text, headline and picture of the ad's first card instead, as the Ad Library shows it.

When a search is for **Issues, elections or politics** (*Ad category*), the clean part also has `spend`, `spendMin`, `spendMax`, `currency`, `impressions`, `reachEstimate` and `paidFor` after `isActive`; Meta publishes them for those ads only. With **Include ad details**, `detailsStatus`, `isPageVerified`, `instagramUrl`, `instagramFollowers`, `euReach`, `ukReach`, `targetAges`, `targetGender`, `reachByCountry`, `payer` and `beneficiary` come in after `pageUrl` (an ad whose details are missing is charged as a plain ad).

In the Console, the dataset has these tables: **📊 Overview** (creative, advertiser, text, headline, links, button, format, platforms, active, started, days active, search), **📈 Stats** (rank, days active, page likes, same-creative count, dates), **🎨 Creatives** (picture, text, headline, button, video, landing page), **🏛️ Political** (fills on political searches) and **📋 Details** (fills with *Include ad details*). *All fields* shows the whole row, the facebook-ads-scraper part included.

#### facebook-ads-scraper fields

After `scrapedAt`, every row has the same fields as apify/facebook-ads-scraper, under the same names: Meta's raw ad record with camelCase keys, plus `inputUrl`, `pageID` / `adArchiveID` and `startDateFormatted` / `endDateFormatted`. Pipelines built on that Actor keep working when you switch. This part is nested (`snapshot` holds the creative), uses Meta's constants (`FACEBOOK`, `VIDEO`), and has every image and video variant (HD and SD).

- `snapshot`: the creative. It holds `body.text`, `title`, `caption`, `ctaText`, `linkUrl`, `displayFormat` (IMAGE, VIDEO, CAROUSEL, DCO, DPA), `images`, `videos` (each with `videoHdUrl`, `videoSdUrl`, `videoPreviewImageUrl`), `cards` (carousel and dynamic-ad variants, each with its own text and media), and the page's likes, categories and picture.
- `adArchiveID`, `pageID`: the ad's Library ID and the advertiser's page id (the same as `adArchiveId` and `pageId`).
- `startDateFormatted` / `endDateFormatted` (also `startDate` / `endDate` in unix seconds), `publisherPlatform`.
- `spend`, `impressionsWithIndex`, `reachEstimate`, `currency`: Meta fills these **only for political and issue ads**.

#### Run summary

The run's **OUTPUT** record lists every search with Meta's result count (`metaCount`), the ads read, the ads delivered and why it stopped: `complete`, `maxAds`, `chargeLimit`, `caughtUp`, `readCap`, `duplicate`, or a failure: `blocked`, `error`, `incomplete`.

### Reliability

- Uses Apify **residential proxies** by default. Meta refuses most datacenter IPs after the first page of results, so datacenter proxies aren't recommended.
- A refused or failed request is retried on a new IP.
- If Meta still refuses a search, the ads already collected are kept and the run **fails with the reason**. It doesn't report success on an incomplete search.
- Each search is checked against the result count Meta reports. A search whose results end well short of that count fails the run.
- Each ad appears once per run, even when several searches find it.

### Pricing

Pay per ad, by your Apify plan. No start fee, no monthly fee.

| Per 1,000 ads | Free | Starter | Scale | Business |
|---|---|---|---|---|
| Ad | $0.75 | $0.60 | $0.50 | $0.40 |
| Ad with details | $1.40 | $1.25 | $1.15 | $1.05 |

- The with-details price is the ad price plus a flat $0.65 per 1,000 for the details, the same on every plan.
- An ad is charged the with-details price only when its details came; an ad whose details failed is charged as a plain ad.
- Set a maximum cost per run in the run options: the run stops before it would go past it and keeps what it collected (`OUTPUT.chargeLimitReached` is then `true`).

### FAQ

**Do I need a Facebook account?** No. Everything comes from the public Ad Library, without logging in.

**Does it download the video files?** No: it returns the MP4 links, which you can download with any tool or script. Download them within a few days; Meta's links expire.

**Why is a row's format "Dynamic creative"?** Meta shows these ads in several versions; the videos are in `snapshot.cards[]`.

**Which countries work?** Every country in the Ad Library, or `ALL`.

### Feedback

Found a bug or missing a field? Open an issue on the **Issues** tab and we'll look at it within 48 hours. Happy with the data? A short review on the Store helps others find this Actor.

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords to search video ads for, as you'd type them in the Ad Library search box. One search per line.

## `advertisers` (type: `array`):

Advertisers whose ads you want: a Facebook page link (facebook.com/nike), a page id, an Ad Library link of the advertiser, or the page name exactly as it shows on its ads.

## `mediaType` (type: `string`):

Videos (the default) returns video ads only, each with its HD and SD MP4 links. Pick another type to get image or meme ads instead.

## `country` (type: `string`):

Two-letter country code where the ads ran (US, GB, DE, ...), or ALL for every country.

## `maxAdsPerQuery` (type: `integer`):

Stop each search, advertiser or URL after this many ads. You pay per ad, so this caps the cost of each search. Ads come most impressions first (with Only new ads, most recent first, and this limits the new ads per run). About 3 minutes per 1,000 ads.

## `includeAdDetails` (type: `boolean`):

Also fetch each ad's details: the advertiser's verification and Instagram account and followers and, for ads shown in the EU or UK, the reach, reach by country, targeted ages and gender, plus the payer and beneficiary (Meta's full details, with reach by age and gender, are in ad\_details). An ad with details costs more than a plain ad (see Pricing), and each needs one more request, so runs are slower. An ad whose details fail is charged as a plain ad.

## `startUrls` (type: `array`):

Searches copied from facebook.com/ads/library in your browser. The filters in the link (country, active status, media type, dates) are used.

## `activeStatus` (type: `string`):

Only active ads, only ads that stopped, or both.

## `onlyNewAds` (type: `boolean`):

Return only ads started since the last run that this Actor hasn't returned before for the same search, reading up to 1,000 ads past Max ads per search to find them. You pay only for the new ads. Schedule the run (e.g. daily) to monitor advertisers or keywords. The first run returns the newest ads, up to Max ads per search.

## `adType` (type: `string`):

All ads, or only ads about social issues, elections or politics (these carry spend and impressions ranges).

## `exactPhrase` (type: `boolean`):

Match the search terms as an exact phrase instead of any order.

## `dateFrom` (type: `string`):

Only ads that were shown on or after this date (YYYY-MM-DD), whatever day they started. This is the Ad Library's own date filter.

## `dateTo` (type: `string`):

Only ads that were shown on or before this date (YYYY-MM-DD).

## `proxyConfiguration` (type: `object`):

Residential proxies are the default and recommended: Meta refuses most datacenter IPs past the first page of results.

## Actor input object example

```json
{
  "searchQueries": [
    "skincare"
  ],
  "mediaType": "video",
  "country": "US",
  "maxAdsPerQuery": 100,
  "includeAdDetails": false,
  "activeStatus": "active",
  "onlyNewAds": false,
  "adType": "all",
  "exactPhrase": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "skincare"
    ],
    "mediaType": "video",
    "country": "US",
    "maxAdsPerQuery": 100,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepmine/facebook-video-ads").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQueries": ["skincare"],
    "mediaType": "video",
    "country": "US",
    "maxAdsPerQuery": 100,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("deepmine/facebook-video-ads").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "skincare"
  ],
  "mediaType": "video",
  "country": "US",
  "maxAdsPerQuery": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call deepmine/facebook-video-ads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deepmine/facebook-video-ads"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/sjXjfq3urFACJAQAF/builds/q3oK5ovqKAyaDbQwE/openapi.json
