# Facebook Ads Scraper - $0.2 per 1000 (`supreme_scraper/facebook-ads-scraper`) Actor

Scrape facebook ads for dirt cheap. $0.2 per 1000 ads. Actively maintained. 99% Uptime

- **URL**: https://apify.com/supreme\_scraper/facebook-ads-scraper.md
- **Developed by:** [Supreme Scraper](https://apify.com/supreme_scraper) (community)
- **Categories:** Social media, AI, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.20 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

Collect structured ad records from the [Meta Ad Library](https://www.facebook.com/ads/library) — keyword searches, competitor page feeds, or individual ad URLs. Export creatives, spend estimates, platform targeting, and optional EU transparency data without building your own scraper.

### Why use this scraper?

The Meta Ad Library is the official source for ads running on Facebook, Instagram, Messenger, and the Audience Network. Browsing it manually does not scale when you need hundreds of ads across multiple brands or search queries.

This actor accepts **Ad Library search URLs**, **Facebook Page URLs**, and **direct ad links** in a single input list. Filters you set in the browser (country, keyword, ad type, media type) are preserved from search URLs. For page URLs, you control date range, active status, country, and sort order from the actor input.

**Best for:** competitive intelligence, creative research, political/advocacy monitoring, agency reporting, and scheduled tracking of competitor ad activity.

### Quick start — Ad Library search

1. Open [Meta Ad Library](https://www.facebook.com/ads/library/) and run your search (keyword, advertiser, country, ad status, etc.).
2. Copy the **full URL** from the address bar.
3. Paste it into the **URLs** input field.
4. Set **Total number of records required** (minimum 10) or leave limits blank to collect everything the search returns.
5. Optionally enable **Scrape ad details** for EU reach and extended transparency fields.
6. Run the actor and export the dataset as JSON, CSV, or Excel.

Search filters live in the URL. Any option you pick on the Ad Library page — `q`, `country`, `active_status`, `ad_type`, `media_type`, and others — is applied automatically.

### Quick start — Ads from Facebook Pages

1. Collect one or more public Facebook Page URLs (e.g. `https://www.facebook.com/ZapierApp`).
2. Add them to the **URLs** input (use **Bulk edit** for long lists).
3. Configure **Search filters for page URLs**:
   - **Date range** — all time, last 24 hours, 7/14/30 days
   - **Filter ads by active status** — all, active, or inactive
   - **Sort ads by** — impressions (high to low) or most recent
   - **Filter ads by country** — 2-letter ISO code (`US`, `IN`, …) or `ALL`
4. Set **Limit per input URL** if you only need a subset from each page.
5. Run the actor.

You can mix Ad Library search URLs and Page URLs in the same run.

### Input options

| Input | Description |
|-------|-------------|
| **URLs** | Ad Library search URLs, Facebook Page URLs, or direct ad URLs (`/ads/library/?id=…`). |
| **Scrape ad details** | Fetches extended transparency data (e.g. EU reach). Adds extra requests and increases run time and memory use. |
| **Limit per input URL** | Cap ads collected per URL. Actual count may exceed the limit by up to ~30 due to pagination batching. |
| **Total number of records required** | Global cap across all URLs. Minimum value: 10. Leave empty when using per-URL limits only. |
| **Date range** | Applies only to Page URL inputs. |
| **Filter ads by active status** | Applies only to Page URL inputs. |
| **Sort ads by** | Applies only to Page URL inputs. |
| **Filter ads by country** | Applies only to Page URL inputs. |
| **Custom proxy** | Optional Apify proxy country override. Residential proxies are used by default. |

**Memory tip:** Provide at least **one input URL per 512 MB** of actor memory. Example: 4 URLs need 2 GB RAM minimum. Enabling **Scrape ad details** requires substantially more memory per URL.

### Output fields

Each dataset record represents one ad. Fields depend on what Meta exposes for that ad type and region.

**Identifiers & status**

- `ad_archive_id`, `ad_library_url`, `collation_id`, `collation_count`
- `is_active`, `is_profile_page`, `entity_type`, `archive_types`, `categories`

**Advertiser**

- `page_id`, `page_name`, `advertiser`, `state_media_run_label`

**Timing & spend**

- `start_date`, `end_date`, `start_date_formatted`, `end_date_formatted`
- `currency`, `spend`, `reach_estimate`, `impressions_with_index`

**Delivery**

- `publisher_platform`, `political_countries`, `gated_type`
- `is_aaa_eligible`, `aaa_info` (when details are scraped)

**Creative snapshot** (`snapshot` object)

- Ad copy, headlines, captions, CTA text and type
- Image and video assets, display format, link URL
- Page profile picture, categories, Instagram actor details
- Body HTML and link description

**Run metadata**

- `url` — input URL that surfaced this ad
- `position` — result index within the source
- `ads_count` — collated ads in the same group
- `runTag` — optional run label from input

**Extended transparency** (when **Scrape ad details** is enabled)

- EU transparency fields merged into `aaa_info`
- Additional reach and demographic breakdowns where available

### Example output

```json
{
  "ad_archive_id": "1234567890123456",
  "ad_library_url": "https://www.facebook.com/ads/library/?id=1234567890123456",
  "page_id": "1234567890",
  "page_name": "Example Brand",
  "is_active": true,
  "start_date": 1717200000,
  "end_date": 0,
  "start_date_formatted": "2024-06-01 00:00:00",
  "end_date_formatted": "1970-01-01 00:00:00",
  "publisher_platform": ["facebook", "instagram"],
  "currency": "USD",
  "spend": {"lower_bound": 100, "upper_bound": 499},
  "reach_estimate": {"lower_bound": 10000, "upper_bound": 49999},
  "snapshot": {
    "title": "Try it free today",
    "body": {"markup": {"__html": "<p>Automate your workflow in minutes.</p>"}},
    "cta_text": "Learn More",
    "display_format": "IMAGE",
    "images": [{"original_image_url": "https://..."}],
    "link_url": "https://example.com"
  },
  "url": "https://www.facebook.com/ads/library/?active_status=all&country=US&q=example",
  "position": 1
}
```

### Scraping individual ads

Paste a direct Ad Library URL that includes an ad ID:

```
https://www.facebook.com/ads/library/?id=1234567890123456
```

These are processed separately from search and page feeds — useful when you already know the ad you need.

### Monitoring competitor ads on a schedule

1. Add competitor Page URLs to the **URLs** input.
2. Set **Date range** to **Last 7 days** (or your preferred window).
3. Set **Filter ads by active status** to **Active**.
4. Schedule the actor to run weekly or daily.

Each run returns only ads that match the configured window and status filters.

### API access

Results land in an Apify dataset. Pull them programmatically via the [Apify API](https://docs.apify.com/api/v2) or export from the run's **Storage** tab. Use dataset endpoints to feed BI tools, spreadsheets, or alerting pipelines.

### Pricing

Usage is billed through Apify platform credits based on compute and data volume. Historical runs average roughly **$0.20 per 1,000 ads** scraped; actual cost varies with memory, **Scrape ad details**, and proxy usage.

### Legal note

This actor reads only **publicly available** Ad Library data — the same information Meta publishes for transparency. It does not access private accounts or non-public user data.

Your results may still contain personal or sensitive information depending on the ads you target. You are responsible for complying with applicable laws (including GDPR where relevant) and Meta's terms of service. Consult legal counsel if you are unsure whether your use case is permitted.

### Related tools

- [Contact Info Finder](https://apify.com/supreme_coder/contact-info-finder) — find verified contact details for advertisers you discover through ad research.

### Integrations

Connect this actor to other platforms with [Make](https://www.make.com/en/register?pc=growthhack) or any workflow tool that supports Apify webhooks and dataset APIs.

***

*Last updated: 2026-07-11*

*Keywords: meta ad library scraper, facebook ads scraper, competitor ad tracking, ad transparency data, instagram ads scraper*

# Actor input Schema

## `urls` (type: `array`):

List of facebook ads search URLs or Page URLs to scrape ads from

## `scrapeAdDetails` (type: `boolean`):

Enable this option to scrape ads details such as EU Reach info

## `limitPerSource` (type: `integer`):

Limit number of ads scraped per input URL. Leave it blank to scrape all available ads
ℹ️ Actual number might exceed the given limit by upto 30

## `count` (type: `integer`):

Leave this field empty if you want to limit number of ads scraped

## `scrapePageAds.period` (type: `string`):

Search ads in given date range

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

No description

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

Sort by impressions or date. Default: Impressions

## `scrapePageAds.countryCode` (type: `string`):

2-letter ISO country code (ISO 3166-1 alpha-2). This should be the official uppercase country code, such as `IN` for India, `US` for United States, etc. Use `ALL` for targeting all countries

## `proxy` (type: `object`):

You can use this option to customise the proxy country

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=IN&q=linkedin&search_type=keyword_unordered&media_type=all"
    },
    {
      "url": "https://www.facebook.com/ZapierApp"
    }
  ],
  "count": 100,
  "scrapePageAds.period": "",
  "scrapePageAds.activeStatus": "all",
  "scrapePageAds.sortBy": "impressions_desc",
  "scrapePageAds.countryCode": "ALL"
}
```

# 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 = {
    "urls": [
        {
            "url": "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=IN&q=linkedin&search_type=keyword_unordered&media_type=all"
        },
        {
            "url": "https://www.facebook.com/ZapierApp"
        }
    ],
    "count": 100,
    "scrapePageAds.period": "",
    "scrapePageAds.activeStatus": "all",
    "scrapePageAds.sortBy": "impressions_desc",
    "scrapePageAds.countryCode": "ALL"
};

// Run the Actor and wait for it to finish
const run = await client.actor("supreme_scraper/facebook-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 = {
    "urls": [
        { "url": "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=IN&q=linkedin&search_type=keyword_unordered&media_type=all" },
        { "url": "https://www.facebook.com/ZapierApp" },
    ],
    "count": 100,
    "scrapePageAds.period": "",
    "scrapePageAds.activeStatus": "all",
    "scrapePageAds.sortBy": "impressions_desc",
    "scrapePageAds.countryCode": "ALL",
}

# Run the Actor and wait for it to finish
run = client.actor("supreme_scraper/facebook-ads-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    {
      "url": "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=IN&q=linkedin&search_type=keyword_unordered&media_type=all"
    },
    {
      "url": "https://www.facebook.com/ZapierApp"
    }
  ],
  "count": 100,
  "scrapePageAds.period": "",
  "scrapePageAds.activeStatus": "all",
  "scrapePageAds.sortBy": "impressions_desc",
  "scrapePageAds.countryCode": "ALL"
}' |
apify call supreme_scraper/facebook-ads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=supreme_scraper/facebook-ads-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/9TtN65H5H5IjelPZM/builds/8SA1QQd8WcSaeRO9v/openapi.json
