# Facebook Ads Library Scraper — Meta & Instagram Ads (`vero-api/facebook-ad-library-scraper`) Actor

Scrape the Facebook Ads Library (Meta Ad Library): every ad on Facebook, Instagram, Messenger, Threads and WhatsApp. Get ad text, images, HD videos, landing pages, run dates, advertiser pages, spend and EU reach. Search by keyword, page or Ad Library link. No login. $0.40 per 1,000 ads.

- **URL**: https://apify.com/vero-api/facebook-ad-library-scraper.md
- **Developed by:** [VeroAPIs](https://apify.com/vero-api) (community)
- **Categories:** Marketing, Social media, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.32 / 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: every Meta ad a brand or keyword runs

Scrape the Facebook Ads Library (Meta Ad Library) and see every ad running on Facebook, Instagram, Messenger, Threads, WhatsApp and Audience Network. Get each ad's text, images, HD videos, landing page, start date, platforms and advertiser as one clean dataset, ready for Excel, Google Sheets or your own app. No Facebook account, no Meta API token, and only **$0.40 per 1,000 ads**.

### Why people choose it

- **Search the way you think.** Type a keyword (`running shoes`), paste a Facebook page (`https://www.facebook.com/nike`), a page ID, an ad's Library ID, or any Ad Library link, including a link to a single ad.
- **Ad Library links just work.** Set up a search on facebook.com/ads/library with every filter you like, paste the link, and get exactly those ads.
- **Every creative, even dynamic ads.** Full-size images and HD video links from every card of carousel, dynamic creative and catalog ads, plus each product's headline and link.
- **Real headlines on catalog ads.** Catalog and dynamic ads come with the product name and text the Ad Library shows, never a raw `{{product.name}}` placeholder.
- **Reach, audience and political spend on demand.** Switch on details to see how many people in the EU and UK saw each ad, by country, age and gender, who it targeted, who paid for it, and the advertiser's Instagram account. Political and issue ads add who they reached by age, gender and region, and how much the advertiser spends on them.
- **All the filters of the Ad Library.** Country, active or stopped ads, ad category, media type, platforms, dates, language, exact phrase and sorting.
- **Political ad spend included.** Spend, impressions and "paid for by" for ads about social issues, elections and politics.
- **No duplicates, no empty rows.** An ad that matches two of your searches is delivered, and charged, once.
- **Low, fair pricing.** $0.40 per 1,000 ads, and the run stops right at the spending limit you set.

### Popular uses

- **Competitor ad research**: see every ad a rival runs on Facebook and Instagram, where, and for how long.
- **Ad spy and creative inspiration**: build a swipe file of long-running ads, the ones that keep paying off.
- **Lead generation**: find businesses that actively advertise in your niche and country, with their page, likes and website.
- **E-commerce and dropshipping research**: spot the products brands push in catalog and carousel ads, with product names and links.
- **Agency pitches and audits**: show a prospect their competitors' current ads in minutes.
- **Political and social research**: track spend, impressions and reach of issue and election ads.
- **Brand monitoring**: catch every new ad that mentions your brand or uses your name.
- **AI and data projects**: feed real ad copy and creatives into your models, dashboards or reports.

### What you can search

| Add this | Example | What you get |
|---|---|---|
| A keyword or phrase | `running shoes` | Every ad that mentions it |
| A Facebook page link | `https://www.facebook.com/nike` | Every ad that page runs |
| A page ID | `15087023444` | Every ad that page runs |
| An ad's Library ID | `1702938977100376` | That single ad |
| An Ad Library search link | `https://www.facebook.com/ads/library/?country=DE&q=adidas&media_type=video` | Exactly the ads that link shows, filters included |
| A link to one ad | `https://www.facebook.com/ads/library/?id=1702938977100376` | That single ad |

Mix as many as you like in one run.

### Filters

| Filter | Choices |
|---|---|
| Country | Any country, or all countries at once |
| Status | Active ads, inactive ads, or both |
| Ad category | All ads, issues/elections/politics, housing, employment, credit, financial products |
| Media type | Images, memes, videos, images and memes, or no media |
| Platforms | Facebook, Instagram, Messenger, Audience Network, Threads, WhatsApp |
| Dates | Ads that ran on or after / on or before a date, or a span like `7 days` |
| Language | Any two-letter language code, like `en`, `es` or `de` |
| Exact phrase | Match your words in this exact order, instead of all the words anywhere in the ad |
| Sort by | Most relevant, most impressions, or longest running |

### How to use it

1. Add your keywords, Facebook pages or Ad Library links.
2. Optionally pick a country, status, media type, platforms or dates.
3. Click **Start**.
4. Browse the ads in the Output tab, or download them as JSON, CSV, Excel or HTML.

### Input example

```json
{
  "searches": ["running shoes", "https://www.facebook.com/nike"],
  "country": "US",
  "activeStatus": "active",
  "platforms": ["instagram"],
  "mediaType": "video",
  "startDate": "30 days",
  "sortBy": "longest_running",
  "maxAdsPerSearch": 200,
  "includeDetails": false
}
```

### What you get

One row per ad:

```json
{
  "search": "https://www.facebook.com/nike",
  "adId": "1702938977100376",
  "adUrl": "https://www.facebook.com/ads/library/?id=1702938977100376",
  "pageId": "15087023444",
  "pageName": "Nike",
  "pageUrl": "https://facebook.com/nike",
  "pageLikes": 39496914,
  "pageCategories": ["Sportswear", "Product/service"],
  "isActive": true,
  "startDate": "2025-04-07",
  "endDate": "2026-10-24",
  "daysActive": 566,
  "platforms": ["facebook", "instagram", "audience_network", "messenger"],
  "format": "dpa",
  "text": "Bring sports more fully into your day with the Nike App.",
  "title": "Nike Invincible 3 Women's Road Running Shoes",
  "linkUrl": "http://itunes.apple.com/app/id1095459556",
  "displayUrl": "itunes.apple.com",
  "ctaText": "Install now",
  "images": ["https://scontent.xx.fbcdn.net/v/t39.35426-6/431644642_n.jpg"],
  "videos": [],
  "cards": [
    {
      "title": "Nike Invincible 3 Women's Road Running Shoes",
      "text": "Bring sports more fully into your day with the Nike App.",
      "linkUrl": "https://www.nike.com/t/invincible-3-road-running-shoes-LL61DX/DR2660-001",
      "displayUrl": "itunes.apple.com",
      "ctaText": "Install Now",
      "imageUrl": "https://scontent.xx.fbcdn.net/v/t39.35426-6/431748186_n.jpg",
      "videoUrl": null
    }
  ],
  "variants": 1,
  "categories": [],
  "details": null
}
```

| Field | What it tells you |
|---|---|
| `daysActive` | How many days the ad has run. Long runners are usually the winners. |
| `images` / `videos` | Every image and video in the ad, from every card, in full size and HD |
| `cards` | Each card of a carousel, dynamic or catalog ad, with its own headline and product link |
| `linkUrl` / `displayUrl` | The landing page and the website shown on the ad |
| `platforms` | Where the ad runs: Facebook, Instagram, Messenger, Threads, WhatsApp, Audience Network |
| `variants` | How many versions of the ad the advertiser runs |
| `spend` / `impressions` / `paidForBy` | Budget, reach and sponsor of political and issue ads |
| `details` | With details on: EU and UK reach by country, age and gender, the targeted audience, who paid, and the advertiser's Instagram. Political ads add their audience by age, gender and region, and the advertiser's political spend |

With details on, each ad shown in the EU or UK also carries:

```json
"details": {
  "totalReach": 50171,
  "targetAgeMin": 21,
  "targetAgeMax": 65,
  "targetGender": "All",
  "targetLocations": [{ "name": "Germany", "type": "countries", "excluded": false }],
  "reachByCountry": [{ "country": "DE", "ageRange": "25-34", "male": 1073, "female": 938, "unknown": 2 }],
  "audienceShareByAgeGender": [],
  "reachShareByRegion": [],
  "deliveryCountry": null,
  "pageSpend": null,
  "payers": [{ "payer": "Nike Europe B.V.", "beneficiary": "Nike Europe B.V." }],
  "pageVerification": "BLUE_VERIFIED",
  "pageInstagramUsername": "nike",
  "pageInstagramFollowers": 297000000,
  "pageAbout": "Just Do It."
}
```

And a political or issue ad, searched in the United States, carries who it reached and what its advertiser spends:

```json
"details": {
  "totalReach": null,
  "audienceShareByAgeGender": [
    { "ageRange": "25-34", "male": 0.2, "female": 0.08, "unknown": 0 },
    { "ageRange": "35-44", "male": 0.16, "female": 0.09, "unknown": 0 }
  ],
  "reachShareByRegion": [{ "region": "California", "share": 0.12 }, { "region": "Texas", "share": 0.12 }],
  "deliveryCountry": "US",
  "pageSpend": {
    "country": "US",
    "lifetime": [{ "paidForBy": "Citizens for a Better Tomorrow", "amount": 48250 }],
    "weekly": [{ "paidForBy": "Citizens for a Better Tomorrow", "amount": 1200 }]
  }
}
```

Shares are fractions of the people the ad reached (0.12 = 12%). `pageSpend` is the advertiser's total spend on political and issue ads in that country, in its currency, split by who paid for them; `weekly` is the latest week.

### Export and integrations

- **Download** results as JSON, CSV, Excel, XML or HTML from the Output tab.
- **Google Sheets, Make, Zapier, n8n, Airtable and Slack**: send every new ad where your team works.
- **Schedules**: run it daily or weekly to track competitors' new ads automatically.
- **Webhooks**: get a call to your server the moment a run finishes.

### Run it from your code

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('vero-api/facebook-ad-library-scraper').call({
  searches: ['running shoes', 'https://www.facebook.com/nike'],
  country: 'US',
  mediaType: 'video',
  maxAdsPerSearch: 200,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((ad) => `${ad.pageName}: ${ad.adUrl}`));
```

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("vero-api/facebook-ad-library-scraper").call(run_input={
    "searches": ["skincare"],
    "country": "GB",
    "platforms": ["instagram"],
    "maxAdsPerSearch": 100,
})
for ad in client.dataset(run.default_dataset_id).iterate_items():
    print(ad["pageName"], ad["adUrl"])
```

### Use it from your AI assistant (MCP)

Ask Claude, ChatGPT, Cursor, VS Code, or any assistant that supports MCP about a brand's ads in plain words. Add this server to its MCP settings:

```json
{
  "mcpServers": {
    "facebook-ad-library-scraper": {
      "url": "https://mcp.apify.com?tools=vero-api/facebook-ad-library-scraper"
    }
  }
}
```

Then just ask, for example:

- *"Which video ads is Nike running on Instagram in the US right now?"*
- *"Find skincare brands advertising in Germany this week and show their longest-running ads."*
- *"Which election ads had the most impressions in the US this month, and who paid for them?"*

### Pricing

You pay only for the ads you get: no subscriptions, no surprises.

| What you get | Price |
|---|---|
| Ads | $0.40 per 1,000 ads |
| Ads with reach, audience and advertiser details | $0.70 per 1,000 ads |

Details are charged only when you switch them on. The run stops right at the spending limit you set, so you always know your maximum cost.

### FAQ

**Do I need a Facebook account or a Meta API token?** No. Everything comes from the public Meta Ad Library, so there is nothing to sign up for and no identity check.

**Is this a Facebook Ad Library API alternative?** Yes. Meta's official Ad Library API covers political and issue ads plus ads shown in the EU, and needs a verified developer account. This scraper returns every ad in every country, with images and videos, from a simple form or one API call.

**How do I get exactly the ads I see on the Ad Library site?** Set up your search on [facebook.com/ads/library](https://www.facebook.com/ads/library/), copy the link from your browser and paste it as a search. Every filter in the link is kept.

**Can I scrape only Instagram ads?** Yes. Pick **Instagram** under **Platforms**. You can combine any platforms you like.

**Can I download the ad videos and images?** Every row has direct links to the full-size images and HD and SD videos, plus each video's thumbnail. Download them soon after the run, since Meta's media links stay valid for a limited time.

**How do I find all ads from one competitor?** Paste their Facebook page link, like `https://www.facebook.com/nike`. The actor finds the page and returns every ad it runs. You can also use the page ID from any Ad Library link (`view_all_page_id`).

**Can I look up one ad by the Library ID shown on the Ad Library?** Yes. Paste the number, like `1702938977100376`, and you get that ad, whatever filters the form has set. A link to the ad works the same way.

**How many ads can I get?** As many as the Ad Library shows. Set **Max ads per search** to the number you need. A run with 1,000 ads takes about two and a half minutes.

**Why do some ads have reach and audience details and others don't?** Meta publishes reach, audience and payer details for ads shown in the EU and the UK, and audience and spend details for political and issue ads. Turn on details with any search and you get them for every such ad it finds.

**Why do political ads show spend and impressions?** Meta publishes budgets and reach for ads about social issues, elections or politics. Pick **Issues, elections or politics** under **Ad category** to see only those. With details on, pick a country to also get the advertiser's total spend on these ads there.

**Why do catalog ads show a product name as the headline?** Catalog and dynamic ads are built from a product feed. The actor gives you the headline and text of the first product, exactly as the Ad Library displays the ad, and every product with its own headline, link and image in `cards`.

**Can I track new ads over time?** Yes. Set **Ran on or after** to a span like `7 days` and create a schedule in Apify Console. Each run returns the ads that ran in the past week.

**Which countries are covered?** Every country in the Meta Ad Library. Pick one under **Country**, or leave **All countries** on.

**Is this an official Meta or Facebook tool?** No. This actor is not affiliated with, endorsed by or sponsored by Meta Platforms, Facebook or Instagram. It reads the public Meta Ad Library, the same ads anyone can see there.

### More tools from us

- [Google Ads Transparency Scraper](https://apify.com/vero-api/google-ads-transparency-scraper): every ad a brand runs on Google Search, YouTube, Shopping, Maps and Play.
- [Instagram Posts Scraper](https://apify.com/vero-api/instagram-posts-scraper): caption, likes, comments and every photo and video behind any Instagram post or reel link.
- [Instagram Reels & Posts Downloader](https://apify.com/vero-api/instagram-reels-posts-downloader): a direct MP4 download link for any Instagram reel or video post.
- [Threads Scraper](https://apify.com/vero-api/threads-scraper): posts, profiles, hashtag searches and replies from Meta's Threads.
- [Website Screenshot Generator](https://apify.com/vero-api/website-screenshot): capture the landing pages your competitors' ads send people to.

# Actor input Schema

## `searches` (type: `array`):

Add a keyword (running shoes), a Facebook page link (https://www.facebook.com/nike), a page ID (15087023444), an ad's Library ID (1702938977100376) or any link from the Ad Library, including links to a single ad. Ad Library links keep the filters you set on the site.

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

How many ads to collect for each keyword, page or link.

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

Switch on to add what Meta shows under "See ad details". For ads shown in the EU or UK: how many people saw the ad there, by country, age and gender, and the age, gender and locations it targeted. For political and issue ads: who it reached by age, gender and region, and the advertiser's spend on such ads in your country. Plus who paid for the ad and the advertiser's Instagram account and verification.

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

Only ads shown in this country.

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

Ads running right now, ads that have stopped, or both.

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

All ads, or only one of Meta's special ad categories. Political and issue ads include how much was spent and how many times they were seen.

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

Only ads with this kind of creative.

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

Only ads shown on these Meta platforms. Leave empty for all of them.

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

Only ads that ran on or after this date. Pick a date, or a span like 7 days to keep scheduled runs current.

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

Only ads that ran on or before this date.

## `language` (type: `string`):

Only ads written in this language, as a two-letter code: en, es, de, fr, pt, ar…

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

Find ads with your words in this exact order, instead of ads that contain all the words anywhere.

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

Which ads come first.

## Actor input object example

```json
{
  "searches": [
    "running shoes",
    "https://www.facebook.com/nike"
  ],
  "maxAdsPerSearch": 100,
  "includeDetails": false,
  "country": "ALL",
  "activeStatus": "active",
  "adType": "all",
  "mediaType": "all",
  "exactPhrase": false,
  "sortBy": "relevance"
}
```

# Actor output Schema

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

One row per ad: adId and adUrl, the advertiser (pageName, pageId, pageUrl), text, title, linkUrl, ctaText, images, videos and cards, startDate, endDate, daysActive, isActive and platforms, plus spend and impressions for political ads and, when switched on, reach and audience details.

# 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 = {
    "searches": [
        "running shoes",
        "https://www.facebook.com/nike"
    ]
};

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

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

```

## MCP server setup

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