# Meta Ads Transparency Scraper (`s-r/meta-ads-library`) Actor

Scrape Facebook/Meta Ad Transparency for active ads by brand or page ID across any country — get creative content, images, videos, CTA, page metadata.

- **URL**: https://apify.com/s-r/meta-ads-library.md
- **Developed by:** [SR](https://apify.com/s-r) (community)
- **Categories:** Social media
- **Stats:** 138 total users, 24 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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

## Meta Ads Library Scraper: Facebook and Instagram Ad Data

Hosted meta ads library that returns structured JSON without the captcha-solving, proxy-rotation, and site-update maintenance you'd otherwise own. Run it from the Apify Store with one click, or call it from your own service via the Apify API. Pay only for what you scrape, no monthly subscription.

### What you get

- **Structured JSON output**, every meta ads library run returns clean, parseable records ready for analytics or downstream pipelines.
- **Hosted on Apify**, no servers, no proxies, no anti-bot maintenance. Click Run.
- **Pay only for what you scrape**, pricing scales with usage; no monthly subscription minimum.
- **Multi-country support**, pass a `country` / `geo` parameter to localize results across 50+ regions.

### Why use this meta ads library

Most meta ads library solutions fall into one of two camps: free open-source libraries that break every few months when the upstream site changes, or expensive SaaS tools that charge $99-$399/month for the data layer plus a dashboard UI you may not need.

This Apify Actor sits in the middle: same structured data the SaaS tools ship, but priced per run instead of per month, with a hosted infrastructure that handles proxies, retries, and captcha solving so you don't have to.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `search` | string | **required** | Brand or page name to search (e.g. "coolblue"). Either search or page\_id is required. |
| `page_id` | string |, | Direct lookup by Facebook page ID (e.g. "100445001673131"). |
| `country` | string | `US` | ISO country code (NL, DE, US, etc.). |
| `active_only` | boolean | `True` | Filter to currently active ads only. |

### Output

Every run pushes results to the Apify dataset as JSON records. Each record contains the structured fields surfaced by the meta ads library, fields, IDs, timestamps, and any nested objects. You can:

- **Download** the dataset as JSON, JSONL, CSV, or Excel from the Apify console
- **Stream** results via the Apify API for use in your own application
- **Pipe** results to webhooks, S3, BigQuery, or any of Apify's 30+ integrations
- **Diff** today's run against yesterday's to detect changes (new entries, removed entries, modified fields)

### Use cases for the meta ads library

#### Competitor ad intelligence

Pull every active ad your top 5 competitors are running via the meta ads library. Map their messaging angles, creative formats, and regional spend allocation.

#### Ad-creative inspiration

Browse high-spending campaigns by category to copy proven creative formats, saves weeks of A/B testing from scratch.

#### Compliance auditing

Verify your own brand's compliance with platform ad policies by pulling all your live ads via the meta ads library weekly.

#### Market research

Aggregate meta ads library data across an entire vertical (e.g. all DTC mattress brands) to size paid-media spend and identify rising challengers.

### How it compares

There are three ways to pull Facebook Ads Library data. This Actor is the hosted, pay-per-result option.

| Approach | Setup | Output | Billing |
|---|---|---|---|
| **This Actor** | Hosted on Apify, one click | JSON, JSONL, CSV, Excel | Pay per result, no monthly minimum |
| Open-source scripts (e.g. `minimaxir/facebook-ad-library-scraper`) | You host, maintain, and fix breakage yourself | Raw, you parse it | Free code, your own proxy and server cost |
| Ad-intel SaaS (e.g. Foreplay Spyder) | Sign-up plus a dashboard you may not need | Locked to their UI, export limits | Subscription with a monthly quota |
| Other Apify actors (e.g. `curious_coder/facebook-ads-library-scraper`) | Also hosted on Apify | JSON and CSV | Compare on fields returned and price per result |

Pick this Actor when you want the data layer only, structured JSON, native Apify integration, and a bill that scales with what you actually scrape rather than a fixed monthly seat.

### FAQ

#### Is this meta ads library free?

The Actor itself is hosted on Apify with pay-per-event pricing, you only pay for what you actually scrape. There's no monthly subscription and no minimum spend. The first few runs typically cost less than a coffee. For long-running daily jobs, your monthly bill scales with the volume of data you pull.

#### How does this meta ads library compare to existing tools?

Most off-the-shelf meta ads library alternatives are either fragile open-source scripts that break every few months, or expensive SaaS subscriptions starting at $99-$399/month. This Actor sits in between: hosted infrastructure that handles proxy rotation and retries, but priced per run.

#### What input does the meta ads library accept?

The full input schema is rendered as a form on the Apify Store page, you can run a job by filling out a few fields with no code. The schema also accepts raw JSON if you're calling the Actor via the Apify API from your own service. See the **Input** section above for the field list.

#### How accurate is the meta ads library data?

The Actor scrapes data directly from the source, so accuracy matches what a human user would see on the page. There's no third-party cache or middleware, every run returns the live state. If the upstream site throttles requests, the Actor handles retries and proxy rotation transparently and surfaces a structured error in the dataset's `errors` field rather than failing silently.

#### Can I run this meta ads library on a schedule?

Yes, Apify has built-in scheduling. You can set the Actor to run hourly, daily, or weekly, and pipe results to webhooks, S3, or your data warehouse via the Apify integrations. Most teams schedule the meta ads library as a daily task and incrementally diff against the previous run to detect changes.

### Pricing

This meta ads library uses Apify's pay-per-event pricing, every successful record costs a small fixed amount, so your bill scales linearly with usage. There's no monthly subscription and no minimum spend. See the Apify Store page for the current per-event price; expect typical workloads to cost a few dollars per run.

# Actor input Schema

## `search` (type: `string`):

Brand or page name to search (e.g. "coolblue"). Either search or page\_id is required.

## `page_id` (type: `string`):

Direct lookup by Facebook page ID (e.g. "100445001673131").

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

ISO country code (NL, DE, US, etc.).

## `active_only` (type: `boolean`):

Filter to currently active ads only.

## Actor input object example

```json
{
  "search": "nike",
  "country": "US",
  "active_only": true
}
```

# 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 = {
    "search": "nike"
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/meta-ads-library").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 = { "search": "nike" }

# Run the Actor and wait for it to finish
run = client.actor("s-r/meta-ads-library").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 '{
  "search": "nike"
}' |
apify call s-r/meta-ads-library --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/faP10mPssSt7sGvJl/builds/76qnwtdlF7C8rMhKZ/openapi.json
