# Facebook Ad Scraper with AI Analysis (`webdatalabs/facebook-ad-intelligence-pro`) Actor

The only Facebook Ad Library scraper with built-in GPT-4 AI analysis. Scrape competitor ads and instantly get effectiveness scores, emotional triggers, copywriting techniques, winning ad predictions, and spend estimates — all in one run.

- **URL**: https://apify.com/webdatalabs/facebook-ad-intelligence-pro.md
- **Developed by:** [WebDataLabs](https://apify.com/webdatalabs) (community)
- **Categories:** AI, Social media, Developer tools
- **Stats:** 20 total users, 2 monthly users, 94.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## 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 Ad Intelligence - AI-Powered Ad Copy Analysis & Winning Ad Predictor

**The only Facebook Ad Library scraper with built-in GPT-4 AI analysis.** Scrape competitor ads and instantly get effectiveness scores, emotional triggers, copywriting techniques, winning ad predictions, and spend estimates — all in one run.

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-0084FF?logo=apify)](https://apify.com/webdatalabs/facebook-ad-intelligence-pro)
[![AI Powered](https://img.shields.io/badge/AI-GPT--4o--mini-10a37f?logo=openai)](https://openai.com)
[![Maintained](https://img.shields.io/badge/Maintained-Yes-success)](https://github.com/webdatalabs)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

### What you get

| Feature | Ad Intelligence Pro | Standard FB Ad Scrapers | SpyFu / AdSpy |
|---------|-------------------|----------------------|----------------|
| **AI Analysis** | GPT-4 effectiveness scores, emotions, techniques | None | Basic metrics |
| **Winning Ad Prediction** | Data-driven composite score (1-10) | None | Manual review |
| **Copywriting Insights** | Scarcity, FOMO, social proof detection | None | None |
| **Target Audience** | AI-inferred audience per ad | None | Limited |
| **Recommendations** | 2-3 actionable suggestions per ad | None | Generic tips |
| **Spend Estimation** | Based on duration + platforms + activity | EU data only | Rough estimates |
| **Pricing** | ~$0.02/ad (see Apify Console) | Varies | $300-500/month |
| **Change Tracking** | Built-in across scheduled runs | None | Basic |

### Key Features

- **AI-Powered Analysis** - Every ad analyzed by GPT-4o-mini for copy quality, emotional triggers, and copywriting techniques
- **Winning Ad Score** - Composite prediction (1-10) based on copy quality, run duration, platform spread, and CTA effectiveness
- **Target Audience Inference** - AI identifies who each ad is designed to reach (demographics, interests, pain points)
- **Actionable Recommendations** - 2-3 specific improvement suggestions per ad (not generic tips)
- **Spend Estimation** - Estimated monthly spend based on run duration, platform distribution, and active status
- **Change Tracking** - State management across runs detects new ads and content changes
- **Predictable Pricing** - Transparent pay-per-ad-analyzed model (see current pricing in the Apify Console when starting a run)

### Use Cases

#### Competitive Research

```json
{
  "searchQuery": "CRM software",
  "country": "US",
  "maxAds": 100,
  "activeStatus": "active"
}
```

**Result:** 100 competitor ads with effectiveness scores, copywriting techniques, and estimated spend. Filter by `winningAdScore >= 8` to study proven winners.

#### Ad Copy Optimization

```json
{
  "searchQuery": "fitness app",
  "country": "US",
  "maxAds": 50
}
```

**Result:** See what emotional triggers (urgency, trust, FOMO) and techniques (social proof, scarcity) top advertisers use. Get AI recommendations to improve your own copy.

#### Market Intelligence

```json
{
  "searchQuery": "real estate investing",
  "country": "US",
  "maxAds": 200,
  "activeStatus": "all"
}
```

**Result:** Analyze active and inactive ads to understand what works vs. what doesn't. Track estimated monthly spend across competitors.

#### Creative Inspiration

```json
{
  "searchQuery": "SaaS",
  "country": "DE",
  "maxAds": 100
}
```

**Result:** Discover winning ad patterns in the German market. AI analysis works natively in all major languages.

### Input Configuration

#### Quick Start (Default Settings)

Just click "Start" to test with default configuration:

```json
{
  "searchQuery": "fitness app",
  "country": "US",
  "maxAds": 50
}
```

#### Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `searchQuery` | string | *required* | Keywords to search in Facebook Ad Library |
| `country` | string | `US` | ISO country code (US, DE, GB, FR, etc.) |
| `activeStatus` | enum | `active` | Filter: `active`, `inactive`, or `all` |
| `maxAds` | integer | `50` | Ads to analyze (10-500). Each costs ~$0.02 |
| `useProxies` | boolean | `true` | Use residential proxies (required for Facebook) |

### Output Schema

Each ad includes **35+ fields** across raw ad data and AI analysis:

```json
{
  "id": "9b0c3993-bc90-494b-9d49-603ecb0ce93c",
  "adArchiveId": "1201641282099182",
  "pageName": "Appediet",
  "pageUrl": "https://www.facebook.com/61560658213543/",
  "pageCategory": "App Page",
  "pageLikeCount": 938,
  "isActive": true,

  "startDate": "2026-01-07T08:00:00.000Z",
  "runDurationDays": 35,
  "platforms": ["FACEBOOK", "INSTAGRAM", "AUDIENCE_NETWORK", "MESSENGER", "THREADS"],
  "platformCount": 5,

  "adCopy": "Hit your fitness goals with Appediet - the revolutionary app using AI to track your meals and calories!...",
  "headline": "Revolutionize Your Health Journey!",
  "ctaType": "USE_APP",
  "ctaText": "Use app",
  "landingUrl": "http://play.google.com/store/apps/details?id=com.appediet.appediet",
  "displayFormat": "VIDEO",

  "effectivenessScore": 9,
  "emotionalTones": ["urgency", "excitement"],
  "copywritingTechniques": ["scarcity", "benefit_focused"],
  "targetAudience": "Health-conscious individuals aged 18-40 looking to track their nutrition and fitness goals.",
  "keySellingPoints": ["Free AI food scanner", "96% high scan accuracy", "24/7 exclusive health assistant"],
  "ctaEffectivenessScore": 8,
  "winningAdScore": 8.5,
  "recommendations": [
    "Highlight specific user testimonials for credibility",
    "Emphasize the urgency of the limited new user gift"
  ],
  "estimatedMonthlySpend": "Medium ($500-2K)",
  "aiAnalyzed": true,

  "firstSeenAt": "2026-02-11T13:46:26.801Z",
  "lastSeenAt": "2026-02-11T13:46:01.172Z",
  "changeDetected": false,
  "scrapedAt": "2026-02-11T13:46:01.172Z"
}
```

#### AI Analysis Fields

| Field | Type | Description |
|-------|------|-------------|
| `effectivenessScore` | 1-10 | Overall ad copy quality. 8-10 exceptional, 5-7 good, 1-4 poor |
| `emotionalTones` | array | Primary emotions: urgency, trust, excitement, fear, curiosity, aspiration, FOMO, etc. |
| `copywritingTechniques` | array | Techniques: scarcity, social\_proof, authority, storytelling, pain\_point, FOMO, etc. |
| `targetAudience` | string | AI-inferred target audience with demographics and interests |
| `keySellingPoints` | array | Core value propositions extracted from the ad copy |
| `ctaEffectivenessScore` | 1-10 | CTA quality: clarity, urgency, action-orientation |
| `winningAdScore` | 1-10 | Composite: copy quality (40%) + run duration (30%) + platforms (20%) + CTA (10%) |
| `recommendations` | array | 2-3 specific, actionable improvement suggestions |
| `estimatedMonthlySpend` | string | Low ($100-500), Medium ($500-2K), High ($2K-10K), Very High ($10K+) |

### Dataset Views in Apify Console

The actor provides **4 optimized views**:

1. **AI Analysis Overview** - Key metrics: advertiser, ad copy, scores, techniques, and spend estimates
2. **Winning Ads** - Top-performing ads sorted by winning score with run duration and platform data
3. **Recommendations** - AI improvement suggestions with target audience and selling points
4. **Full Details** - Complete dataset with all 35+ fields for advanced analysis

### How the Winning Ad Score Works

The Winning Ad Score (1-10) predicts ad performance using a weighted formula:

| Factor | Weight | Logic |
|--------|--------|-------|
| **Copy Quality** | 40% | GPT-4 effectiveness score — strong copy is the #1 driver |
| **Run Duration** | 30% | Ads running 90+ days = proven performers (advertisers kill bad ads fast) |
| **Platform Spread** | 20% | 4+ platforms = larger budget, validated across audiences |
| **CTA Quality** | 10% | Clear, urgent CTAs drive higher conversion |

**Example scores:**

- **Score 9.2** — Exceptional copy (9/10), running 90+ days active, 4 platforms, strong CTA
- **Score 6.8** — Good copy (7/10), running 45 days, 2 platforms, decent CTA
- **Score 3.4** — Weak copy (4/10), running 7 days, 1 platform, no CTA

### Change Tracking & Incremental Scraping

Facebook Ad Intelligence Pro tracks ads across scheduled runs:

- **No duplicate processing** — Already-seen ads are tracked via content hash
- **Change detection** — Detects when ad copy, CTA, or landing URL changes
- **First seen / Last seen** — Track when ads appear and how long they run
- **50K ad capacity** — Tracks up to 50,000 ads across runs (auto-trims oldest)

**How it works:**

1. First run: Scrapes 100 ads → AI analyzes all → Saves state
2. Second run: Scrapes 100 ads → Detects 70 already seen → Flags 5 changed → Processes 30 new
3. State persists indefinitely across all runs

### Integration Examples

#### n8n Workflow — Competitor Intelligence Dashboard

```
Schedule (weekly, Monday 9am)
  ↓
Apify: Run Ad Intelligence Pro (query: "CRM software", maxAds: 200)
  ↓
Filter: winningAdScore >= 7
  ↓
Airtable: Add to "Top Competitor Ads" table
  ↓
Slack: Post top 10 winning ads with scores and recommendations
```

#### Zapier Workflow — Ad Copy Alert

```
1. Schedule: Daily at 8am
2. Run Apify Actor (Ad Intelligence Pro)
3. Filter: effectivenessScore >= 8 AND changeDetected = true
4. Google Sheets: Update competitor tracking sheet
5. Email: Send alert with winning ad copy and AI recommendations
```

#### Apify API (cURL)

```bash
curl -X POST https://api.apify.com/v2/acts/webdatalabs~facebook-ad-intelligence-pro/runs \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchQuery": "fitness app",
    "country": "US",
    "maxAds": 50
  }'
```

#### Apify JavaScript Client

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('webdatalabs/facebook-ad-intelligence-pro').call({
  searchQuery: 'fitness app',
  country: 'US',
  maxAds: 50,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Apify Python Client

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_API_TOKEN')

run = client.actor('webdatalabs/facebook-ad-intelligence-pro').call(
    run_input={
        'searchQuery': 'fitness app',
        'country': 'US',
        'maxAds': 50,
    }
)

items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### Pricing

**Pay-Per-Event Model:** Transparent pay-per-ad-analyzed pricing.

You only pay for ads successfully scraped and AI-analyzed. See current pricing in the Apify Console when starting a run.

| Ads Analyzed | Estimated Cost |
|-------------|---------------|
| 50 ads | ~$1.00 |
| 100 ads | ~$2.00 |
| 250 ads | ~$5.00 |
| 500 ads | ~$10.00 |

**Plus:** Apify platform costs:

- Compute time (minimal for standard runs)
- Residential proxy bandwidth (required for Facebook)

**Compare:** SpyFu costs $39-79/month, AdSpy costs $149/month. This actor gives you deeper AI insights at a fraction of the cost.

### Residential Proxies Required

Facebook **blocks datacenter IPs** aggressively. Residential proxies are required:

```json
{
  "useProxies": true
}
```

Residential proxies are billed separately by Apify (see current proxy pricing in Apify Console).

### FAQ

#### Is this legal?

Yes. Facebook Ad Library is a public transparency tool created by Meta for accountability. All data is publicly accessible without login. No authentication required.

#### How accurate is the AI analysis?

GPT-4o-mini excels at structured text analysis. We validated the model internally: effectiveness scores correlate with run duration (high-scoring ads tend to run longer, confirming that advertisers keep paying for good ads). Emotional tone and technique detection is reliable for most ad copy.

#### What languages are supported?

GPT-4o-mini handles all major languages natively — English, German, French, Spanish, Portuguese, Italian, Dutch, and more. The analysis adapts to the language of the ad copy.

#### Can I schedule regular runs?

Yes. Use Apify's built-in scheduler for daily/weekly monitoring. The actor tracks changes across runs, so you'll see which ads are new and which have changed. State persists indefinitely.

#### Why is maxAds capped at 500?

Each ad is analyzed with GPT-4 AI, which has a per-ad cost. We cap at 500 to keep runs affordable. For larger volumes, run multiple searches with different queries or schedule multiple runs.

#### What if the AI analysis fails for some ads?

The actor uses graceful degradation. If AI fails for a batch, those ads are still saved with all raw data — the `aiAnalyzed` field will be `false`. You never lose scraped data due to AI issues.

#### Can I use this with n8n or Zapier?

Yes! The output is flat JSON, perfect for automation tools. Use Apify's API integration with n8n, Zapier, Make, or any tool that supports webhooks or REST APIs.

#### What format is the output?

JSON by default. Export to CSV, Excel, HTML, or XML from the Apify Console. The output is flat (not deeply nested) for easy import to Google Sheets, databases, or automation tools.

#### Can I scrape individual advertisers?

Search for the advertiser name (e.g., "Nike") to get all their ads. The actor uses Facebook Ad Library's keyword search.

#### How does spend estimation work?

The AI estimates monthly spend based on three signals: (1) how long the ad has been running, (2) how many platforms it runs on, and (3) whether it's still active. Longer-running, multi-platform, active ads indicate higher spend. This is an estimate, not exact data.

### Recommended Scheduling

#### Competitive Monitoring

- **Frequency:** Weekly
- **Config:** `maxAds: 100`, `activeStatus: "active"`

#### Creative Research

- **Frequency:** Monthly
- **Config:** `maxAds: 200`, `activeStatus: "all"`

#### Industry Tracking

- **Frequency:** Bi-weekly
- **Config:** `maxAds: 100`, `activeStatus: "active"`

### Technical Details

#### Anti-Bot Protection

- **Non-headless browser** — Facebook blocks headless browsers aggressively
- **Residential proxies** — Required for reliable access
- **GraphQL interception** — Captures API responses directly (not DOM scraping)
- **Cookie consent handling** — Multi-language support (EN, DE, etc.)

#### AI Processing

- **Model:** GPT-4o-mini (OpenAI)
- **Batching:** 8 ads per API call for cost efficiency
- **Retry logic:** Exponential backoff with 3 attempts
- **Fallback:** Raw data preserved if AI fails (`aiAnalyzed: false`)

#### Performance

- **Scraping speed:** ~10 ads per scroll (5-10 seconds each)
- **AI analysis:** ~2 seconds per batch of 8 ads
- **Total:** 50 ads scraped + analyzed in ~2-3 minutes
- **Reliability:** GraphQL interception is resistant to UI changes

***

### Explore More of Our Actors

#### Marketing & Intelligence

| Actor | Description |
|-------|-------------|
| [Facebook Ad Library Scraper Pro](https://apify.com/webdatalabs/meta-ad-library-scraper) | Raw Facebook ad scraping without AI (higher volume, lower cost) |
| [Reddit Scraper Pro](https://apify.com/webdatalabs/reddit-scraper-pro) | Monitor subreddits and track brand mentions with sentiment analysis |

#### E-commerce

| Actor | Description |
|-------|-------------|
| [Shopify Scraper Pro](https://apify.com/webdatalabs/shopify-product-scraper) | Extract Shopify product data with variants and sales estimates |
| [Etsy Scraper Pro](https://apify.com/webdatalabs/etsy-scraper-pro) | Fast Etsy product scraper with ratings, reviews, and prices |

#### Social Media

The full catalogue is at [apify.com/webdatalabs](https://apify.com/webdatalabs).

***

### SEO Keywords

Facebook ad scraper, Facebook Ad Library scraper, AI ad analysis, ad copy analyzer, Facebook ad intelligence, competitive ad research, ad copy effectiveness, winning ad predictor, Facebook ad monitoring, ad copywriting analysis, ad spend estimation, Facebook ad API, competitor ad analysis, ad creative analysis, GPT-4 ad analysis, AI marketing tool, ad copy scoring, emotional trigger detection, copywriting technique detection, Facebook ad automation, n8n Facebook ads, Zapier Facebook ads

***

### Need this data as a managed feed?

If you would rather receive this data on a schedule than run the Actor yourself, we can build and operate the feed: the fields you specify, the cadence you set, delivered to a dataset, S3, a webhook, or your database. Every scheduled run is checked against an agreed shape rather than assumed to be fine, missing values are reported as null instead of filled with placeholders, and repairing the collector when the source changes is covered by the monthly rate. Priced as a one-time setup fee plus a monthly rate, scoped in writing before anything is built.

**Contact:** support@webdatalabs.net

### Leave a review

Is this actor saving you time? A quick review on the Store helps other people find it — and tells us which fields to add next. **[Rate this actor →](https://apify.com/webdatalabs/facebook-ad-intelligence-pro)**

### Legal Disclaimer

This actor is a general-purpose tool for analyzing publicly accessible web data. The user bears sole responsibility for ensuring their specific use complies with:

- Applicable laws (GDPR/DSGVO, copyright law)
- The target website's Terms of Service
- Apify's Terms of Service

The provider (webdatalabs) expressly disclaims liability for any unauthorized or unlawful use. By using this actor, the user agrees to indemnify the provider against any third-party claims arising from their use of the data.

***

*This tool is not affiliated with Meta or Facebook. All trademarks belong to their respective owners.*

# Actor input Schema

## `searchQuery` (type: `string`):

Keywords to search in Facebook Ad Library (e.g., 'fitness app', 'real estate investing', 'CRM software')

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

ISO 3166-1 alpha-2 country code (US, DE, GB, FR, etc.)

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

Filter by ad status. Active ads only is recommended for competitive analysis.

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

How many ads to scrape and analyze with AI. Each ad costs ~$0.02. Start with 50 for testing.

## `useProxies` (type: `boolean`):

Required for Facebook. Uses Apify residential proxies to avoid blocking.

## Actor input object example

```json
{
  "searchQuery": "fitness app",
  "country": "US",
  "activeStatus": "active",
  "maxAds": 50,
  "useProxies": true
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `winning_ads` (type: `string`):

No description

## `recommendations` (type: `string`):

No description

## `full_data` (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 = {
    "searchQuery": "fitness app",
    "country": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("webdatalabs/facebook-ad-intelligence-pro").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 = {
    "searchQuery": "fitness app",
    "country": "US",
}

# Run the Actor and wait for it to finish
run = client.actor("webdatalabs/facebook-ad-intelligence-pro").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 '{
  "searchQuery": "fitness app",
  "country": "US"
}' |
apify call webdatalabs/facebook-ad-intelligence-pro --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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