# Facebook Ads Library Scraper & API: Export Meta Ads (`s_actors/meta-ads-library-scraper`) Actor

Scrape the public Meta Ad Library (Facebook and Instagram ads) without login: every ad of an advertiser or keyword with ad text, headline, button, landing page, image and HD video links, dates, platforms, spend and impressions of political ads. Alerts for new competitor ads.

- **URL**: https://apify.com/s_actors/meta-ads-library-scraper.md
- **Developed by:** [Superior Actors](https://apify.com/s_actors) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.29 / 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 Ads Library Scraper & API: Export Meta Ads

Scrape the **public Meta Ad Library** (Facebook and Instagram ads) without a Facebook login, cookies or API token. Give it an **advertiser**, a **keyword** or an Ad Library link and get every ad as a clean table: **ad text, headline, button, landing page, image and HD video links**, start and stop dates, platforms, number of copies, and **spend and impressions for political and issue ads**.

It reads the **whole history** of an advertiser (active and stopped ads, thousands of ads) and whole keyword searches (50,000+ ads), not only the ads you can scroll in a browser.

```json
{ "pages": ["zara", "nike"], "country": "US", "activeStatus": "active", "maxAdsPerSource": 500 }
```

Use it as a **Meta Ad Library API**: one call returns clean JSON for every Page, keyword and link.

#### What you get

One row per ad. Real example, November 2026 (keyword `running shoes`, US, active):

| pageName | text | ctaText | linkUrl | displayFormat | startDate | daysRunning | platforms |
|---|---|---|---|---|---|---|---|
| Perfect themes | Themepack is a FREE and personalized APP... | Install now | play.google.com/store/apps/details?id=... | IMAGE | 2026-05-19 | 167 | FACEBOOK, INSTAGRAM, THREADS |
| BetterMe | Logra tus objetivos en cuanto a músculos... | Install now | play.google.com/store/apps/details?id=com.gen.workoutme | VIDEO | 2025-08-10 | 449 | FACEBOOK, INSTAGRAM |

| Field | Description |
|---|---|
| `adId`, `adUrl` | The ad's Ad Library id and link |
| `pageId`, `pageName`, `pageUrl`, `pageLikes`, `pageCategories`, `pagePicture` | The advertiser's Page: name, link, likes, category, logo |
| `text`, `title`, `linkDescription`, `caption` | Main ad copy, headline, description under the headline, the link's domain |
| `ctaText`, `ctaType`, `linkUrl` | The button ("Shop now", "Install now", "Sign up") and where it sends people |
| `displayFormat`, `images`, `videos`, `cards` | Format (image, video, carousel, DCO), image links, **video links in HD and SD with preview**, carousel cards with their own text and link |
| `isActive`, `startDate`, `endDate`, `daysRunning` | Running now or stopped, the dates, how many days the ad has run (long-running ads are usually the winners) |
| `platforms`, `copies` | Facebook, Instagram, Messenger, Audience Network, Threads; how many copies of the same ad run |
| `byline`, `disclaimer`, `adCategories` | "Paid for by" and disclaimers, ad category |
| `spend`, `currency`, `impressions`, `reach`, `countries` | Political and issue ads: spend and impressions ranges, reach, countries |
| `sourceType`, `searchQuery`, `sourceUrl` | Which keyword, Page or link found the ad |
| `isNew`, `firstSeenAt` | Compared with earlier runs of the same input: new ad, and when it was first seen |

#### How it works

1. Add **keywords**, **advertisers** (Page ID, `facebook.com/<page>` link or username like `zara`) and / or **Ad Library links** copied from your browser
2. Pick the **country**, **status** (all, active, inactive), **format**, **platforms** and **dates**
3. Run: open the **Ads** or **Creatives** view, export to CSV / Excel / JSON, or connect a Google Sheet, Slack or a webhook

| Input | What it does |
|---|---|
| **Keywords** | Every advertiser running ads with these words, like the Ad Library's search box: `running shoes`, `crm software`, `black friday` |
| **Advertisers (Pages)** | All ads of a Page: its numeric ID, a Facebook link or its username |
| **Ad Library links** | An Ad Library search or advertiser page from your browser; it keeps its filters |
| **Country** | One country or ALL. EU countries and political ads show more fields |
| **Status**, **Format**, **Platforms**, **Languages** | Active or stopped, image / video / meme / text only, Facebook / Instagram / Messenger..., ad language |
| **Ad type** | All ads, or political and issue, housing, employment, credit ads |
| **Running from / until** | Ads that were running in this window |
| **Order** | Newest and most relevant, or most impressions first |
| **Max ads per source** | Default 100 for a quick first run; up to 200,000 per keyword, Page or link |
| **Only new ads** | Alerts: return only ads this input has not returned before |

#### Why this Actor

| | |
|---|---|
| 📚 **Full history** | Every ad of a Page, active and past, not only what the Ad Library shows first. One keyword search read 4,400+ ads in four minutes |
| 🎬 **HD video and image links** | Direct links to every creative, ready to download and study hooks and formats |
| 🏷️ **Pages by name** | Write `zara` or paste a Facebook link: no need to hunt for the Page ID |
| 🗳️ **Political ad spend** | Spend and impressions ranges, who paid, countries |
| 🔔 **New-ad alerts** | Every run remembers its ads: `isNew` on every row, or only new ones with one switch |
| 🔓 **No login, no cookies** | Your Facebook account is never used or put at risk |
| 💰 **Low price** | $0.49 per 1,000 ads, proxies included |

#### Spy on competitor ads

1. Put competitors in **Advertisers** (`zara`, `hm`, `shein`), pick **Active only**
2. Run: sort the **Ads** view by `daysRunning`, the ads running for months are the ones that work
3. Open **Creatives** for the images and videos, and `linkUrl` for the landing pages

#### Alerts for new ads

1. Add competitors or keywords
2. Turn on **Only new ads**
3. Save as a task and schedule it (daily or weekly). Add an integration: email, Slack, Google Sheets, Telegram through Zapier or Make, or a webhook

The first run returns the current ads and remembers them; every next run returns only ads that appeared since. The history is kept per input in your account (key-value store `meta-ads-library-history`, the last 200,000 ads).

#### Pricing

Pay per ad. Apify Scale and Business plans pay less:

| Event | Free and Starter plans | Scale plan | Business plan |
|---|---|---|---|
| Run start | $0.001 | $0.001 | $0.001 |
| Ad | $0.00049 | $0.00038 | $0.00029 |

| Task | Cost |
|---|---|
| 100 ads of one competitor | ~$0.05 |
| 1,000 ads (one big advertiser, or 20 competitors × 50) | ~$0.49 |
| Daily alert for one competitor with ~10 new ads a day, for a month | ~$0.18 per month |

Repeats and ads skipped by **Only new** are free.

#### Ready-made tasks

Open it, change the advertiser and country, and run:

| Task | What you get |
|---|---|
| [Meta Ad Library API: Export Any Advertiser's Ads](https://apify.com/s_actors/meta-ads-library-scraper/examples/meta-ad-library-api-advertiser-ads) | Every ad of a Page with text, creatives, dates and landing pages |

#### FAQ

**How do I scrape the Facebook Ad Library?** Write a Page username (`nike`) or paste a Page link in **Advertisers**, or type words in **Keywords**, and run. Open the **Ads** view and export.

**Do I need the Meta Ad Library API access token?** No. The official API needs a verified Facebook developer account and covers mainly political ads outside the EU. This Actor reads the public Ad Library page and works for every ad without a token.

**How many ads can I get?** Everything the Ad Library lists: 30,000+ for a big brand, 50,000+ for a broad keyword. Narrow it with **Country**, **Status** and dates, and set **Max ads per source**.

**What is `copies`?** The Ad Library groups ads with the same creative into one entry: `copies` says how many copies run. You get one row per entry.

**Why are spend and impressions empty?** Facebook publishes them only for political and issue ads (and reach for ads shown in the EU). Pick **Ad type: political and issue ads** to get them.

**Can I get ads from all countries?** Yes, set **Country** to ALL. For one country, pick it: the Ad Library then lists ads shown there.

**Do I need a Facebook account?** No. The Actor reads the Ad Library the way it is shown to a visitor who is not logged in.

#### Use with the API and AI agents

Run it via the [Apify API](https://docs.apify.com/api/v2) from Python, Node.js, n8n or any HTTP client, or connect it to Claude, ChatGPT and other AI agents through the [Apify MCP server](https://mcp.apify.com): "Show me the ads Nike has run for more than 90 days with their landing pages".

#### Other Facebook tools

| Tool | What it does |
|---|---|
| [Facebook Page Scraper](https://apify.com/s_actors/facebook-page-scraper) | Exact followers, email, phone, website, page creation date, ads status and last post of any page |
| [Facebook Page Search](https://apify.com/s_actors/facebook-page-search-scraper) | Facebook business pages by keyword and city, with exact followers, email, phone and address |
| [Facebook Events Scraper](https://apify.com/s_actors/facebook-events-scraper) | Facebook events by city, keyword or Page: dates, venues, organizers, tickets |
| [Facebook Marketplace Scraper](https://apify.com/s_actors/facebook-marketplace-scraper) | Marketplace listings by keyword and city, new listing and price drop alerts |
| [Facebook Video Transcript](https://apify.com/s_actors/facebook-video-transcript) | Transcripts of Facebook videos and Reels: Facebook captions or AI, SRT and VTT |
| [LinkedIn Ad Library Scraper](https://apify.com/s_actors/linkedin-ad-library-scraper) | LinkedIn ads by advertiser or keyword with impressions and targeting |

#### Is it legal?

The Actor reads only ads that Meta publishes in its public Ad Library for any visitor, without logging in. Advertiser names and Page data are public; handle any personal data in line with GDPR and other privacy laws, and use the data for market research, competitor analysis and advertising transparency in line with Meta's terms.

# Actor input Schema

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

One per line ("running shoes", "crm software", "black friday"). Every advertiser that runs ads with these words, like the Ad Library's own search box. Add a country below: a keyword search across all countries has tens of thousands of ads.

## `pages` (type: `array`):

One per line: a Page ID (the number after view_all_page_id= in an Ad Library link), a facebook.com/<page> link, or the Page username ("zara", "nike"). Returns every ad of that Page, active and past.

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

Optional. Links copied from your browser: an Ad Library search or advertiser page (facebook.com/ads/library/?...). A link keeps its own filters (country, dates, status). A facebook.com/<page> link also works.

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

Ads shown in this country (ISO code), or ALL. In EU countries and for political ads the Ad Library shows more fields.

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

All = every ad the Page ever ran, active and stopped.

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

Political and issue ads come with spend and impressions ranges.

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

Only ads with this kind of creative.

## `platforms` (type: `array`):

Only ads shown on these platforms. Empty = all.

## `languages` (type: `array`):

Optional ISO codes of the ad language, one per line ("en", "de", "es").

## `startDate` (type: `string`):

Only ads that were running on or after this day (YYYY-MM-DD).

## `endDate` (type: `string`):

Only ads that started on or before this day (YYYY-MM-DD).

## `sortBy` (type: `string`):

Impression order applies to ads that show impressions (political, EU).

## `maxAdsPerSource` (type: `integer`):

Per keyword, per Page and per link. 100 for a quick first run; raise it (50,000+ works). An ad found twice is returned once.

## `maxConcurrency` (type: `integer`):

How many keywords / Pages are read at the same time.

## `onlyNew` (type: `boolean`):

Return only ads this input has not returned before. The first run returns everything and remembers it. Every row has isNew and firstSeenAt either way.

## `debugLog` (type: `boolean`):

Log every request attempt (for support).

## Actor input object example

```json
{
  "searchQueries": [
    "running shoes"
  ],
  "country": "ALL",
  "activeStatus": "all",
  "adType": "all",
  "mediaType": "all",
  "sortBy": "relevancy",
  "maxAdsPerSource": 100,
  "maxConcurrency": 4,
  "onlyNew": false,
  "debugLog": false
}
```

# Actor output Schema

## `ads` (type: `string`):

One row per ad: advertiser, copy, headline, button, landing page, dates, platforms.

## `creatives` (type: `string`):

Image and video files of each ad (HD video links) with the carousel cards.

## `spend` (type: `string`):

Political and issue ads: spend and impressions ranges, who paid, countries.

## `new` (type: `string`):

Whether each ad is new since the previous run of the same input.

## `all` (type: `string`):

Every field of every row.

# 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": [
        "running shoes"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("s_actors/meta-ads-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 = { "searchQueries": ["running shoes"] }

# Run the Actor and wait for it to finish
run = client.actor("s_actors/meta-ads-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 '{
  "searchQueries": [
    "running shoes"
  ]
}' |
apify call s_actors/meta-ads-library-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,s_actors/meta-ads-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/RxJzbQ3TDG73VbEE0/builds/Do3V6Yv8lhkTHfd8h/openapi.json
