# Meta Ad Library Scraper 📢 (Facebook & Instagram ads) (`tagadanar/meta-ad-library-scraper`) Actor

Every ad a brand or a keyword is running on Facebook and Instagram: ad text, headline, landing page, button, start date, platforms, images and videos. Search by keyword or advertiser page, any country, active or all ads. No API key, no login.

- **URL**: https://apify.com/tagadanar/meta-ad-library-scraper.md
- **Developed by:** [Tagada Data](https://apify.com/tagadanar) (community)
- **Categories:** Social media, E-commerce, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.18 / 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

## Meta Ad Library Scraper 📢 (Facebook & Instagram ads)

See every ad a brand (or a keyword) is running on Facebook and Instagram right now: the ad text, headline, landing page, button, start date, platforms, images and videos. Copy what works, track a competitor's new creatives, or find brands that advertise in your niche. It reads Meta's public Ad Library, the same one you can open in a browser, so there is no API key, no Facebook login and no ID verification.

Price: **$0.25 per 1,000 ads** (less on Bronze, Silver and Gold plans), platform costs included.

### What you get

One row per ad, ready for a spreadsheet:

| Field | What it is |
|---|---|
| `pageName`, `pageId`, `pageUrl` | The advertiser (Facebook Page), with its likes and categories |
| `bodyText`, `title`, `linkDescription` | The ad copy, the headline and the line under it |
| `linkUrl`, `displayUrl` | The landing page the ad sends people to, and the link shown on the ad |
| `ctaText`, `ctaType` | The button ("Shop now", "Learn more", "Sign up") |
| `startDate`, `daysRunning`, `isActive`, `endDate` | When the ad started, how long it has been running, and when it stopped |
| `platforms` | Where it runs: facebook, instagram, messenger, audience_network, threads, whatsapp |
| `displayFormat` | image, video, carousel, dynamic_product (catalogue ads), dynamic_creative |
| `imageUrls`, `videoUrls`, `videoThumbnailUrls` | The creatives |
| `cards` | Each card of a carousel or catalogue ad: headline, text, link, image or video |
| `collationCount` | How many versions of this ad share the same creative (a good sign it is a winner) |
| `spendRange`, `impressionsRange`, `paidForBy` | For political and issue ads, as Meta discloses them |
| `adArchiveId`, `adLibraryUrl` | The ad's ID and its page in the Ad Library |
| `searchQuery`, `country`, `capturedAt` | Which keyword or advertiser found it, and when |

Ads that have been running for a long time (`daysRunning`) and ads with many versions (`collationCount`) are usually the ones that make money for the advertiser. Sort by those two columns first.

### How to use it

**All ads of a brand**: put its Facebook page in "Advertiser pages". Any of these work: `https://www.facebook.com/nike`, `nike`, the page ID `15087023444`, a `facebook.com/people/...` or `profile.php?id=` link, or the Ad Library link you get from "See all ads" on the page.

```json
{
    "pageUrlsOrIds": ["https://www.facebook.com/hoka", "https://www.facebook.com/allbirds"],
    "country": "US",
    "activeStatus": "active",
    "maxAdsPerSearch": 200
}
```

**Every ad that mentions a keyword**: put words in "Search keywords". Put a phrase in quotes to match it exactly, as in the Ad Library search box.

```json
{
    "searchTerms": ["running shoes", "\"protein powder\""],
    "country": "GB",
    "mediaType": "video",
    "maxAdsPerSearch": 300
}
```

**Political and issue ads**, with spend and impressions ranges:

```json
{
    "searchTerms": ["climate"],
    "adType": "political",
    "country": "US",
    "activeStatus": "all",
    "maxAdsPerSearch": 100
}
```

You can also paste an Ad Library search link you built in your browser under "Advertiser pages": its country and filters are kept.

### Output example

A real row from a run on "running shoes" (US, active ads):

```json
{
    "adArchiveId": "1244156561167144",
    "adLibraryUrl": "https://www.facebook.com/ads/library/?id=1244156561167144",
    "pageId": "103032366405927",
    "pageName": "HOKA",
    "pageUrl": "https://facebook.com/hoka",
    "pageLikeCount": 1221127,
    "pageCategories": ["Outdoor & Sporting Goods Company"],
    "isActive": true,
    "startDate": "2026-04-01",
    "endDate": null,
    "daysRunning": 198,
    "platforms": ["facebook", "instagram"],
    "displayFormat": "image",
    "bodyText": "The legs give out. The heart doesn’t. Together We Fly Higher.",
    "title": "FLY HUMAN FLY™",
    "linkDescription": "From first summits to 5Ks, HOKA designs running shoes and gear built to help you go your own way - farther and faster than ever before. FLY HUMAN FLY.",
    "linkUrl": "https://www.hoka.com/en/us/fly-human-fly/?utm_source=facebookinstagram&utm_medium=psm&utm_campaign=EvergreenKeyCitiesLA&utm_term=BroadFitness&utm_content=Ad11",
    "displayUrl": "HOKA.com",
    "ctaText": "Learn more",
    "ctaType": "LEARN_MORE",
    "imageUrls": ["https://scontent.fbhx1-2.fna.fbcdn.net/v/t39.35426-6/657233080_968546429006472_8278936364514793068_n.jpg?..."],
    "videoUrls": [],
    "videoThumbnailUrls": [],
    "cardCount": 0,
    "cards": [],
    "collationCount": 2,
    "collationId": "955107020207956",
    "paidForBy": null,
    "brandedContentPartner": null,
    "spendRange": null,
    "impressionsRange": null,
    "reachEstimate": null,
    "currency": null,
    "targetedOrReachedCountries": [],
    "containsAiGeneratedMedia": false,
    "searchQuery": "running shoes",
    "searchType": "keyword",
    "country": "US",
    "searchUrl": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&media_type=all&q=running+shoes&search_type=keyword_unordered",
    "capturedAt": "2026-10-15T23:26:08.327Z"
}
```

### Pricing

Pay per ad delivered, platform usage included (nothing else is billed to you):

| Plan | Per ad | Per 1,000 ads |
|---|---|---|
| Free | $0.00025 | $0.25 |
| Bronze | $0.000225 | $0.225 |
| Silver | $0.0002 | $0.20 |
| Gold | $0.000175 | $0.175 |

Plus $0.001 once per run. A search that finds no ads costs nothing beyond that. Set a maximum charge on the run and it stops cleanly when it is reached.

### FAQ

**Do I need a Facebook account, an access token or the Ad Library API?**
No. The official Ad Library API needs a token and an identity check, and it only covers political ads outside the EU. This actor reads the public Ad Library pages that anyone can open, for every kind of ad.

**How do I spy on a competitor's Facebook ads?**
Put their Facebook page link under "Advertiser pages", keep "Active ads", and schedule the run weekly. New `adArchiveId`s are new creatives; a high `daysRunning` means the ad keeps getting budget.

**Can I see stopped (inactive) ads?**
Choose "All ads" or "Stopped ads only". Meta keeps stopped ads for every advertiser in EU countries. Elsewhere it keeps them mainly for political and issue ads, so a US search on "All ads" mostly returns active ones.

**Why do I get fewer ads than I asked for?**
Because Meta has fewer for that search, and the run says so in its final status ("Meta had no more ads for ... after 42"). Check the country: an advertiser can run ads in France and none in the US.

**Do you get spend, reach or impressions?**
For political and issue ads, yes: Meta's spend range, impressions range and "Paid for by". For other ads Meta does not publish spend, so those fields stay empty.

**Do the image and video links expire?**
Yes. They are Meta's CDN links and stop working after some days. Download the files you want to keep soon after the run.

**What is a dynamic product or dynamic creative ad?**
Catalogue ads (`dynamic_product`) and ads Meta assembles from several texts and images (`dynamic_creative`). Their main fields show the first card; every card is in `cards`.

**Which countries can I search?**
66 countries from the list, or "All countries". The country is Meta's own filter: ads shown to people in that country.

**Can I filter by image or video ads?**
Yes, with "Media type". It uses Meta's own media filter.

**Is it legal to scrape the Meta Ad Library?**
The Ad Library is a public transparency tool that Meta publishes for everyone. This actor reads only what that public page shows, without logging in. How you use the data is up to you and your local laws.

### Related actors

- [Google Ads Transparency Center Scraper](https://apify.com/tagadanar/google-ads-transparency-scraper): the same research for a brand's Google ads.
- [Shopify Store Scraper](https://apify.com/tagadanar/shopify-store-prospector): the catalogue and prices behind the stores you see advertising.
- [Threads Scraper](https://apify.com/tagadanar/threads-scraper): what people say about a brand on Threads.
- [Trustpilot Reviews Scraper](https://apify.com/tagadanar/trustpilot-reviews): what customers say about an advertiser.

Facebook ads library scraper, Meta ads library export, Instagram ads spy tool, competitor ad research, ad creative library, Facebook ad spy, winning ads finder, dropshipping ad research.

# Changelog

This Actor's version history is a separate document: https://apify.com/tagadanar/meta-ad-library-scraper/changelog.md

# Actor input Schema

## `searchTerms` (type: `array`):

One keyword or phrase per line, typed as you would in the Ad Library search box. Meta matches ads whose text contains the words. Put a phrase in quotes ("running shoes") to match that exact phrase only. Each keyword is a separate search and every row says which keyword found it.

## `pageUrlsOrIds` (type: `array`):

Get every ad of a brand: one Facebook page link or page id per line (https://www.facebook.com/nike, nike, 15087023444), or an Ad Library link copied from your browser (the page's "See all ads" view, or a keyword search, whose own country and filters are kept).

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

Ads shown to people in this country (Meta's own country filter). In EU countries Meta keeps every ad, active or stopped; elsewhere it keeps stopped ads mainly for political and issue ads.

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

Active ads are running today. 'All ads' adds the ones that stopped, where Meta still shows them.

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

All ads, or only ads about social issues, elections or politics (those come with spend, impressions and 'Paid for by').

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

Keep only ads with images, or only ads with videos (Meta's own media filter).

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

Stop each keyword or advertiser after this many ads. When Meta has fewer, the run says so. You only pay for ads delivered.

## Actor input object example

```json
{
  "searchTerms": [
    "running shoes"
  ],
  "pageUrlsOrIds": [
    "https://www.facebook.com/hoka"
  ],
  "country": "US",
  "activeStatus": "active",
  "adType": "all",
  "mediaType": "all",
  "maxAdsPerSearch": 30
}
```

# Actor output Schema

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

One item per ad per keyword or advertiser in the default dataset.

# 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 = {
    "searchTerms": [
        "running shoes"
    ],
    "pageUrlsOrIds": [
        "https://www.facebook.com/hoka"
    ],
    "maxAdsPerSearch": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("tagadanar/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 = {
    "searchTerms": ["running shoes"],
    "pageUrlsOrIds": ["https://www.facebook.com/hoka"],
    "maxAdsPerSearch": 30,
}

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

```

## MCP server setup

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