# Facebook Page Ads Scraper (`piotrv1001/facebook-page-ads-scraper`) Actor

Get every ad a Facebook page runs from the Meta Ad Library: ad text, headline, CTA, landing URL, images, videos, carousel cards, dates, platforms and status. Paste page URLs, page IDs or Ad Library links; filter by country and status. Track competitor ads in bulk.

- **URL**: https://apify.com/piotrv1001/facebook-page-ads-scraper.md
- **Developed by:** [FalconScrape](https://apify.com/piotrv1001) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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.

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 Page Ads Scraper

Get **every ad a Facebook page runs**, straight from the Meta Ad Library. The **Facebook Page Ads Scraper** takes page URLs, page IDs or Ad Library page links and returns each ad with its text, headline, call to action, landing page URL, images, videos, carousel cards, start and end dates, platforms (Facebook, Instagram, Messenger, Audience Network, Threads) and active status. Political and issue ads add spend, impressions and reach ranges. Use it to track competitor advertising, collect creatives for inspiration, or monitor brands and campaigns over time.

### ✨ Features

- 📄 **Any Page Input**: `facebook.com/nike`, `profile.php?id=…` links, numeric page IDs, or Ad Library page links (`…/ads/library/?view_all_page_id=…`).
- 📚 **Many Pages per Run**: Bulk competitor lists in one run.
- 🌍 **Any Country**: A 2-letter country code (US, GB, DE…) or ALL (default).
- 🟢 **Active or Ended Ads**: Active only, inactive only, or both.
- 🎬 **Full Creatives**: Image URLs, HD and SD video URLs with preview images, and every carousel card.
- 💵 **Spend and Reach**: Where the Ad Library publishes them (political and issue ads).
- 🧹 **No Duplicates**: The same page listed twice is saved and charged once.

### 🛠️ How It Works

1. **Paste Facebook page URLs or page IDs**, one per line.
2. **Pick the country, ad status and how many ads you want** – the default is 50.
3. **Run the Scraper** – download the results as JSON, CSV or Excel or pull them through the API.

### ⚙️ Input

| Field              | What it does                                                                                     |
| ------------------ | ------------------------------------------------------------------------------------------------ |
| **Facebook pages** | Page URLs, page IDs or Ad Library page links, one per line. Default `https://www.facebook.com/nike`. |
| **Country**        | 2-letter country code or `ALL`. Default `ALL`.                                                   |
| **Ad status**      | `active`, `inactive` or `all`. Default `active`.                                                 |
| **Max ads**        | Stop after this many ads in total (all pages together). Default 50.                              |

```json
{
    "pages": ["https://www.facebook.com/nike", "https://www.facebook.com/adidas", "40796308305"],
    "country": "US",
    "activeStatus": "all",
    "maxItems": 1000
}
```

An Ad Library page link keeps its own filters (country, status, media type). Pages that do not exist or are not public are skipped and not charged.

### 💰 Pricing

Pay only for the ads you get. No monthly rental.

| Event           | Price                            | What you get                              |
| --------------- | -------------------------------- | ----------------------------------------- |
| **Ad**          | $0.001 per ad ($1 per 1,000)     | One ad with all the fields below          |
| **Actor start** | $0.00005 per run                 | Charged once when the run starts.         |

Examples: 50 ads = $0.05 · 1,000 ads = $1.00 · 10,000 ads = $10.00.

### 📊 Sample Output Data

```json
{
    "adArchiveId": "1702938977100376",
    "adId": null,
    "pageId": "15087023444",
    "pageName": "Nike",
    "pageUrl": "https://www.facebook.com/nike/",
    "pageProfilePicture": "https://scontent-atl3-2.xx.fbcdn.net/v/t39.35426-6/431756959_..._n.jpg",
    "pageLikeCount": 39500732,
    "pageCategories": ["Sportswear", "Product/service"],
    "isActive": true,
    "startDate": "2025-04-07T07:00:00.000Z",
    "endDate": null,
    "publisherPlatforms": ["FACEBOOK", "INSTAGRAM", "AUDIENCE_NETWORK", "MESSENGER"],
    "displayFormat": "DPA",
    "body": "Bring sports more fully into your day with the Nike App.",
    "title": "{{product.name}}",
    "caption": "itunes.apple.com",
    "linkUrl": "http://itunes.apple.com/app/id1095459556",
    "linkDescription": null,
    "ctaText": "Install now",
    "ctaType": "INSTALL_MOBILE_APP",
    "images": [],
    "videos": [],
    "cards": [
        {
            "title": "Nike ACG Polartec ® 'Wolf Tree' Women's Mid-Rise Trousers",
            "body": "Bring sports more fully into your day with the Nike App.",
            "caption": "itunes.apple.com",
            "linkUrl": "https://www.nike.com/ph/t/acg-polartec-wolf-tree-mid-rise-trousers-mVbQBn/CV0615-060",
            "linkDescription": "₱3,599",
            "ctaText": "Install Now",
            "ctaType": "INSTALL_MOBILE_APP",
            "imageUrl": "https://scontent-atl3-2.xx.fbcdn.net/v/t39.35426-6/431748186_..._n.jpg",
            "videoHdUrl": null,
            "videoSdUrl": null,
            "videoPreviewImageUrl": null
        }
    ],
    "collationId": null,
    "collationCount": null,
    "categories": [],
    "byline": null,
    "spend": null,
    "impressions": null,
    "reachEstimate": null,
    "currency": null,
    "targetedOrReachedCountries": [],
    "containsSensitiveContent": false,
    "adLibraryUrl": "https://www.facebook.com/ads/library/?id=1702938977100376",
    "input": "https://www.facebook.com/nike",
    "scrapedAt": "2026-10-18T10:34:11.349Z"
}
```

- `endDate` is empty while the ad is still running.
- Catalog ads (`displayFormat` `DPA` / `DCO`) can keep template text such as `{{product.name}}` in `title`; the real products are in `cards`.
- `input` = the page you listed that found the ad.

### ❓ FAQ

**Do I need a Facebook account or an access token?** No.

**A big brand returns only a few ads. Why?** Global brands often advertise from country pages (for example "Nike Football" or "Coca-Cola UK"). Add those pages, or search the brand name with the [Facebook Ads Library Scraper](https://apify.com/piotrv1001/facebook-ads-library-scraper).

**Why are spend and impressions empty for most ads?** The Ad Library publishes them only for issue, election and political ads.

### 🔗 More Facebook Actors

- [Facebook Ads Library Scraper](https://apify.com/piotrv1001/facebook-ads-library-scraper): search all ads by keyword, country and filters.
- [Facebook Pages Scraper](https://apify.com/piotrv1001/facebook-pages-scraper): page profiles, contact details and posts.

# Actor input Schema

## `pages` (type: `array`):

Facebook page URLs (facebook.com/nike), page IDs, or Ad Library page links (…/ads/library/?view_all_page_id=…), one per line.

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

Where the ads ran: a 2-letter country code (US, GB, DE, BR…) or ALL for every country.

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

Active ads only, inactive (ended) ads only, or both.

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

Stop after this many ads in total (all searches together).

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

Keep the default for reliable results.

## Actor input object example

```json
{
  "pages": [
    "https://www.facebook.com/nike"
  ],
  "country": "ALL",
  "activeStatus": "active",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "pages": [
        "https://www.facebook.com/nike"
    ],
    "country": "ALL",
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/facebook-page-ads-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 = {
    "pages": ["https://www.facebook.com/nike"],
    "country": "ALL",
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("piotrv1001/facebook-page-ads-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 '{
  "pages": [
    "https://www.facebook.com/nike"
  ],
  "country": "ALL",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call piotrv1001/facebook-page-ads-scraper --silent --output-dataset

```

## MCP server setup

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