# Facebook Ads Library Scraper: $0.50 per 1,000 Ads (`fit_melon/facebook-ads-library-scraper`) Actor

Monitor competitors' Facebook and Instagram ads from the Meta Ad Library: the 30 newest ads of each advertiser or keyword, with texts, links, images, videos, dates and platforms. Ad spy tool, no login. $0.50 per 1,000 ads, all-in.

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

## Pricing

from $0.30 / 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: monitor your competitors' ads

**See what your competitors advertise on Facebook, Instagram, Messenger and Threads**, straight from the public Meta Ad Library. For each advertiser or keyword you get **its newest ads** (up to 30 per run) with the ad text, headline, landing page, button, images, videos, carousel cards, start date, platforms and advertiser details. **$0.50 per 1,000 ads, all-in.** No start fee, no paid add-ons, no Facebook account needed.

Built for **daily competitor monitoring**: run it every morning on your list of competitors and you get every new ad they launched.

### ✅ What you get

- **Ad content**: text, headline, link description, button (CTA), landing page URL and domain, image links, video links (HD), video thumbnails, every carousel / catalog card.
- **Dates and status**: start date, last day shown, active or not, platforms (Facebook, Instagram, Messenger, Audience Network, Threads), number of versions of the ad.
- **Advertiser**: name, page ID, page URL, category, page likes, profile picture, link to all its ads.
- **Political and issue ads**: "paid for by", spend and impression ranges when Meta publishes them.
- **Clean output**: one row per ad, no duplicates, ISO 8601 dates, catalog templates such as `{{product.name}}` replaced by the real product text.

### ⚠️ The one limit to know: up to 30 ads per advertiser or keyword

Meta shows the first page of results (about 30 ads) to logged-out visitors from servers. This actor never logs in and never uses tricks to get around Meta's limits, so it returns **up to 30 ads per advertiser, keyword or Ad Library URL, newest first** (or most seen first). What that means in practice, measured on 150 random advertisers (France, USA, Germany, October 2026):

| | Share of advertisers |
|---|---|
| Have 30 active ads or fewer: **you get all their ads** | **51 %** |
| Launch fewer than 30 new ads in 2 days: **a daily run catches every new ad** | **95 %** |

So it is a great fit for monitoring a list of competitors every day. It is **not** the right tool to download all 5,000 ads matching a broad keyword in one run.

### 🚀 How to use it

1. Add your competitors in **Advertisers**: a page ID (`15087023444`), a Facebook page URL (`https://www.facebook.com/nike`) or a name (`Decathlon`). Page IDs are the most reliable: you find them in an advertiser's Ad Library URL, after `view_all_page_id=`.
2. Or add **Keywords** (`black friday`, `crm software`), or paste **Ad Library URLs** from facebook.com/ads/library (their filters are kept).
3. Pick a **country** (or `ALL`) and click **Start**.
4. To track new ads: schedule the actor daily with **Started running on or after** = `1 day`.

#### Input example

```json
{
    "pageIds": ["https://www.facebook.com/nike", "15087023444", "Decathlon"],
    "searchTerms": ["running shoes"],
    "country": "US",
    "maxAds": 30,
    "order": "newest",
    "adStatus": "active",
    "mediaType": "all",
    "platforms": ["instagram"],
    "startedAfter": "7 days"
}
```

Filters: country, active / inactive ads, media type (image, video, meme), platforms, ad category (political, housing, employment, credit), ad languages, exact phrase, "started running on or after", "shown between" (Meta's own date filter: ads that had impressions during a period).

**Switching from another Ad Library actor?** The input names of the main other actors are accepted as they are, so in Make, n8n or Zapier you can switch by changing only the actor ID: `startUrls` (strings or `{ "url": … }`), `resultsLimit`, `activeStatus`, `sorting`, `onlyAdsNewerThan`, `onlyAdsOlderThan`, `searchQueries`, `pageUrls`, `adsLibraryUrls`, `query`, `pageId`, `advertisers`, `category`, `sortBy`, `minDate`, `maxDate`, `maxItems`, `urls`.

#### Output example (one ad)

```json
{
    "adArchiveId": "1988864058460245",
    "adUrl": "https://www.facebook.com/ads/library/?id=1988864058460245",
    "pageId": "15087023444",
    "pageName": "Nike",
    "pageUrl": "https://www.facebook.com/nike/",
    "pageCategory": "Sportswear",
    "pageLikeCount": 39493442,
    "isActive": true,
    "startDate": "2026-10-26T07:00:00.000Z",
    "endDate": "2026-10-28T07:00:00.000Z",
    "platforms": ["instagram"],
    "displayFormat": "DPA",
    "bodyText": "Transitional pieces for seasonal layering. Move effortlessly with a new NikeSKIMS all-day uniform.",
    "title": "NikeSKIMS Sherpa",
    "linkUrl": "https://www.nike.com/w/nikeskims-b2asd",
    "displayUrl": "nike.com",
    "linkDescription": "Find NikeSKIMS at Nike.com. Free delivery and returns.",
    "ctaText": "Shop now",
    "imageUrls": ["https://scontent.xx.fbcdn.net/v/t39.35426-6/…"],
    "videoUrls": [],
    "thumbnailUrl": "https://scontent.xx.fbcdn.net/v/t39.35426-6/…",
    "cards": [{ "title": "NikeSKIMS Sherpa", "linkUrl": "https://www.nike.com/t/…", "imageUrl": "https://scontent.xx.fbcdn.net/…", "ctaText": "Shop Now" }],
    "collationCount": 1,
    "byline": null,
    "spend": null,
    "impressions": null,
    "searchType": "pageUrl",
    "source": "https://www.facebook.com/nike",
    "searchCountry": "US",
    "position": 27,
    "totalAdsInSearch": 70,
    "scrapedAt": "2026-10-28T13:01:04.492Z"
}
```

`totalAdsInSearch` is Meta's own count for the search, so you always know how many ads there are in total. Image and video links are temporary Meta CDN links: download what you want to keep within a few days.

### 💡 Use cases

- **Competitor monitoring**: every new ad of your competitors, every day, in a spreadsheet or in Slack.
- **Creative ideas**: the hooks, offers, formats and landing pages that brands in your niche are running right now (newest first) or the most seen ones.
- **Promotion tracking**: catch Black Friday, sales and launch campaigns as soon as they start (`startedAfter: "1 day"`).
- **Agencies**: watch the advertisers of all your clients' markets in one scheduled run.

### 📊 Measured performance (October 2026)

- 60 advertisers in one run: **1,178 ads in 88 seconds**, 99.6 % of the ads Meta shows, 0 duplicates, 0 failed page.
- 300+ page loads in a row without a block or a CAPTCHA.
- Default memory 1 GB (512 MB works too, twice slower).

### 💰 Pricing

**$0.50 per 1,000 ads**, everything included. You pay only for ads delivered: no start fee, no add-on, and the run stops cleanly at your spending limit.

| Actor | Price per 1,000 ads | Extra fees | Ads per search |
|---|---|---|---|
| **This actor** | **$0.50** | none | up to 30, newest first |
| apify/facebook-ads-scraper | $3.40 – $5.80 | paid options | all |
| automation-lab/facebook-ads-library | $0.30 – $0.58 | + $0.005 per run | all |
| igolaizola/facebook-ad-library-scraper | $0.30 – $0.75 | + $0.003 – $0.0075 per run | all |

Prices from the Apify Store on 28 October 2026. For a daily watch of 10 advertisers (~200 ads), no per-run fee makes this actor one of the cheapest options. For a one-off export of thousands of ads from a single search, the other actors return more ads.

### ❓ FAQ

**Is it legal?** The Meta Ad Library is a public transparency tool that anyone can browse without an account. The actor only reads what a logged-out visitor sees, at a moderate pace, and collects no personal data about the people who see the ads: only ads and the public information of the advertisers.

**Why only 30 ads per search?** That is what Meta shows logged-out visitors from servers, and this actor does not log in or bypass Meta's limits. Add more advertisers or keywords, or run it daily: newest ads come first.

**How do I find a page ID?** Open the advertiser in facebook.com/ads/library: the number after `view_all_page_id=` in the URL. You can also paste the Facebook page URL or the name: the actor finds the page ID (and logs it).

**Can I get one specific ad?** Yes: paste its Ad Library link (`https://www.facebook.com/ads/library/?id=…`) in Ad Library URLs.

**Do I get EU reach by age and gender?** Not included: Meta loads that detail separately for each ad, it is not part of the public results page. You get everything the results page shows.

**What if a run is interrupted?** Resurrect it: finished searches are skipped and nothing is delivered or charged twice.

**Something missing or broken?** Open an issue on the actor page.

### 🔗 Also by fit_melon

Need local business leads? **[Google Maps Scraper with emails](https://apify.com/fit_melon/google-maps-scraper-cheap)**: places, phones, websites, emails and social profiles at $0.50 per 1,000 places.

# Changelog

This Actor's version history is a separate document: https://apify.com/fit_melon/facebook-ads-library-scraper/changelog.md

# Actor input Schema

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

One advertiser per line: a page ID (e.g. 15087023444), a Facebook page URL (https://www.facebook.com/nike) or an advertiser name ("Decathlon"). Page IDs are the most reliable: you find them in the advertiser's Ad Library URL (view_all_page_id=…).

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

Search the ads' texts, e.g. "running shoes", "black friday", "crm software". One search per keyword.

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

Paste searches made on facebook.com/ads/library (their filters are kept), single ads (…/ads/library/?id=…) or Facebook page URLs.

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

Two-letter country code where the ads were shown (US, GB, FR, DE, ES, IT, CA, AU, BR, IN…) or ALL for every country.

## `maxAds` (type: `integer`):

Ads returned for each advertiser, keyword or URL. Meta shows logged-out visitors the first 30 results of a search: to cover more, add more advertisers or keywords, or run the actor every day (newest ads first). You pay only for ads returned ($0.0005 each). Default: 30.

## `order` (type: `string`):

Newest first (best for daily monitoring) or most seen first (total impressions). Default: newest first.

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

Ads running now, ads that stopped, or both. Default: active ads.

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

Only ads with this kind of creative.

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

Only ads shown on these platforms (empty = all).

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

All ads, or only political and issue ads (these come with spend and impression ranges), housing, employment or credit ads.

## `languages` (type: `array`):

Two-letter language codes of the ad texts, e.g. en, fr, de (empty = all).

## `startedAfter` (type: `string`):

Only ads that started running on or after this date (YYYY-MM-DD, or relative like "1 day"). With newest first, run daily with "1 day" to get only the new ads.

## `shownAfter` (type: `string`):

Only ads that were shown (had impressions) on or after this date, whatever their start date. Meta's own date filter.

## `shownBefore` (type: `string`):

Only ads that were shown (had impressions) on or before this date. Combine with "Shown on or after" for a period, e.g. Black Friday week.

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

Match the keywords as an exact phrase instead of any of the words.

## Actor input object example

```json
{
  "pageIds": [
    "https://www.facebook.com/nike"
  ],
  "country": "US",
  "maxAds": 30,
  "order": "newest",
  "adStatus": "active",
  "mediaType": "all",
  "adType": "all",
  "exactPhrase": false
}
```

# Actor output Schema

## `ads` (type: `string`):

All scraped ads (one item per ad), Overview table.

## `creatives` (type: `string`):

Ad texts, links, images, videos and carousel cards.

## `runStats` (type: `string`):

Searches run, ads delivered, page loads, per-search report.

# 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 = {
    "pageIds": [
        "https://www.facebook.com/nike"
    ],
    "country": "US",
    "maxAds": 30,
    "order": "newest",
    "adStatus": "active"
};

// Run the Actor and wait for it to finish
const run = await client.actor("fit_melon/facebook-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 = {
    "pageIds": ["https://www.facebook.com/nike"],
    "country": "US",
    "maxAds": 30,
    "order": "newest",
    "adStatus": "active",
}

# Run the Actor and wait for it to finish
run = client.actor("fit_melon/facebook-ads-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 '{
  "pageIds": [
    "https://www.facebook.com/nike"
  ],
  "country": "US",
  "maxAds": 30,
  "order": "newest",
  "adStatus": "active"
}' |
apify call fit_melon/facebook-ads-library-scraper --silent --output-dataset

```

## MCP server setup

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