# Meta Ad Library Scraper — Facebook & Instagram Ads Intel (`openclawai/meta-ad-library-scraper`) Actor

$5/1K flat, no login, no API key. Scrape the Meta Ad Library by keyword, Facebook page URL or page ID: every Facebook & Instagram ad with creatives, copy, CTA, landing link, run dates, days active, platforms, plus spend and impressions for political ads. All countries. MCP-ready.

- **URL**: https://apify.com/openclawai/meta-ad-library-scraper.md
- **Developed by:** [Pika Choo](https://apify.com/openclawai) (community)
- **Categories:** Lead generation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Meta Ad Library Scraper — Facebook & Instagram Ads, Creatives & Spend

**Meta Ad Library Scraper: $5 per 1,000 ads, everything included, no login, no API key.** Turn the Meta Ad Library (Facebook Ad Library) into clean, structured JSON. Search by **keyword, Facebook page URL or page ID** and get every ad a brand runs across **Facebook, Instagram, Messenger, Audience Network and Threads**, with the actual creatives, ad copy, call-to-action, landing page, run dates, days active and, for political and issue ads, **spend and impression ranges**. Covers **every country**, works with AI agents through MCP, and runs on a schedule or from the API.

### Why this Facebook ads scraper

- 💰 **One flat price.** $5/1K ads with creatives, copy, dates and spend data included. No actor-start fee, no tiers, no "detail" upcharge.
- 🔓 **No login, no cookies, no developer account.** The official Meta Ad Library API needs identity verification by mail and only returns political ads. This Actor returns **all ad categories** with nothing to set up.
- ⏱️ **Days active per ad.** Instantly separate a competitor's long-running winners from fresh tests.
- 🖼️ **Real creatives, not just IDs.** Image URLs, video file URLs, every creative variation, headline, primary text, caption, CTA and landing link.
- 🌍 **Worldwide by default.** Search all countries at once or pin one ISO country code.
- ⚡ **Fast.** Several result streams paginate in parallel on separate residential IPs: roughly 2,000 ads per minute per query.
- 🛡️ **Does not die mid-run.** Every stream rotates its IP and retries automatically when the platform pushes back.

### Who uses this

- **Performance marketers and paid-social agencies** monitoring competitor Facebook and Instagram ads.
- **Creative strategists** building swipe files of ads that have survived for months (high `days_active`).
- **E-commerce and DTC founders** researching what hooks, offers and CTAs competitors run right now.
- **Sales and lead-generation teams** screening prospect lists for "does this company run Meta ads?".
- **Journalists, researchers and compliance teams** tracking political and issue ads with spend, impressions and paid-for-by disclaimers.
- **AI and data teams** feeding structured ad data into models, dashboards and market research.

### What you can do with it

| Mode | How | Cost |
|---|---|---|
| Scrape every ad of a brand | Facebook page URL or page ID in `queries` | $5 per 1K ads |
| Find ads by topic or product | keyword in `queries` (`"running shoes"`) | $5 per 1K ads |
| A competitor's full ad history | `activeStatus: "ALL"` | same rate |
| Only video (or image) ads | `formats: ["VIDEO"]` | pay only for kept ads |
| Only Instagram ads | `platforms: ["instagram"]` | pay only for kept ads |
| Political ads with spend & impressions | `adType: "POLITICAL"` | same rate |
| One country's ads only | `country: "DE"` | same rate |

### Input

```json
{
    "queries": ["https://www.facebook.com/nike", "running shoes", "15087023444"],
    "country": "ALL",
    "maxAdsPerQuery": 100,
    "activeStatus": "ACTIVE",
    "adType": "ALL",
    "formats": [],
    "platforms": [],
    "exactPhrase": false
}
```

| Field | Type | Default | What it does |
|---|---|---|---|
| `queries` | array | — | Any mix of keywords, Facebook page URLs (`https://www.facebook.com/nike`) or numeric page IDs. Type is detected automatically. |
| `country` | string | `ALL` | 2-letter ISO country code (`US`, `GB`, `DE`, `BR`, `IN`) or `ALL` for every country. |
| `maxAdsPerQuery` | integer | `100` | Cap per query, 1–50,000. Ads come sorted by total impressions, highest first. |
| `activeStatus` | string | `ACTIVE` | `ACTIVE`, `INACTIVE` or `ALL`. |
| `adType` | string | `ALL` | `ALL`, `POLITICAL`, `HOUSING`, `EMPLOYMENT` or `CREDIT`. |
| `formats` | array | `[]` | Keep only `IMAGE`, `VIDEO` and/or `TEXT` ads. |
| `platforms` | array | `[]` | Keep only ads shown on `facebook`, `instagram`, `messenger`, `audience_network` and/or `threads`. |
| `exactPhrase` | boolean | `false` | Match keyword queries as an exact phrase instead of all words in any order. |
| `proxyConfiguration` | object | residential | Apify proxy settings. Residential is recommended and prefilled. |

### What you get

One row per ad. Rows that are hints (no results, bad input) or errors are free.

| Field | Description |
|---|---|
| `ad_id`, `ad_library_url` | Ad Library ID and a direct link to the ad. |
| `page_id`, `page_name`, `page_url`, `page_likes`, `page_verified` | The advertiser's Facebook page. |
| `is_active`, `start_date`, `end_date`, `days_active` | Run status and dates. `end_date` is `null` while the ad is live. |
| `format` | `VIDEO`, `IMAGE` or `TEXT`. |
| `body`, `title`, `caption`, `description`, `link_url`, `cta_text`, `cta_type` | Copy and call-to-action of the primary creative. |
| `image_url`, `video_url` | Media of the primary creative. |
| `creative_count`, `creatives` | Every creative variation in full. |
| `publisher_platforms`, `languages` | Where the ad ran. |
| `impressions_low/high`, `spend_low/high`, `currency`, `reach_low/high` | Ranges as the Ad Library reports them (political & issue ads). |
| `funding_entity`, `disclaimer`, `bylines`, `beneficiary_payers` | Paid-for-by transparency data (political & issue ads). |
| `age_gender_distribution`, `region_distribution`, `targeting`, `estimated_audience_*` | Audience data when the Ad Library exposes it. |
| `source_query`, `country`, `scraped_at` | Provenance. |

#### Sample JSON output

```json
{
    "item_type": "ad",
    "ad_id": "968207286264322",
    "ad_library_url": "https://www.facebook.com/ads/library/?id=968207286264322",
    "page_id": "100281786832302",
    "page_name": "Amazon India",
    "page_url": "https://www.facebook.com/AmazonIN/",
    "page_likes": 10508700,
    "is_active": true,
    "start_date": "2026-07-06",
    "end_date": null,
    "days_active": 62,
    "format": "IMAGE",
    "body": "Shop our selection of deals, best sellers, and interesting finds on Amazon!",
    "title": "Red Chief Men's Sneaker | Low Ankle Athletic Shoe (C6020)",
    "caption": "amazon.in",
    "link_url": "https://www.amazon.in/dp/B0GMS79VSR",
    "cta_text": "Shop Now",
    "cta_type": "SHOP_NOW",
    "image_url": "https://scontent.xx.fbcdn.net/v/t39.35426-6/739230755_....jpg",
    "video_url": null,
    "creative_count": 6,
    "publisher_platforms": ["facebook"],
    "source_query": "running shoes",
    "country": "ALL",
    "scraped_at": "2026-09-06T13:55:30Z"
}
```

### Pricing: how much does it cost to scrape 1,000 Facebook ads?

**$5.** One event, `result`, at $0.005 per ad row. Creatives, every variation, dates, days active, platforms and any spend or audience data are included in that price. Hint and error rows are free. There is no start fee and no per-run minimum, so a 20-ad check costs 10 cents.

A typical competitor sweep (5 pages × 100 ads) costs $2.50 and finishes in well under a minute; a full 2,000-ad history costs $10 and takes about a minute.

### Use cases

- **Competitor ad monitoring**: schedule a daily run on your competitors' page URLs and diff `ad_id`s to catch new creatives the day they launch.
- **Winning-creative research**: filter `activeStatus: "ALL"`, sort by `days_active` and study what has been running for 6+ months.
- **Hook and offer mining**: pull `body`, `title` and `cta_text` for a keyword and cluster the copy.
- **Lead qualification**: run a list of prospect page URLs, rows with zero ads get a free hint row — a cheap "do they advertise on Meta?" signal.
- **Political ad transparency**: `adType: "POLITICAL"` with spend, impression ranges and paid-for-by entities for a keyword or candidate page.

### Use with AI agents and MCP

Add this Actor as a tool in Claude, ChatGPT, Cursor or any MCP client through the Apify MCP server. Ask "show me Nike's active Instagram video ads" and the agent fills `queries`, `platforms` and `formats` for you. The output is flat JSON, so agents can reason over it without post-processing.

### Integrations

Runs on a schedule, exports to CSV, Excel, JSON or XML, and connects to Google Sheets, Airtable, Slack, Zapier, Make, n8n and webhooks through the Apify platform. Call it from Python, JavaScript or plain HTTP with the Apify API.

### FAQ

#### Do I need a Facebook account, cookies or a Meta developer key?

No. Nothing to log in, nothing to paste. Enter a keyword or page URL and run.

#### Does this replace the official Meta Ad Library API?

For most uses, yes. The official API requires developer-account identity verification by physical mail and only exposes political and issue ads in a limited set of countries. This Actor returns every category in every country with the full creative content.

#### Why are spend and impressions `null` on my rows?

Meta only publishes spend and impression ranges for political and issue ads. Commercial ads carry creatives, dates, platforms and `days_active`, but no spend. Use `adType: "POLITICAL"` to get rows with money data.

#### Why does the same brand appear under several page IDs?

Large brands run regional pages (Nike, Nike Football, Nike Running). A page URL resolves to exactly one page. Use a keyword query to catch all of them, then filter by `page_id`.

#### How many ads can I get, and how fast is it?

Up to 50,000 per query. The Actor paginates several streams in parallel on separate IPs, so a full 2,000-ad advertiser history lands in about a minute and 100 ads take a few seconds. Keep the residential proxy enabled (the default): the Ad Library returns empty results to datacenter IPs.

#### Can I export to CSV or Excel?

Yes. Every dataset can be downloaded as CSV, Excel, JSON or XML from the run page or the API.

#### Does it download the image and video files?

It returns direct CDN URLs for images and videos. Those links expire after a while, so fetch the files you want to keep soon after the run.

### Is it legal to scrape the Meta Ad Library?

The Ad Library is a public transparency resource that Meta publishes so anyone can inspect ads. This Actor only reads that public data and stores no personal information beyond what the Ad Library shows. You are responsible for using the output in line with applicable law and platform terms.

# Actor input Schema

## `queries` (type: `array`):

One per line. Accepts any mix of: a keyword or phrase ('running shoes'), a Facebook page URL ('https://www.facebook.com/nike') or a numeric page ID ('15087023444'). The Actor detects the type automatically.

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

2-letter ISO country code to search in — e.g. 'US', 'GB', 'DE', 'FR', 'BR', 'IN' — or 'ALL' for every country (default).

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

Maximum number of ads to return for each query (1–50,000). Sorted by total impressions, highest first.

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

Active: ads running right now (default). Inactive: ads that already stopped. All: both — the way to get an advertiser's full history.

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

All ads (default) or only a regulated category. Political & issue ads carry spend, impressions and audience demographics; the other categories don't.

## `formats` (type: `array`):

Only keep ads of these formats. Leave empty for all formats.

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

Only keep ads shown on at least one of these platforms. Leave empty for all.

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

On: keyword queries must appear as an exact phrase in the ad. Off (default): ads containing all the words in any order.

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

Residential proxies are recommended — the platform throttles a single IP after a few hundred ads. The Actor rotates IPs automatically during the run.

## Actor input object example

```json
{
  "queries": [
    "https://www.facebook.com/nike",
    "running shoes"
  ],
  "country": "ALL",
  "maxAdsPerQuery": 100,
  "activeStatus": "ACTIVE",
  "adType": "ALL",
  "formats": [],
  "platforms": [],
  "exactPhrase": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (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 = {
    "queries": [
        "https://www.facebook.com/nike",
        "running shoes"
    ],
    "country": "ALL"
};

// Run the Actor and wait for it to finish
const run = await client.actor("openclawai/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 = {
    "queries": [
        "https://www.facebook.com/nike",
        "running shoes",
    ],
    "country": "ALL",
}

# Run the Actor and wait for it to finish
run = client.actor("openclawai/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 '{
  "queries": [
    "https://www.facebook.com/nike",
    "running shoes"
  ],
  "country": "ALL"
}' |
apify call openclawai/meta-ad-library-scraper --silent --output-dataset

```

## MCP server setup

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