# Facebook & Google Ads Library Scraper (`capable_cauldron/ad-intelligence-scraper`) Actor

Scrape competitor ads from the Facebook Ad Library (Facebook + Instagram) and Google Ads Transparency Center in one run. Get ad copy, creatives, video URLs, CTAs, landing pages and running dates in one normalized schema across platforms. No login or API keys needed.

- **URL**: https://apify.com/capable\_cauldron/ad-intelligence-scraper.md
- **Developed by:** [Capable Cauldron](https://apify.com/capable_cauldron) (community)
- **Categories:** Automation, Developer tools, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 ad scrapeds

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

## Facebook & Google Ads Library Scraper

Scrape competitor ads from the **Facebook Ad Library** (Facebook + Instagram)
and **Google Ads Transparency Center** in a single run — and get them back in
**one normalized schema**, so you never have to reconcile field names between
platforms. No login, cookies, or API keys required.

### What you get

- **Ad copy & headlines** — the actual text competitors are running
- **Creatives** — direct image and video URLs (HD where available)
- **CTAs and landing pages** — what they ask for and where they send traffic
- **Running dates & longevity** — how long an ad has been live, a strong
  signal for which creatives are winning
- **Advertiser profiles** — page/advertiser IDs, follower counts, verification

Every ad comes back with the same field names whether it came from Facebook,
Instagram, or Google — so your sheet, dashboard, or AI pipeline needs no
per-platform branching.

### Use cases

- **Competitor ad monitoring** — track what rival brands are running right now
- **Creative research** — find long-running ads (proven performers) before
  briefing your own creative
- **Market & category research** — scan a keyword to see every advertiser
  bidding on it
- **Agency reporting** — one dataset covering a client's whole competitive set

### Input

| Field | Description |
|---|---|
| `queries` | Brand names or keywords to search (required) |
| `platforms` | `meta`, `google`, or both |
| `country` | ISO-2 code such as `US`, `GB`, `IN` — or `ALL` for worldwide |
| `maxAdsPerQuery` | Ads to fetch per query, per platform |
| `activeStatus` | Currently running ads, inactive ones, or both |
| `proxyConfiguration` | Residential proxy recommended (see below) |

```json
{
  "queries": ["nike", "adidas"],
  "platforms": ["meta", "google"],
  "country": "US",
  "maxAdsPerQuery": 50,
  "activeStatus": "ACTIVE",
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

> **Proxy tip:** Facebook throttles datacenter IPs, so keep the residential
> proxy option enabled for Meta results. Google works from any IP.

### Output

One item per ad, identical fields across platforms:

```json
{
  "platform": "meta",
  "adId": "1702938977100376",
  "advertiserId": "15087023444",
  "advertiserName": "Nike",
  "format": "carousel",
  "headline": "Just Do It",
  "body": "Ad copy…",
  "ctaText": "Shop Now",
  "landingUrls": ["https://nike.com/…"],
  "imageUrls": ["https://scontent…"],
  "videoUrls": [],
  "thumbnailUrl": "https://scontent…",
  "isActive": true,
  "firstShownDate": null,
  "lastShownDate": null,
  "daysActive": null,
  "libraryUrl": "https://www.facebook.com/ads/library/?id=1702938977100376",
  "query": "nike",
  "scrapedAt": "2026-08-05T12:00:00+00:00"
}
```

Some fields are only available on some platforms — Facebook provides ad copy,
CTAs and video; Google provides first/last shown dates and days active.
Unavailable fields come back `null` rather than renamed, so your schema stays
stable. Export as JSON, CSV, or Excel, or pull it through the Apify API.

### Pricing

Pay-per-event: you pay per ad returned, plus a small fee per search. No
subscription. See the Pricing tab for current rates and volume discounts.

### FAQ

**Do I need a Facebook account or API access?**
No. Both ad libraries are public; the Actor needs no login or API key.

**Which countries are supported?**
Any country the ad libraries cover — pass an ISO-2 code, or `ALL` for worldwide.

**Can I get ads for one specific brand?**
Yes — search the brand name; the Actor also returns matching advertiser
profiles so you can confirm you have the right page.

**Is scraping ad libraries legal?**
These libraries are published as public ad transparency tools. As with any
scraping, you are responsible for how you use the data — review the platforms'
terms and your local regulations.

**More platforms coming?**
Yes. LinkedIn and TikTok ad libraries are planned, and they will return the
same normalized schema — existing integrations keep working unchanged.

# Actor input Schema

## `queries` (type: `array`):

Advertiser names or keywords to search for (e.g. a competitor brand). Each query is searched on every selected platform.

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

Which ad libraries to search. Results from all platforms share one normalized schema.

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

ISO-2 country code to filter ads by (e.g. US, GB, IN), or ALL for worldwide.

## `maxAdsPerQuery` (type: `integer`):

Upper limit of ads fetched for each query on each platform.

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

Filter by whether ads are currently running. Applies to Meta; Google Transparency only lists recent/active creatives.

## `includeRawData` (type: `boolean`):

Attach the unprocessed platform response for each ad under the `raw` field. Increases dataset size.

## `metaOptions` (type: `object`):

Optional overrides for the Meta adapter, e.g. {"publisherPlatforms": \["instagram"], "mediaType": "VIDEO"}.

## `googleOptions` (type: `object`):

Optional overrides for the Google adapter (reserved for future use).

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

Proxy to route scraping traffic through. Residential is required for reliable Meta results.

## Actor input object example

```json
{
  "queries": [
    "nike"
  ],
  "platforms": [
    "meta",
    "google"
  ],
  "country": "ALL",
  "maxAdsPerQuery": 50,
  "activeStatus": "ACTIVE",
  "includeRawData": false,
  "metaOptions": {},
  "googleOptions": {},
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One item per ad with identical fields across platforms: adId, advertiserName, format, headline, body, ctaText, imageUrls, videoUrls, landingUrls, firstShownDate, lastShownDate, daysActive, libraryUrl.

## `runSummary` (type: `string`):

Per-platform counts, advertiser profiles found for each query, and any per-query errors.

# 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 = {
    "queries": [
        "nike"
    ],
    "platforms": [
        "meta",
        "google"
    ],
    "country": "ALL",
    "metaOptions": {},
    "googleOptions": {},
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("capable_cauldron/ad-intelligence-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 = {
    "queries": ["nike"],
    "platforms": [
        "meta",
        "google",
    ],
    "country": "ALL",
    "metaOptions": {},
    "googleOptions": {},
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("capable_cauldron/ad-intelligence-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 '{
  "queries": [
    "nike"
  ],
  "platforms": [
    "meta",
    "google"
  ],
  "country": "ALL",
  "metaOptions": {},
  "googleOptions": {},
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call capable_cauldron/ad-intelligence-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/eBzn93t4gfKc1iuZf/builds/BSNtQ4jRN8nffIpPo/openapi.json
