# Facebook Ads Library Scraper: Only New Ads & Days Running (`h1018y/anvil-facebook-ads-library-scraper`) Actor

Scrapes the Facebook Ads Library (Meta Ad Library) for any brand or keyword: new ads since your last run, days running, versions, platforms, text, links, images and videos. A Facebook ad spy for daily competitor alerts, no login.

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

## Pricing

from $3.75 / 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.
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: Only New Ads & Days Running

**Facebook Ads Library Scraper** - Track any brand or keyword in the Meta Ad Library - see only the ads that are new since your last run and how long each one has been running.

### What does Facebook Ads Library Scraper do?

Every ad comes with days running (ads that keep running are the ones that make money), its number of versions and the platforms it shows on, and an only-new mode turns it into a daily competitor alert - the popular Facebook ad scrapers dump the same ads every run and 48% of their users sit on poorly

- New ads since your last run, per keyword or advertiser
- Days running and start date - spot long-running winners
- Ad text, title, link, call to action, images and videos
- Platforms (Facebook, Instagram, Messenger ...) and number of versions
- Public Ad Library only - no login, no CAPTCHA solving

### Why this Facebook Ads Library Scraper?

Facebook keeps changing the page and its human check, so cheap scrapers fail. This Facebook Ads Library Scraper checks every run and tells you plainly when a page could not be read, instead of returning empty or wrong rows.

### How to use Facebook Ads Library Scraper

1. Press **Start** - the form already holds an example that works.
2. Put in your own input (see the fields on the Input tab).
3. Run it once, or put it on an **Apify Schedule** to get fresh rows every day.
4. Download the results as JSON, CSV or Excel, or send them to Google Sheets, Zapier, Make, the Apify API or an AI agent (Apify MCP server).

#### Input example

```json
{
  "searchTerms": [
    "nike"
  ],
  "country": "US",
  "activeOnly": true,
  "adsPerSearch": 50,
  "onlyNew": false,
  "maxItems": 500,
  "useApifyProxy": true
}
```

#### Output example (a real run)

```json
[
  {
    "search": "nike",
    "country": "US",
    "status": "seen",
    "adArchiveId": "1107386451952079",
    "pageName": "Nike",
    "pageId": "15087023444",
    "pageUrl": "https://www.facebook.com/nike/",
    "pageLikes": 39503983,
    "isActive": true,
    "startDate": "2026-09-01",
    "endDate": null,
    "daysRunning": 42,
    "platforms": [
      "FACEBOOK",
      "INSTAGRAM"
    ],
    "versions": 1,
    "format": "DPA",
    "title": "{{product.name}}",
    "body": "Run through summer with gear that can take the heat.",
    "linkUrl": "https://www.nike.com/",
    "linkCaption": "NIKE.COM",
    "cta": "Shop now",
    "imageUrls": [
      "https://scontent-iad6-1.xx.fbcdn.net/v/t39.35426-6/786342955_913293755189517_4658067852410014722_n.jpg?_nc_cat=102&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=6Aq3Z4X_fWQQ7kNvwHZ2-cU&_nc_oc=AdqAHVTL4Q5dDce0-MchI9Kcmq_wMD9FRkVPldjTNy8ZCg6ZVzqNji3MP2exTpOwM78&_nc_zt=14&_nc_ht=scontent-iad6-1.xx&_nc_gid=I-eNfWgaFF9InHqMDnhScg&_nc_ss=7f289&oh=00_AQOZB6mxPYc0vxCSJSxskuo4Xd8S_PH1zaYRf46qxPWNrQ&oe=6AD43973",
      "https://scontent-iad6-1.xx.fbcdn.net/v/t39.35426-6/787818083_1363817722503117_346426616878533322_n.jpg?_nc_cat=109&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=4tGS67T5TeAQ7kNvwGfJm9i&_nc_oc=AdoBpFAwE-6JwN1jI7gh7skLkJH-WLul6j24TfcKsDAD3c5AO7uWlj6JV0LIZ9WX0-4&_nc_zt=14&_nc_ht=scontent-iad6-1.xx&_nc_gid=I-eNfWgaFF9InHqMDnhScg&_nc_ss=7f289&oh=00_AQPaS1RSx_ksGihXOb9GFgGh4s8NDhPiaI5BYnVCjT7Qpg&oe=6AD4319A",
      "https://scontent-iad6-1.xx.fbcdn.net/v/t39.35426-6/788348744_1761003288272298_5063827412562422637_n.jpg?_nc_cat=106&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=H2Tfu95ckZ4Q7kNvwGVGqrb&_nc_oc=AdpwuNrGaH9p9avseOTvO-7u-39shNc1v2xYNBUrhsuvYNXVBBZVwb84bzna80_jd4c&_nc_zt=14&_nc_ht=scontent-iad6-1.xx&_nc_gid=I-eNfWgaFF9InHqMDnhScg&_nc_ss=7f289&oh=00_AQPVdIA06Qzy3yIn7zjMAaNbkF6rV9gwfx5ELYoeTAXwcQ&oe=6AD434E6",
      "https://scontent-iad3-2.xx.fbcdn.net/v/t39.35426-6/787341597_1403139668417555_3205388062094203287_n.jpg?_nc_cat=103&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=DL9PuQcoST0Q7kNvwFhoKnl&_nc_oc=AdpePbKpHxd8jY-eWa_43Y6UUITsr0B1TlLgdUP9m2N7P6u3TbItqMU7ZuAW--WDv8E&_nc_zt=14&_nc_ht=scontent-iad3-2.xx&_nc_gid=I-eNfWgaFF9InHqMDnhScg&_nc_ss=7f289&oh=00_AQMuJW194z23vstHUD6gJYWp9L3T_k29GR8XQGdrWfvikQ&oe=6AD44B2A",
      "https://scontent-iad3-1.xx.fbcdn.net/v/t39.35426-6/788764640_1044491694885080_270868132185520203_n.jpg?_nc_cat=108&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=rXIRy9KvjcgQ7kNvwG4k8vt&_nc_oc=AdoYbQgNmCJNM4toW3GxqoNGWgd2MWsgYtddS0J6IMHW69ktpiUWCzRaeXMIKS2ryt
```

One flat row per result.

### How much does Facebook Ads Library Scraper cost?

You pay only per result (pay per event) - no monthly fee, no minimum, and the price per result is lower on Apify's Bronze, Silver and Gold plans. The exact price is on the **Pricing** tab. Apify's free plan credit is enough to try it on real input.

### Also searched as

- meta ad library scraper
- facebook ad spy
- facebook ads scraper
- competitor ads monitor
- meta ads library api

### FAQ

**Does Facebook Ads Library Scraper need a login, cookies or an API key?** No. It reads public pages only.

**Can I run Facebook Ads Library Scraper on a schedule?** Yes - with Apify Schedules; each run returns fresh rows.

**Can I call it from Python, JavaScript or an AI agent?** Yes - through the Apify API, the Apify client libraries or the Apify MCP server.

**Is it legal?** It collects only data anyone can see without logging in. You are responsible for using it within the source site's terms and data protection law (GDPR, CCPA).

**What if the site blocks a request?** The run retries from a fresh connection and, if it still cannot read the page, stops with a clear message - never with made-up rows.

Data source: [www.facebook.com/ads/library](https://www.facebook.com/ads/library/)

### More tools from this developer

- [Tweet Details by URL: Likes, Replies, Media - No Login](https://apify.com/h1018y/anvil-twitter-p16819-reliable)
- [YouTube Thumbnail Bulk Export with Title, Channel & Sizes](https://apify.com/h1018y/anvil-idea-15-reliable-v2)
- [ML Conference Alternatives: NeurIPS, ICLR, ICML by Topic](https://apify.com/h1018y/anvil-idea-533-reliable)
- [YouTube Transcript Search: Every Moment a Word Is Said](https://apify.com/h1018y/anvil-youtube-p45505-reliable-r10121932)
- [Reddit Keyword Alerts: New Posts Mentioning Your Brand](https://apify.com/h1018y/anvil-reddit-all)
- [X Account Watcher: New Posts Without Login or Cookies](https://apify.com/h1018y/anvil-x-account-watcher)

# Actor input Schema

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

What you'd type into the Meta Ad Library search - a brand, a competitor, a product.

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

Two-letter code where the ads ran (US, GB, DE ...), or ALL.

## `activeOnly` (type: `boolean`):

Turn off to include ads that already stopped.

## `adsPerSearch` (type: `integer`):

About 30 load at once; more are loaded by scrolling.

## `onlyNew` (type: `boolean`):

Turn on for daily alerts. The first run is the baseline.

## `maxItems` (type: `integer`):

Stop after this many rows.

## `useApifyProxy` (type: `boolean`):

Recommended.

## `proxyGroups` (type: `array`):

Optional, e.g. RESIDENTIAL.

## Actor input object example

```json
{
  "searchTerms": [
    "nike"
  ],
  "country": "US",
  "activeOnly": true,
  "adsPerSearch": 50,
  "onlyNew": false,
  "maxItems": 500,
  "useApifyProxy": true
}
```

# Actor output Schema

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

All result rows (open as table, JSON, CSV or Excel).

# 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": [
        "nike"
    ],
    "country": "US",
    "activeOnly": true,
    "adsPerSearch": 50,
    "onlyNew": false,
    "maxItems": 500,
    "useApifyProxy": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("h1018y/anvil-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 = {
    "searchTerms": ["nike"],
    "country": "US",
    "activeOnly": True,
    "adsPerSearch": 50,
    "onlyNew": False,
    "maxItems": 500,
    "useApifyProxy": True,
}

# Run the Actor and wait for it to finish
run = client.actor("h1018y/anvil-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 '{
  "searchTerms": [
    "nike"
  ],
  "country": "US",
  "activeOnly": true,
  "adsPerSearch": 50,
  "onlyNew": false,
  "maxItems": 500,
  "useApifyProxy": true
}' |
apify call h1018y/anvil-facebook-ads-library-scraper --silent --output-dataset

```

## MCP server setup

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