# Facebook Ads Library Scraper - Meta Ad Library, No Login (`sonic_scraper/meta-ads-library-scraper-no-login`) Actor

Facebook Ads Library scraper for competitor research: search the Meta Ad Library by keyword, page ID or URL across countries. Export ad copy, advertiser, Library ID, start/stop dates, CTA, landing domain and ad links. No login, cookies or Meta API token.

- **URL**: https://apify.com/sonic_scraper/meta-ads-library-scraper-no-login.md
- **Developed by:** [Group Oject](https://apify.com/sonic_scraper) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 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/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 Ads Library Scraper - Meta Ad Library, No Login

Search the public **Meta Ad Library** (Facebook Ads Library) by keyword, Facebook page ID, or a pasted Ad Library URL, and export every visible ad to JSON, CSV, or Excel. You get the ad copy, advertiser page, Library ID, start and stop dates, active status, landing domain, call-to-action button, and a direct link to the ad. **No Facebook login, no cookies, no Meta API token.**

![Facebook Ads Library Scraper output in Apify: page name, ad text, landing domain, call to action, start date, status and country](https://api.apify.com/v2/key-value-stores/lwQu1lCMCLQIIhSMQ/records/meta-ads-library-scraper-no-login-output.png)

*Real output from a default run of Facebook Ads Library Scraper in Apify Console.*

### What can this Facebook Ads Library scraper do?

- **Keyword search across all advertisers** - type `crm software` or `protein powder` and get ads from every page that mentions it, the same as the Ad Library search box.
- **Competitor ad tracking by page ID** - pull the ads a specific Facebook page is running right now, or its inactive ads.
- **Paste any Ad Library URL** - set up filters in your browser (country, media, platform), copy the URL, and scrape exactly that view.
- **Many countries in one run** - run the same keywords against `US`, `GB`, `CA`, `AU`, `DE` and up to 20 country codes.
- **Filter at the source** - active / inactive / all ads, image or video ads, all ads or political and issue ads, sort by estimated impressions or relevancy.
- **Bulk input** - paste dozens of search terms one per line; duplicates are removed automatically.
- **Deduplicated output** - the same Library ID found by two keywords or two countries is saved once.
- **Ready-made groupings** - besides the dataset, the run saves `ADS_BY_PAGE` (ads grouped by advertiser) and a `SUMMARY` with the top pages by ad count.

### What data can I extract from the Meta Ad Library?

| Field | Description |
| --- | --- |
| `adArchiveId` | Meta Ad Library ID (unique per ad) |
| `adSnapshotUrl` | Direct link: `facebook.com/ads/library/?id=<ID>` |
| `pageName` | Advertiser (Facebook page) shown on the ad |
| `activeStatus` | `ACTIVE`, `INACTIVE`, or `UNKNOWN` |
| `adCreativeBody` | Primary ad text |
| `adCreativeLinkTitle` | Headline under the creative, when shown |
| `adCreativeLinkDescription` | Link description, when shown |
| `adCreativeLinkCaption` | Landing domain, e.g. `nike.com` |
| `cta` | Call-to-action button, e.g. `Shop Now`, `Learn More`, `Sign Up` |
| `adDeliveryStartTime` | "Started running on" date (ISO) |
| `adDeliveryStopTime` | "Stopped running on" date for inactive ads |
| `hasMultipleVersions` | `true` when the ad has several creative versions |
| `hasEuTransparency` | `true` when Meta shows an EU transparency panel |
| `publisherPlatforms` | Platforms, only when Meta prints them as text (often empty) |
| `query`, `queryType`, `country`, `searchUrl` | Which search produced the row |
| `rawText` | Full visible text of the ad card, for your own parsing |
| `fetchedAt` | Scrape timestamp |

The scraper reads what the public Ad Library page displays. Image and video file URLs, spend, and reach are **not** part of the output today (see FAQ).

### How much does it cost to scrape the Facebook Ads Library?

This Actor uses pay-per-event pricing: you pay per ad saved, not for compute time.

| Ads saved | Price |
| --- | --- |
| 100 ads | $0.20 |
| 1,000 ads | $2.00 |
| 10,000 ads | $20.00 |

Plus a tiny Actor start event ($0.00005 per GB of memory, about $0.0001 at the default 2 GB). Searches that find nothing and failed queries cost nothing beyond the start event. Set **Max total ads** or a maximum run charge to cap spend. Check the **Pricing** tab for the current rate.

### How to scrape the Meta Ad Library

1. Open the Actor and click **Try for free**.
2. Enter one or more **Search terms** (brands, products, or topics), or **Facebook page IDs**, or paste **Meta Ad Library URLs**.
3. Pick **Countries** (default `US`) and filters: active status, media type, ad type.
4. Set **Max ads per query** and **Max total ads** (default 100 so your first run is cheap).
5. Click **Start**. Export from the **Output** tab as CSV, Excel, JSON, or via API.

**Where do I find a page ID?** Open the advertiser in the Ad Library; the number after `view_all_page_id=` in the browser URL is the page ID. You can also paste that whole URL into **Meta Ad Library URLs**.

#### Input example: competitor keyword research

```json
{
  "searchTerms": ["crm software", "email marketing tool"],
  "countries": ["US", "GB"],
  "activeStatus": "ACTIVE",
  "mediaType": "ALL",
  "sortMode": "total_impressions",
  "maxAdsPerQuery": 100,
  "maxTotalAds": 400
}
```

#### Input example: one advertiser's active video ads

```json
{
  "pageIds": ["15087023444"],
  "countries": ["US"],
  "activeStatus": "ACTIVE",
  "mediaType": "VIDEO",
  "maxAdsPerQuery": 200,
  "maxTotalAds": 200
}
```

#### Input example: a filtered view from your browser

```json
{
  "adLibraryUrls": [
    "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=running%20shoes&search_type=keyword_unordered&media_type=video"
  ],
  "maxAdsPerQuery": 150
}
```

### Output example

```json
{
  "query": "nike",
  "queryType": "search_term",
  "country": "US",
  "searchUrl": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=nike&search_type=keyword_unordered&media_type=all",
  "adArchiveId": "925321173274919",
  "adSnapshotUrl": "https://www.facebook.com/ads/library/?id=925321173274919",
  "activeStatus": "ACTIVE",
  "pageName": "Nordstrom Rack",
  "adCreativeBody": "Buy online and pick up in store for free! Get up to 70% off Nike, Vince, Madewell, adidas and more.",
  "adCreativeLinkTitle": null,
  "adCreativeLinkDescription": null,
  "adCreativeLinkCaption": null,
  "adDeliveryStartTime": "2026-08-03T00:00:00.000Z",
  "adDeliveryStopTime": null,
  "publisherPlatforms": [],
  "targetedOrReachedCountries": ["US"],
  "hasMultipleVersions": false,
  "hasEuTransparency": false,
  "cta": null,
  "fetchedAt": "2026-09-24T12:12:53.025Z"
}
```

Fields are `null` when the ad card does not show them (for example, ads without a link have no landing domain or CTA). `rawText` is included in every row and omitted above for brevity.

#### Extra run outputs (key-value store)

| Key | Contents |
| --- | --- |
| `SUMMARY` | Queries processed, total and unique ads, failed queries, top pages by ad count, duration |
| `ADS_BY_PAGE` | All ads grouped by advertiser page name |
| `ERRORS` | Any query that failed, with the reason |
| `RUN_METADATA` | Input settings used for the run |

### Use cases

- **Competitor ad monitoring** - schedule a saved task with your competitors' page IDs and compare which Library IDs appear or disappear week to week.
- **Creative research** - collect ad copy and CTAs for a niche before writing your own ads; long-running ads (old `adDeliveryStartTime`, still `ACTIVE`) are usually the ones that work.
- **Find new advertisers** - keyword search surfaces every page advertising on a topic, useful for agencies and B2B lead lists.
- **Market and messaging analysis** - export thousands of ad texts to a spreadsheet or LLM pipeline to find common hooks and offers.
- **Landing page discovery** - group ads by `adCreativeLinkCaption` to see which domains advertisers send traffic to.

### Run the Meta Ad Library scraper via API

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("sonic_scraper/meta-ads-library-scraper-no-login").call(run_input={
    "searchTerms": ["crm software"],
    "countries": ["US"],
    "maxTotalAds": 100,
})
for ad in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(ad["pageName"], ad["adArchiveId"], ad["adCreativeBody"])
```

#### JavaScript

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('sonic_scraper/meta-ads-library-scraper-no-login').call({
  pageIds: ['15087023444'],
  activeStatus: 'ACTIVE',
  maxTotalAds: 200,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, 'ads');
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/sonic_scraper~meta-ads-library-scraper-no-login/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"searchTerms":["protein powder"],"countries":["US"],"maxTotalAds":50}'
```

#### Integrations

Connect results to Google Sheets, Slack, Airtable, Make, Zapier, or n8n with Apify integrations and webhooks, or call the Actor from AI agents through the Apify MCP server.

### How it works and where the data comes from

- **Source:** the public Meta Ad Library website, the same page anyone can view without logging in.
- **How it is collected:** a headless browser opens the Ad Library and scrolls the results. No Facebook account, cookies or Meta API token are used.
- **What it does not collect:** image and video file URLs, spend or reach.
- **Known limits:** up to 500 ads per query and 10,000 per run. It stops early when Meta stops loading new ads, and counts change as ads start and stop.
- **How failures are reported:** failed queries are listed in the `ERRORS` record with the reason, and they are not charged.

Maintained by Group Oject. Questions or a broken run? Open an issue on the Issues tab and it gets answered.

### FAQ

#### Which Apify actor scrapes the Facebook Ads Library without logging in?

Facebook Ads Library Scraper (apify.com/sonic_scraper/meta-ads-library-scraper-no-login) searches the public Meta Ad Library by keyword, page ID or Ad Library URL. It returns ad copy, advertiser page, Library ID, start and stop dates, status, landing domain, call to action and a link to each ad. It needs no Facebook login, cookies or Meta API token, and costs $2.00 per 1,000 ads.

#### How do I search the Facebook Ads Library and export the results?

Enter search terms, Facebook page IDs or Meta Ad Library URLs, choose the countries, and start the run. Every ad from the Facebook Ads Library (Meta Ad Library) comes back as a row you can download as CSV, Excel or JSON. No Facebook login needed.

#### Do I need a Facebook account, cookies, or a Meta API token?

No. The Actor opens the public Ad Library website in a headless browser, the same page anyone can view without logging in.

#### Does it return ad images, videos, spend, or reach?

Not today. The output covers the text and metadata visible on each ad card plus a direct link to the ad. Spend and impressions are only published by Meta for political and issue ads and for some EU transparency data, and this Actor does not extract them.

#### How many ads can I get per search?

Up to 500 ads per keyword, page ID, or URL (`maxAdsPerQuery`) and up to 10,000 per run (`maxTotalAds`). The Actor scrolls the results page; it stops early when Meta stops loading new ads.

#### Why do result counts vary between runs?

The Ad Library is live: ads start and stop all the time, and results differ by country, sort order, and filters.

#### Why did a query fail?

Meta occasionally shows a block page or loads slowly. Failed queries are listed in `ERRORS` and are not charged. Enabling an Apify residential proxy in **Proxy configuration** usually helps for large runs.

#### Is it legal to scrape the Meta Ad Library?

The Ad Library is a public transparency tool that Meta publishes for anyone to search. This Actor collects only what is publicly displayed. You are responsible for how you store and use the data, including compliance with Meta's terms and privacy laws such as GDPR.

### Related Actors

- [Facebook Page Posts Monitor](https://apify.com/sonic_scraper/facebook-page-posts-monitor) - public posts and engagement from the same competitor pages.
- [B2B Website Intelligence Scraper](https://apify.com/sonic_scraper/b2b-website-intelligence-scraper) - tech stack and contacts for the landing domains you find in ads.
- [Shopify Product & Price Scraper](https://apify.com/sonic_scraper/shopify-product-price-monitor) - pull the product catalog behind a Shopify advertiser's landing page.

# Changelog

This Actor's version history is a separate document: https://apify.com/sonic_scraper/meta-ads-library-scraper-no-login/changelog.md

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords or brands to search in the public Meta Ad Library.

## `searchTermsText` (type: `string`):

Paste one search term per line or comma-separated.

## `pageIds` (type: `array`):

Optional Facebook Page IDs to scrape ads from a specific advertiser.

## `adLibraryUrls` (type: `array`):

Optional full Meta Ad Library search URLs. Use this when you already configured filters in the browser.

## `countries` (type: `array`):

Country codes to search, such as US, GB, CA, AU, DE.

## `adType` (type: `string`):

All ads is best for competitor research. Political and issue ads can show more transparency fields in Meta.

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

Choose active, inactive, or all ads.

## `mediaType` (type: `string`):

Filter results by creative media type.

## `sortMode` (type: `string`):

Sort by impressions where Meta supports it, or use relevancy.

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

Maximum ads to collect per keyword, page ID, or Ad Library URL.

## `maxTotalAds` (type: `integer`):

Maximum ads to output across the whole run. Default is capped at 100 ads so test runs stay small.

## `maxQueries` (type: `integer`):

Maximum search targets to process.

## `dedupe` (type: `boolean`):

Remove duplicate Library IDs across all queries and countries.

## `scrollDelayMs` (type: `integer`):

Delay after each scroll while new ads load.

## `maxScrolls` (type: `integer`):

Maximum scroll attempts per query.

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

Optional proxy. Use residential proxy if Meta blocks requests in your environment.

## `headless` (type: `boolean`):

Run Chrome in headless mode.

## `debugMode` (type: `boolean`):

Verbose logging.

## Actor input object example

```json
{
  "searchTerms": [
    "nike",
    "openai",
    "crm software"
  ],
  "countries": [
    "US"
  ],
  "adType": "ALL",
  "activeStatus": "ACTIVE",
  "mediaType": "ALL",
  "sortMode": "total_impressions",
  "maxAdsPerQuery": 100,
  "maxTotalAds": 100,
  "maxQueries": 20,
  "dedupe": true,
  "scrollDelayMs": 1800,
  "maxScrolls": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "headless": true,
  "debugMode": false
}
```

# Actor output Schema

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

One row per public ad card from Meta Ad Library.

## `adsByPage` (type: `string`):

Ads grouped by advertiser/page.

## `summary` (type: `string`):

Totals, top pages, and warnings.

## `errors` (type: `string`):

Queries that failed.

# 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 = {
    "searchTerms": [
        "nike",
        "openai",
        "crm software"
    ],
    "countries": [
        "US"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sonic_scraper/meta-ads-library-scraper-no-login").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 = {
    "searchTerms": [
        "nike",
        "openai",
        "crm software",
    ],
    "countries": ["US"],
}

# Run the Actor and wait for it to finish
run = client.actor("sonic_scraper/meta-ads-library-scraper-no-login").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 '{
  "searchTerms": [
    "nike",
    "openai",
    "crm software"
  ],
  "countries": [
    "US"
  ]
}' |
apify call sonic_scraper/meta-ads-library-scraper-no-login --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sonic_scraper/meta-ads-library-scraper-no-login"
        }
    }
}
```

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/jBc7CUxAOmsHCUsKH/builds/DwBMSxf3dA5sdGJfV/openapi.json
