# Meta Ad Library Scraper + Ad Scripts (Facebook & Instagram) (`fraserlabs/meta-ad-library-scraper`) Actor

Meta Ad Library ads, one row per creative, with the voiceover script, 3-second hook and on-screen text of every video ad, plus days running and how many ads use the creative. No login. $2 per 1,000 creatives + $5 per 1,000 scripts.

- **URL**: https://apify.com/fraserlabs/meta-ad-library-scraper.md
- **Developed by:** [FraserLabs](https://apify.com/fraserlabs) (community)
- **Categories:** Social media, AI, Marketing
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Meta Ad Library Scraper + Ad Scripts (Facebook & Instagram)

Search the Meta Ad Library and get **one row per creative** with what the ad **says and shows**: the full **voiceover script**, the **first-3-seconds hook**, the **text on screen**, plus **days running** and **how many ads use the same creative**, the two strongest public signals that an ad is working.

**$2 per 1,000 creatives + $5 per 1,000 ad scripts.** No login, no cookies, no Facebook account.

### What you can use it for

- **Swipe file of winning ads.** Sort by days running and "ads using it" to find the creatives advertisers keep paying for, then read their scripts instead of watching hundreds of videos.
- **Brief creators and AI.** Paste the hooks and scripts into ChatGPT, Claude or Gemini to find the angles that work in your niche, or hand them to UGC creators.
- **Competitor tracking.** Watch any brand's Page ID: every live creative, its copy, CTA and landing page.
- **Hook research.** Spoken hook and on-screen hook side by side for every video ad.

### Why this Actor

| | This Actor | Typical Ad Library scraper |
|---|---|---|
| Ad copy, CTA, landing page, platforms, dates | Yes | Yes |
| **Voiceover script + 3-second hook** | **Yes** | Rare, usually $20-30 per 1,000 |
| **On-screen text** with timestamps | **Yes** | Rare |
| **Days running** | Yes | Sometimes |
| **One row per creative** with "ads using it" count | **Yes** | One row per ad (the same creative repeated) |
| Ads without words | Not charged for a script | n/a |

### Sample output

One creative from the "protein powder" search, US, active video ads (shortened):

```json
{
  "pageName": "ProDough Shop",
  "pageUrl": "https://www.facebook.com/prodoughshop/",
  "startDate": "2026-04-08",
  "daysRunning": 189,
  "adsUsingCreative": 8,
  "platforms": ["FACEBOOK", "INSTAGRAM", "AUDIENCE_NETWORK", "MESSENGER", "THREADS"],
  "format": "VIDEO",
  "title": "Protein Powder That Tastes Like Dessert",
  "ctaText": "Shop now",
  "linkUrl": "https://prodoughshop.com/pages/protein-powders-lp",
  "hook": "Peach Cobbler, Strawberry Shortcake.",
  "onScreenHook": "25G WHEY PROTEIN",
  "transcript": "Peach Cobbler, Strawberry Shortcake. Alright, something that really sets Proto apart is the flavors. They've got 21 different flavors...",
  "transcriptSegments": [
    {"start": 0, "end": 5, "text": "Peach Cobbler, Strawberry Shortcake."},
    {"start": 5, "end": 8, "text": "Alright, something that really sets Proto apart is the flavors."}
  ],
  "onScreenText": [{"start": 0, "end": 37.2, "text": "25G WHEY PROTEIN", "kind": "overlay"}],
  "spokenLanguage": "en",
  "adUrl": "https://www.facebook.com/ads/library/?id=1091709273178104"
}
```

#### Output fields

| Field | Meaning |
|---|---|
| `pageName`, `pageId`, `pageUrl`, `pageLikes` | The advertiser. |
| `startDate`, `endDate`, `daysRunning`, `isActive` | How long the creative has run. |
| `adsUsingCreative` | How many ads use this same creative and text (Meta's own count). |
| `format`, `platforms` | VIDEO, IMAGE, CAROUSEL, DCO, DPA; Facebook, Instagram, Messenger, Threads, Audience Network. |
| `adText`, `title`, `linkDescription`, `ctaText`, `linkUrl`, `caption` | The copy and where it sends people. |
| `transcript`, `hook`, `transcriptSegments`, `spokenLanguage` | What the video says: full script, first 3 seconds, timestamped lines. |
| `onScreenText`, `onScreenHook` | What the video shows: text with timestamps (`kind`: caption = spoken words shown, overlay = extra text). |
| `videoUrl`, `videoPreviewUrl`, `imageUrls` | Media links. Meta signs these and they expire: download soon after the run. |
| `adUrl`, `adArchiveId` | The ad's public Ad Library page. |

### How to use it

1. Enter **Search terms** (keywords or brand names), **Page IDs** (all ads of an advertiser), or paste **Ad Library URLs** with your own filters.
2. Pick **Country**, **Status** and **Media type** (choose **Videos** if you only want ads with scripts).
3. Set **Max creatives per search** and run. Results appear in the **Creatives + scripts** table and as JSON, CSV or Excel.

### Pricing

| Event | Price | When |
|---|---|---|
| Creative | $0.002 ($2 / 1,000) | Each unique creative delivered |
| Ad script | $0.005 ($5 / 1,000) | Each video ad with spoken or on-screen words (script + hook + on-screen text) |

Example: 100 video creatives with scripts = about $0.70. Turn off **Voiceover scripts** and **On-screen text** to pay only for the creatives.

### Notes and limits

- **One row per creative.** When many ads share a creative and text, you get it once with `adsUsingCreative`, so you never pay for 40 copies of the same ad.
- **Scripts cover the first 3 minutes** of a video and on-screen text the first 60 seconds: that is where the hook and offer are.
- **On-screen text** is most accurate on designed text (captions, titles, offers). Text that is physically in the scene, such as packaging, is read less reliably.
- **Songs:** sung lyrics can appear in the script. Music-only ads get no script and no script charge.
- Data comes from Meta's public Ad Library pages, read the way a logged-out visitor sees them. If Meta limits further results for a search, the run delivers what it has and says so in its status. If Meta asks for a login or a security check, that search stops.

### Related Actors from FraserLabs

- [TikTok Top Ads Scraper + Ad Scripts](https://apify.com/fraserlabs/tiktok-top-ads-scraper): TikTok Creative Center top ads with their scripts.
- [Facebook Reels Transcript](https://apify.com/fraserlabs/facebook-reels-transcript) and [Instagram Reels Transcript](https://apify.com/fraserlabs/instagram-reels-transcript): scripts and on-screen text of any public reel.
- [Video Frame Extractor](https://apify.com/fraserlabs/video-frame-extractor): keyframes and the text visible on them.

Problems or feature requests: open an issue on the Issues tab. Fixes ship within 24 hours.

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords or brand names to search in the Meta Ad Library, e.g. 'protein powder' or 'Nike'.

## `adLibraryUrls` (type: `array`):

Paste any facebook.com/ads/library search or page URL, with your own filters already set.

## `pageIds` (type: `array`):

All ads of these advertisers (the numeric Page ID shown in the Ad Library).

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

Two-letter country code where the ads ran (e.g. US, GB, CA, AU, DE), or ALL.

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

Active ads only, inactive only, or both.

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

Scripts and on-screen text come from video ads; pick Videos to get only those.

## `maxAdsPerSearch` (type: `integer`):

Stop each search after this many unique creatives (ads sharing one creative count once).

## `includeScripts` (type: `boolean`):

Transcribe each video ad's spoken words, with the first-3-seconds hook and timestamps.

## `includeOnScreenText` (type: `boolean`):

Read the text shown on each video ad (captions, overlays, offers), with timestamps.

## Actor input object example

```json
{
  "searchTerms": [
    "protein powder"
  ],
  "country": "US",
  "activeStatus": "active",
  "mediaType": "all",
  "maxAdsPerSearch": 20,
  "includeScripts": true,
  "includeOnScreenText": true
}
```

# Actor output Schema

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

One item per ad: page, days running, hook, voiceover script, ad text, CTA, landing link.

## `allFields` (type: `string`):

Every field, including the timestamped transcript and media links.

# 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 = {
    "searchTerms": [
        "protein powder"
    ],
    "maxAdsPerSearch": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("fraserlabs/meta-ad-library-scraper").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 = {
    "searchTerms": ["protein powder"],
    "maxAdsPerSearch": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("fraserlabs/meta-ad-library-scraper").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 '{
  "searchTerms": [
    "protein powder"
  ],
  "maxAdsPerSearch": 20
}' |
apify call fraserlabs/meta-ad-library-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fraserlabs/meta-ad-library-scraper"
        }
    }
}
```

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/vdnCthMbpxpJiKaj2/builds/RRf8yyDryzMMdFNt4/openapi.json
