# Meta Ad Library Scraper - Facebook & Instagram Ads (`zaver.api/meta-ad-library-scraper`) Actor

Scrape the Meta Ad Library without the Meta API: Facebook and Instagram ads by keyword or advertiser page, with ad text, headline, link, CTA, image, video, page details, start date, days running, platforms and EU reach. Active or inactive, any country. No account, no start fee. CSV or JSON.

- **URL**: https://apify.com/zaver.api/meta-ad-library-scraper.md
- **Developed by:** [Zaver](https://apify.com/zaver.api) (community)
- **Categories:** Marketing, Social media
- **Stats:** 2 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 — Facebook and Instagram Ads by Keyword or Advertiser Page

**Scrape the Meta Ad Library without the Meta API.** Enter keywords or advertiser pages and get every matching Facebook and Instagram ad as a clean row: ad text, headline, link, call to action, image and video, the advertiser page with its likes and verification, start date, days running, platforms and EU reach. Active or inactive ads, any country. No account, no browser, no start fee. Pay per ad.

> ⭐ Keyword and advertiser-page search · ad copy, headline, CTA and landing page · image and video links · page likes and verification · start date and days running · active or inactive · 200+ countries · parallel collection · API and MCP ready

### What does Meta Ad Library Scraper do?

The Meta Ad Library lists every ad running on Facebook, Instagram, Messenger and the Audience Network. This Actor searches it the way the library's own search does and returns the results as rows.

| You enter | You get |
|---|---|
| Keywords, one per line | Every ad the library returns for that search in your country |
| Advertiser pages (link, page ID or name) | Every ad that page is running or has run |
| Both | Both, with repeated ads delivered once |

### What data does it extract?

#### Every ad

| Field | Description |
|---|---|
| `id`, `url` | Ad Library ID and link to the ad in the library |
| `pageId`, `pageName`, `pageUrl` | The advertiser's Facebook page |
| `pageLikes`, `pageVerified`, `pageCategory` | Page size, verification and category |
| `igUsername`, `igFollowers` | Linked Instagram account, when the page has one |
| `body`, `title`, `description`, `caption` | Ad text, headline, description and the link caption |
| `linkUrl`, `ctaText`, `ctaType` | Landing page and call to action |
| `imageUrl`, `videoUrl` | Creative files of the first card |
| `creatives`, `creativeCount` | All cards of carousel and multi-creative ads |
| `isActive`, `status`, `startDate`, `endDate`, `daysRunning` | Delivery status and how long the ad has been live |
| `platforms` | facebook, instagram, messenger, audience_network |
| `displayFormat`, `adType`, `categories` | Format and Meta's category flags |
| `impressionsLower`, `impressionsUpper`, `spendLower`, `spendUpper`, `currency` | Ranges, when Meta publishes them (political and EU ads) |
| `euTotalReach`, `targetsEu`, `languages`, `bylines`, `fundingEntity`, `disclaimer` | Transparency data where it exists |
| `position`, `query`, `source` | Rank in the results and the keyword or page it came from |

#### With the details add-on

| Field | Description |
|---|---|
| `creatives` | Every card, including ones the search result does not carry |
| `targeting`, `ageGenderDistribution`, `regionDistribution` | Audience data for ads shown in the EU or UK |
| `reachLower`, `reachUpper`, `euTotalReach` | Reach ranges where published |

Product links you paste always return the full details.

### A Meta Ad Library API alternative

Meta's official Ad Library API needs a developer app, identity confirmation and, outside the EU, returns only political and issue ads. Commercial ads are visible on the library website but not through the API.

This Actor is a **Meta Ad Library API alternative** that reads the library the website itself reads. It works **without the Meta API**: no app review, no identity check, no token.

| | Meta Ad Library API | This Actor |
|---|---|---|
| Commercial ads | Political and issue ads only (outside the EU) | All ads |
| Access | Developer app and ID confirmation | Anyone |
| Setup | App, token, rate limits | Keywords or pages, press Start |
| Output | API objects | Flat rows: CSV, Excel, JSON |

### Why use this Meta Ad Library scraper

#### Every ad, not the first screen

The library's page shows a few dozen cards and loads more as you scroll. The Actor follows the library's own pagination until it has as many ads as you asked for.

#### Advertiser pages by link, ID or name

Paste a Facebook page link, an Ad Library link with `view_all_page_id`, a numeric page ID, or just the page name; the best match is used.

#### Built for monitoring

Run it daily over the same pages and keywords. `startDate` and `daysRunning` show which ads an advertiser keeps alive, which usually means they work.

#### Parallel sessions

Keywords and pages are collected in parallel, each on its own session, so a list of competitors finishes in minutes.

#### No start fee, and failures are free

You pay per ad delivered. Keywords with no results, pages that cannot be resolved and repeated ads are free.

### How to scrape the Meta Ad Library

1. Open the Actor and type **Keywords** or paste **Advertiser pages**, one per line.
2. Set the **Country** (two-letter code) and, if you want, the ad status, category, matching mode and sort.
3. Set **Max ads per keyword or page**.
4. Turn on **Add ad details** if you need audience data and all creative cards.
5. Press **Start**, then export as CSV, Excel, JSON or XML, or read the dataset through the API.

### Input examples

Competitor ads by keyword:

```json
{
  "keywords": ["protein powder", "creatine"],
  "country": "US",
  "adStatus": "active",
  "maxAdsPerQuery": 200
}
```

Everything three advertisers are running in the UK:

```json
{
  "pages": ["https://www.facebook.com/nike", "15087023444", "Gymshark"],
  "country": "GB",
  "adStatus": "all",
  "maxAdsPerQuery": 500
}
```

| Field | Type | Description |
|---|---|---|
| `keywords` | array | Search terms, one per line. |
| `pages` | array | Facebook page links, numeric page IDs, Ad Library links with `view_all_page_id`, or page names. |
| `country` | string | Two-letter code of the audience country. Default `US`. |
| `adStatus` | string | `active` (default), `inactive` or `all`. |
| `adType` | string | `all` (default), `political`, `housing`, `employment` or `credit`. |
| `searchType` | string | `keyword` (any order, default) or `exact_phrase`. |
| `sortBy` | string | `relevance` (default) or `impressions`. |
| `maxAdsPerQuery` | integer | Ads per keyword or page. Default `100`. |
| `maxItems` | integer | Hard cap for the run. 0 means no cap. |
| `includeDetails` | boolean | Add the detail record of each ad. Charged per ad. |
| `concurrency` | integer | Keywords and pages collected in parallel. Default `4`. |

### Output example

```json
{
  "type": "ad",
  "id": "1550534860016399",
  "url": "https://www.facebook.com/ads/library/?id=1550534860016399",
  "pageId": "115939511520844",
  "pageName": "Perfect themes",
  "pageUrl": "https://www.facebook.com/115939511520844",
  "isActive": true,
  "startDate": "2026-05-19",
  "daysRunning": 160,
  "platforms": ["facebook", "instagram", "audience_network", "messenger"],
  "displayFormat": "IMAGE",
  "body": "Themepack is a FREE and personalized APP with various styles of themes, weather and widgets",
  "title": "Super hot widgets app!",
  "caption": "play.google.com",
  "linkUrl": "http://play.google.com/store/apps/details?id=com.iconchanger.widget.theme.shortcut",
  "ctaText": "Install now",
  "ctaType": "INSTALL_MOBILE_APP",
  "imageUrl": "https://scontent.xx.fbcdn.net/v/t39.35426-6/700927950_...jpg",
  "query": "widgets",
  "source": "widgets",
  "position": 1
}
```

### Pricing

Pay per result. **No start fee, no monthly rental, no minimum.**

| Event | Charged for | Price |
|---|---|---|
| `ad-scraped` | each ad delivered | **$1.59 / 1,000** |
| `ad-detailed` | each ad that got its detail record (add-on) | **$3.99 / 1,000** |
| - | empty searches, unresolved pages and repeated ads | **free** |

| You export | You pay |
|---|---|
| 100 ads | **$0.16** |
| 1,000 ads | **$1.59** |
| 1,000 ads with details | **$5.58** |
| 10,000 ads | **$15.90** |

You are charged right after each batch lands in your dataset, so a run you stop early costs only what it delivered. Proxies are included.

### Use cases

#### Competitor ad research

Pull every active ad of a competitor's page and read their offers, hooks and landing pages in one spreadsheet.

#### Creative swipe files

Search a product keyword and keep the ads that have been running longest; long-running ads are the ones that pay.

#### Market and niche analysis

Count advertisers and ads per keyword and country to size a market before entering it.

#### Agency prospecting

Find pages that advertise in your niche, with their page size and landing pages, and build an outreach list.

#### Brand and compliance monitoring

Watch pages that use your brand name in ads, with the proof link to the library entry.

#### Datasets for research and AI

Collect ad copy and creatives at scale for classification, trend analysis and model training.

### FAQ

**Do I need a Meta account, app or token?**
No. It works without the Meta API and without logging in.

**Is scraping the Meta Ad Library legal?**
This is general information, not legal advice. The Ad Library exists to make advertising public, and the Actor collects only what the library shows to every visitor, without logging in. Page names and ad content are public, but Meta's terms restrict automated access, and how you use the data depends on the laws where you are. Use it for research and monitoring, and ask a lawyer before building a commercial product on it.

**How many ads can I get for a keyword?**
As many as the library returns, typically up to a few thousand for broad terms. Set the per-keyword limit to what you need; more ads take more time.

**Why do impressions and spend show only for some ads?**
Meta publishes those ranges for political and issue ads, and reach data for ads shown in the EU. Commercial ads elsewhere carry no numbers, and the Actor never invents them.

**What does the country setting do?**
It is the audience country, as in the library's own filter. An ad shown in several countries appears in each of them.

**How fast is it?**
About two ads per second per session; four parallel sessions bring 1,000 ads in about two minutes. The library's own pacing sets the limit, not the Actor.

**Can I run it on a schedule?**
Yes. Daily runs over the same pages and keywords show new ads, dropped ads and how long each one lasts.

### Use it from AI agents and MCP clients

This Actor is available as a tool on Apify's MCP server. Point Claude, Cursor, Windsurf, ChatGPT agents or any other MCP client at `https://mcp.apify.com` with your Apify token, add the tool `zaver.api/meta-ad-library-scraper`, and the agent can pull an advertiser's ads in the same conversation. From Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("zaver.api/meta-ad-library-scraper").call(run_input={"pages": ["https://www.facebook.com/nike"], "country": "US", "maxAdsPerQuery": 100})
for ad in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(ad["pageName"], ad.get("title"), ad.get("linkUrl"))
```

### Integrations

- **Apify API** - start runs and fetch datasets from Python, Node.js, cURL or any HTTP client.
- **MCP server** - call this Actor as a tool from Claude, Cursor, ChatGPT agents and any MCP client.
- **No-code** - Make, Zapier, n8n, Google Sheets, Airtable, Slack, webhooks.
- **Schedules** - run daily and append to the same dataset to build history.
- **Exports** - JSON, JSONL, CSV, Excel (XLSX), XML, HTML table.

### Related actors

**Advertising**

- [Google Ads Transparency Scraper](https://apify.com/zaver.api/google-ads-transparency-scraper) - every ad an advertiser runs on Google, with dates, formats and creatives
- [Facebook Post Analytics](https://apify.com/zaver.api/facebook-post-analytics) - reactions, comments and shares of public posts

**Social**

- [Instagram Scraper](https://apify.com/zaver.api/instagram-scraper) - posts, reels, profiles and hashtags
- [Instagram Profile Scraper](https://apify.com/zaver.api/instagram-profile-scraper) - followers, bio and contact details
- [TikTok Hashtag Scraper](https://apify.com/zaver.api/tiktok-hashtag-scraper) - videos by hashtag with views and authors

**Leads**

- [Website Contact Extractor](https://apify.com/zaver.api/website-contact-extractor) - emails, phones and social profiles from the landing pages you collect

***

*Not affiliated with, endorsed by or sponsored by Meta. This Actor reads only what the Meta Ad Library shows publicly to a logged-out visitor and does not log in. You are responsible for using the data in line with applicable laws and Meta's terms.*

# Actor input Schema

## `keywords` (type: `array`):

Search terms, one per line, as you would type them into the Ad Library search box (brand names, product words, phrases).

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

Facebook pages whose ads you want, one per line: page links (<code>https://www.facebook.com/nike</code>), numeric page IDs, Ad Library links with <code>view_all_page_id</code>, or page names (the best match is used).

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

Two-letter country code of the audience the ads were shown to, such as <code>US</code>, <code>GB</code>, <code>DE</code>, <code>IN</code>, <code>BR</code>.

## `adStatus` (type: `string`):

Active ads only, inactive only, or both.

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

All ads, or one of the special categories Meta separates in the library.

## `searchType` (type: `string`):

Whether all words may appear in any order or the exact phrase must match.

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

Order of the results.

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

The Actor pages through the library until it has this many ads for each keyword or page.

## `maxItems` (type: `integer`):

Hard cap on ads for the whole run. 0 means no cap.

## `includeDetails` (type: `boolean`):

Opens each ad's detail record and adds whatever extra data Meta holds for it: more creative cards, EU and UK transparency data (reach, age and gender split, targeting) where the ad ran there, and payer or beneficiary data. Charged as a separate event per ad.

## `concurrency` (type: `integer`):

Keywords and pages collected at the same time, each on its own session. Higher is faster; 4 is a safe default.

## Actor input object example

```json
{
  "keywords": [
    "protein powder"
  ],
  "country": "US",
  "adStatus": "active",
  "adType": "all",
  "searchType": "keyword",
  "sortBy": "relevance",
  "maxAdsPerQuery": 100,
  "maxItems": 0,
  "includeDetails": false,
  "concurrency": 4
}
```

# Actor output Schema

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

All dataset items.

## `resultsCsv` (type: `string`):

CSV download.

## `runSummary` (type: `string`):

Counts for the run.

# 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 = {
    "keywords": [
        "protein powder"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zaver.api/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 = { "keywords": ["protein powder"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zaver.api/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/64ZAGr3MeaXCRHKqV/builds/edyG3ZEV6DGdWkOVe/openapi.json
