# Meta Ads Library Scraper | 💵$1/1K (`webdata_labs/meta-ads-library-scraper`) Actor

\[💵 $1.00 / 1K] Paste a Meta Ads Library URL or search by keyword/Page ID. Export ads, optional reach/spend details, advertiser profiles, or count-only results.

- **URL**: https://apify.com/webdata\_labs/meta-ads-library-scraper.md
- **Developed by:** [WebData Labs](https://apify.com/webdata_labs) (community)
- **Categories:** Marketing, Social media, Business
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 meta 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/platform/actors/running/actors-in-store#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 Ads Library Scraper

**Paste a Meta Ads Library URL and export public Facebook and Instagram ads, or search by filters from an API or AI agent.**

Meta Ads Library Scraper returns clean ad rows with copy, creatives, CTAs, landing pages, advertiser identity, platforms, and delivery dates. Optional premium modes add public reach/spend disclosures, advertiser About profiles, or a fast total-count result. No Facebook login or Meta developer token is required.

### ✅ What you get / ❌ What this isn't

✅ You get:

- URL-first input that preserves Meta's complete filter state
- Keyword and Page-ID inputs for APIs, n8n, and AI agents
- Ad copy, headlines, CTAs, landing pages, images, videos, and carousel cards
- Optional per-ad reach, spend, impressions, and regulation data when Meta exposes it
- Optional advertiser verification, About text, owner/contact fields, admin countries, page history, and Instagram profile data
- Count-only monitoring without downloading ad rows
- Pure pay-per-event pricing with no Actor-start fee

❌ This is not:

- An Ads Manager or private-account scraper
- A source of audience or spend data Meta does not publish
- An AI creative-analysis product
- A guarantee that inactive commercial ads remain available forever

### 🔎 Why use this Meta Ads Library scraper?

Use a copied URL when you already configured a search in the Meta Ads Library. The URL carries country, status, category, media, platform, language, and future filters that a fixed form may not know about.

Use `searchQueries` or `pageIds` when an API, automation, or AI agent needs to construct the input. Both entry paths live in one Actor so scheduled monitoring and interactive research use the same output contract.

### 📊 What data do you get?

| Data               | Main fields                                                                                                               |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------- |
| Ad identity        | `libraryId`, `adUrl`, `collationId`                                                                                       |
| Advertiser         | `pageId`, `pageName`, `pageUrl`, `pageCategories`, `pageLikeCount`                                                        |
| Creative           | `bodyText`, `headline`, `description`, `ctaText`, `landingPageUrl`                                                        |
| Media              | `imageUrls`, `videoUrls`, `videoThumbnailUrls`, `cards`, `creativeType`                                                   |
| Delivery           | `isActive`, `startDate`, `endDate`, `publisherPlatforms`                                                                  |
| Transparency       | `adDetails.reachEstimate`, `spend`, `impressions`, `targetedCountries`, `regionalRegulationData`                          |
| Advertiser profile | `advertiserProfile.about`, `verification`, `confirmedOwner`, `address`, `adminCountries`, `pageHistory`, Instagram fields |
| Provenance         | `sourceType`, `sourceValue`, `sourceUrl`, `countryCode`, `observedAt`                                                     |
| Count mode         | `totalCount`, `countIsEstimate`                                                                                           |

### 👥 Who is it for?

- Performance marketers tracking competitor ads and offers
- Creative strategists building swipe files
- Agencies monitoring client categories
- Lead-generation teams enriching advertiser Pages
- Researchers studying political, issue, employment, housing, credit, or EU ad transparency
- Developers and AI agents that need predictable JSON instead of browser work

### ⚙️ How to scrape Meta Ads Library

1. Open [Meta Ads Library](https://www.facebook.com/ads/library/) and configure the filters you want.
2. Copy the full browser URL into `startUrls`.
3. Choose a result limit.
4. Enable ad details, advertiser profiles, or count-only mode only when needed.
5. Run the Actor and export the dataset as JSON, CSV, Excel, XML, or another Apify-supported format.

### 📥 Input

#### By URL

The copied URL is the primary input. Its filters are preserved. A fallback field changes the URL only when you explicitly supply that field.

```json
{
    "startUrls": [
        {
            "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=running+shoes&media_type=video"
        }
    ],
    "maxResults": 100
}
```

#### By filters - for API and AI agents

```json
{
    "searchQueries": ["running shoes"],
    "countryCode": "US",
    "activeStatus": "active",
    "mediaType": "video",
    "category": "all",
    "sortBy": "recent",
    "maxResults": 100
}
```

For an exact advertiser:

```json
{
    "pageIds": ["20409006880"],
    "countryCode": "US",
    "activeStatus": "active",
    "maxResults": 100,
    "includeAboutPage": true
}
```

At least one entry mode is required: `startUrls`, `searchQueries`, or `pageIds`. Compatibility aliases are also accepted: `url`, `urls`, `query`, and `pageId`.

| Field                                      | Purpose                                                  |
| ------------------------------------------ | -------------------------------------------------------- |
| `startUrls`                                | Copied Meta Ads Library URLs                             |
| `searchQueries`                            | Keywords or advertiser names                             |
| `pageIds`                                  | Numeric Facebook Page IDs                                |
| `countryCode`, `activeStatus`, `mediaType` | Filters or explicit URL overrides                        |
| `dateFrom`, `dateTo`                       | Inclusive date overrides in `YYYY-MM-DD`                 |
| `sortBy`                                   | Meta default, impressions, or recent                     |
| `category`                                 | All, political/issue, housing, employment, or credit ads |
| `isDetailsPerAd`                           | Add the public per-ad transparency payload               |
| `includeAboutPage`                         | Add one public About profile per unique advertiser Page  |
| `onlyTotal`                                | Return one count row per input source, without ad rows   |
| `maxResults`                               | Total unique ad rows, up to 10,000                       |

Reliability settings, retries, delays, and proxy rotation are managed by the Actor.

### 📤 Output

Ad row with optional premium fields:

```json
{
    "resultType": "ad",
    "libraryId": "266617227767457",
    "pageId": "108824017345866",
    "pageName": "Example Advertiser",
    "bodyText": "Public ad copy",
    "headline": "Public headline",
    "landingPageUrl": "https://example.com/offer",
    "publisherPlatforms": ["FACEBOOK", "INSTAGRAM"],
    "adDetails": {
        "reachEstimate": ">1M",
        "spend": "$100K - $125K",
        "currency": "USD",
        "disclosureAvailable": true
    },
    "advertiserProfile": {
        "verification": "BLUE_VERIFIED",
        "category": "Software",
        "instagramUsername": "example",
        "confirmedOwner": "Example Inc."
    },
    "observedAt": "2026-07-30T12:00:00.000Z"
}
```

Count-only row:

```json
{
    "resultType": "count",
    "sourceType": "keyword",
    "sourceValue": "shopify",
    "totalCount": 10681,
    "countIsEstimate": true,
    "observedAt": "2026-07-30T12:00:00.000Z"
}
```

### 💵 How much does it cost to scrape Meta Ads Library?

There is no start fee. Platform usage is included.

| Event                                                |    Free |  Bronze |  Silver | Gold, Platinum, Diamond |
| ---------------------------------------------------- | ------: | ------: | ------: | ----------------------: |
| `ad-scraped` per ad                                  | $0.0010 | $0.0008 | $0.0006 |                 $0.0004 |
| `ad-details-scraped` per available detail row        | $0.0030 | $0.0024 | $0.0018 |                 $0.0012 |
| `advertiser-profile-scraped` per unique Page profile | $0.0020 | $0.0016 | $0.0012 |                 $0.0008 |
| `total-count` per input source                       | $0.0100 | $0.0100 | $0.0100 |                 $0.0100 |

On the Free plan:

- 100 base ad rows cost $0.10.
- 100 ads with per-ad details cost $0.40.
- The same 100 detailed ads from one advertiser plus one About profile cost $0.402.
- One count-only query costs $0.01.

Meta usually publishes reach and spend for regulated ad categories and EU transparency records, not ordinary commercial ads. When those disclosures are absent, `adDetails.disclosureAvailable` is `false`, the row explains why, and `ad-details-scraped` is not charged.

### 🔍 Example tasks

| Task                                                                                                                                      | Job                           |
| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| [Track Shopify Facebook ads](https://apify.com/webdata_labs/meta-ads-library-scraper/examples/track-shopify-facebook-ads-by-page-id)      | Exact advertiser Page ID      |
| [Find Facebook competitor ads](https://apify.com/webdata_labs/meta-ads-library-scraper/examples/facebook-competitor-ads-by-keyword)       | Competitor discovery          |
| [Export ecommerce Meta ad creatives](https://apify.com/webdata_labs/meta-ads-library-scraper/examples/ecommerce-meta-ad-creatives)        | Ecommerce swipe file          |
| [Research SaaS ad copy](https://apify.com/webdata_labs/meta-ads-library-scraper/examples/instagram-saas-ad-copy-research)                 | SaaS messaging research       |
| [Find AI tool ads](https://apify.com/webdata_labs/meta-ads-library-scraper/examples/ai-tools-facebook-ads)                                | AI category research          |
| [Research real estate ads](https://apify.com/webdata_labs/meta-ads-library-scraper/examples/real-estate-facebook-ads)                     | Real-estate creative research |
| [Research solar lead-generation ads](https://apify.com/webdata_labs/meta-ads-library-scraper/examples/solar-lead-generation-facebook-ads) | Lead-gen offer research       |
| [Research skincare creatives](https://apify.com/webdata_labs/meta-ads-library-scraper/examples/skincare-facebook-ad-creatives)            | Consumer creative research    |

### 🤖 Use with AI agents via MCP

Install Apify MCP for Claude Code or Cursor and expose this Actor:

```bash
apify mcp install claude-code --tools webdata_labs/meta-ads-library-scraper
apify mcp install cursor --tools webdata_labs/meta-ads-library-scraper
```

You can also configure the remote MCP server at `https://mcp.apify.com` and authenticate through OAuth. Then ask the agent: "Run `webdata_labs/meta-ads-library-scraper` for Nike ads in the US and return 20 results." Filter inputs are designed so the agent does not need to construct a Meta URL.

See the [Apify MCP documentation](https://docs.apify.com/integrations/mcp).

### 🔁 Use this Actor in n8n

1. Add the Apify community node. Self-hosted n8n uses `@apify/n8n-nodes-apify`; n8n Cloud can install it from the node panel.
2. Add **Run Actor** and choose `webdata_labs/meta-ads-library-scraper`.
3. Paste one of the JSON inputs above and enable **Wait for finish**.
4. Add **Get Dataset Items** and map `defaultDatasetId` from the run result.
5. Send rows to Google Sheets, a database, Slack, or your AI workflow.

See the [Apify n8n integration guide](https://docs.apify.com/integrations/n8n).

### 🔁 Ad intelligence across Meta, Google, LinkedIn, and TikTok

| Actor                                                                                                           | Use it for                                           |
| --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| [Google Ads Transparency Scraper](https://apify.com/webdata_labs/google-ads-transparency-scraper)               | Google advertiser creatives and campaigns            |
| [LinkedIn Ads Library Scraper](https://apify.com/webdata_labs/linkedin-ads-library-scraper)                     | B2B competitor ads                                   |
| [TikTok Creative Center Ad Intelligence](https://apify.com/webdata_labs/tiktok-creative-center-ad-intelligence) | TikTok ads and creative trends                       |
| [AI Ad Creative Intelligence API](https://apify.com/webdata_labs/ai-ad-creative-intelligence-api)               | Analyze creative patterns after collection           |
| [Website Contact Extractor](https://apify.com/webdata_labs/website-contact-extractor)                           | Enrich advertiser landing pages with public contacts |

### ⚠️ Limits and caveats

- The Actor extracts only public Meta Ads Library data.
- Reach, spend, demographics, and inactive history are not available for every category or country.
- Search totals are approximate and can change between runs.
- Creative CDN URLs can expire, so download media promptly if you need durable copies.
- Dynamic creative can contain many text and media variants; arrays preserve them.
- Meta can change public page structures and may temporarily throttle requests.
- Do not use the output for unlawful profiling, harassment, spam, or policy-violating automation.

### ❓ FAQ

#### Does it require a Facebook login or Meta developer token?

No. It uses public Meta Ads Library pages.

#### Does a URL override the fallback filters?

The URL wins by default. A fallback field overrides the corresponding URL parameter only when you explicitly supply it.

#### Can it return only the number of ads?

Yes. Set `onlyTotal: true`. The Actor returns one count row per URL, keyword, or Page ID and does not download ad rows.

#### Why are reach or spend empty on a commercial ad?

Meta does not publish those disclosures for most ordinary commercial ads. Select a regulated category or use EU transparency records when that data is required.

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

The Actor accesses public advertising-transparency data, but legality depends on your jurisdiction and use. Follow applicable laws, Meta's terms, data-protection rules, and your organization's policies. Obtain legal advice for regulated or high-risk use.

### 📝 Changelog

- **2026-07-30:** URL-first input, explicit URL overrides, aliases, sorting and category filters, count-only mode, per-ad transparency details, advertiser About profiles, and premium event pricing.
- **2026-07-23:** Initial public release with keyword, Page-ID, URL, date-range, and deep-pagination support.

### 🛠️ Support

Open an issue from the Actor page and include the run URL, non-secret input, expected result, and one affected query, Page ID, or public Ads Library URL.

# Actor input Schema

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

Paste one or more facebook.com/ads/library URLs. Every filter encoded in the URL is preserved unless you explicitly set an override below.

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

Keywords or advertiser names for discovery. This is the easiest entry mode for API integrations and AI agents.

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

Numeric Facebook Page IDs for exact advertiser tracking.

## `countryCode` (type: `string`):

Two-letter country code. Used as a URL override only when you explicitly supply it; otherwise URL filters are preserved. Keyword and Page-ID searches fall back to US.

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

Override the URL's active\_status filter, or set the status for keyword and Page-ID searches.

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

Override the URL's media\_type filter, or set the creative type for keyword and Page-ID searches.

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

Optional start-date override in YYYY-MM-DD format.

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

Optional inclusive end-date override in YYYY-MM-DD format.

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

Override URL sorting with impression volume or recency.

## `category` (type: `string`):

Select a regulated category when you need the reach, spend, or transparency fields Meta exposes for those ads.

## `isDetailsPerAd` (type: `boolean`):

Open each ad's public detail payload. Reach and spend are usually available only for regulated ads or EU transparency records.

## `includeAboutPage` (type: `boolean`):

Fetch one public advertiser profile per unique Page ID, including verification, About text, owner/contact fields when exposed, admin countries, page history, and linked Instagram data.

## `onlyTotal` (type: `boolean`):

Return one count row per input source without downloading ad rows. Useful for daily monitoring and job sizing.

## `maxResults` (type: `integer`):

Maximum number of unique ad rows across all supplied searches. Ignored in count-only mode.

## `url` (type: `string`):

Hidden compatibility alias for one Meta Ads Library URL.

## `urls` (type: `array`):

Hidden compatibility alias for Meta Ads Library URL strings.

## `query` (type: `string`):

Hidden compatibility alias for one search keyword.

## `pageId` (type: `string`):

Hidden compatibility alias for one numeric Facebook Page ID.

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

Managed internally with a working residential-proxy default.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&search_type=page&view_all_page_id=20409006880"
    }
  ],
  "isDetailsPerAd": false,
  "includeAboutPage": false,
  "onlyTotal": false,
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing one row per unique ad, or one row per input source in count-only mode.

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

Counts, failures, and transport diagnostics for this 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 = {
    "startUrls": [
        {
            "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&search_type=page&view_all_page_id=20409006880"
        }
    ],
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("webdata_labs/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 = {
    "startUrls": [{ "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&search_type=page&view_all_page_id=20409006880" }],
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("webdata_labs/meta-ads-library-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&search_type=page&view_all_page_id=20409006880"
    }
  ],
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call webdata_labs/meta-ads-library-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=webdata_labs/meta-ads-library-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/cKJni42BR7bv8gmer/builds/ZMZOhpCWuJgNVpCAD/openapi.json
