# Facebook Ad Library Scraper: Ads by Keyword or Page | $1/1K (`one_dollar_store/facebook-ad-library-scraper`) Actor

$1 per 1,000 results, platform usage included. Ads from the public Meta Ad Library by keyword or advertiser page ID: ad text, advertiser, start date, platforms, button, link, image and video links. About 30 ads per search. No login.

- **URL**: https://apify.com/one_dollar_store/facebook-ad-library-scraper.md
- **Developed by:** [One Dollar Store](https://apify.com/one_dollar_store) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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 Ad Library Scraper: Ads by Keyword or Advertiser Page

**$1 per 1,000 ads. Platform usage included. No rental, no minimum.**

[Open it in Apify Console](https://console.apify.com/actors/3T41qLAHJbdAFL5VA/input)

### What it costs

| Ads | Price |
|---|---|
| 1,000 | $1.00 |
| 10,000 | $10.00 |
| 100,000 | $100.00 |

Plus $0.001 per run. One flat price, platform usage included, so there is no separate compute or proxy bill. A daily run over 5 keywords that returns 150 ads costs $0.151, or about $4.53 over 30 days.

### Why use it

- **One flat price.** The Ad Library needs a full browser, and that browser time and the proxy are included. The bill follows the number of ads and nothing else.
- **No Facebook account.** The actor opens the public Ad Library as a logged out visitor. No cookies, no login, no API key.
- **Keyword or advertiser.** Search by keyword, or by page ID to get one advertiser's ads. Filter by country, active or inactive ads, media type, and issue, election or political ads (these can carry spend and impressions).
- **Wide rows, no repeats.** Advertiser, page likes and categories, ad text, headline, button, link, start date, days running, platforms, format, and image and video links. An ad already returned in the run is dropped before you are charged.

### Quick start

1. Open the actor, type a keyword, press **Start**.
2. Or paste this input:

```json
{ "searchQueries": ["running shoes"], "country": "US", "maxItems": 30 }
```

3. Download the results as JSON, CSV or Excel, or read them through the API.

### Use it from code

```bash
curl -X POST "https://api.apify.com/v2/acts/one_dollar_store~facebook-ad-library-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchQueries": ["running shoes"], "country": "US", "maxItems": 30}'
```

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("one_dollar_store/facebook-ad-library-scraper").call(
    run_input={"searchQueries": ["meal kit"], "country": "US", "maxItems": 30}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["startDate"], item["pageName"], item.get("bodyText", "")[:80])
```

### Use it from an AI assistant

Claude, ChatGPT, Cursor and other assistants can call this actor through Apify's MCP server. Add it with this server address:

```
https://mcp.apify.com?tools=one_dollar_store/facebook-ad-library-scraper
```

Then ask, for example: "Find 30 active Facebook ads for meal kits in the US and tell me which advertisers have run theirs the longest."

### Switching from another Facebook Ad Library actor

Keywords go in `searchQueries` (a list, so one run can cover many searches). Advertisers go in `pageIds`, as numeric page IDs or Ad Library links that contain `view_all_page_id`. The result limit is `maxItems`. The core fields are `adArchiveId`, `pageName`, `bodyText`, `startDate`, `platforms` and `linkUrl`.

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `searchQueries` | list of text | none | Keywords to search, for example a brand, product or topic. Each one is a separate search. |
| `pageIds` | list of text | none | Numeric Facebook page IDs, or Ad Library links with `view_all_page_id`, to get one advertiser's ads. |
| `country` | text | `US` | Two letter country code where the ads ran, or `ALL`. |
| `activeStatus` | text | `active` | `active`, `inactive` or `all`. |
| `adType` | text | `all` | `all`, or `political_and_issue_ads` for ads about social issues, elections or politics. |
| `mediaType` | text | `all` | `all`, `image`, `video`, `meme` or `none`. |
| `maxItems` | number | 100 | Total ads for the run. Minimum 10. |
| `maxItemsPerTarget` | number | 0 | Cap per keyword or page. 0 means no cap. |
| `proxyConfiguration` | object | Apify data center | Proxy for the browser. Its cost is included in the price. See Limits for residential. |

Give at least one keyword or page ID. Example:

```json
{ "searchQueries": ["running shoes", "meal kit"], "country": "US", "maxItems": 60 }
```

### Output fields

| Field | Meaning |
|---|---|
| `adArchiveId`, `adLibraryUrl` | Ad Library id and link. Good for dropping repeats across runs. |
| `pageId`, `pageName`, `pageUrl`, `pageLikeCount`, `pageCategories`, `pageProfilePictureUrl` | The advertiser's page. |
| `isActive`, `startDate`, `endDate`, `activeDays` | Status and dates. `endDate` of an active ad is the day of the run. |
| `platforms`, `displayFormat` | Where it ran (Facebook, Instagram, Messenger, Threads, Audience Network, WhatsApp) and the format, such as `IMAGE`, `VIDEO`, `CAROUSEL`, `DPA` or `DCO`. |
| `bodyText`, `title`, `linkDescription`, `caption`, `ctaText`, `ctaType`, `linkUrl` | Ad text, headline, link text, shown domain, button and where it leads. |
| `imageUrls`, `videoUrls`, `videoPreviewImageUrls`, `cardCount` | Creative links and number of cards. |
| `sameCreativeAdCount`, `collationId` | Other ads that share this creative. |
| `spend`, `impressions`, `currency` | Issue, election and political ads only. |
| `containsSensitiveContent`, `searchQuery`, `country`, `scrapedAt` | Flag, which input found the ad, and collection time. |

Empty fields are left out of a row. Pictures and videos are returned as links and never downloaded.

### Sample results

Real rows from a test run on 4 October 2026 (US), with some fields left out and long links shortened to save space.

```json
[
  {"adArchiveId": "4259039927704549", "pageId": "20662169998", "pageName": "Saucony", "pageLikeCount": 1641679, "isActive": true, "startDate": "2026-02-22", "activeDays": 224, "platforms": ["FACEBOOK", "INSTAGRAM", "AUDIENCE_NETWORK", "MESSENGER", "THREADS"], "displayFormat": "DPA", "bodyText": "The best of the best is all in one place. Shop our top shoes, running apparel, and retro staples.", "title": "Women's Women's Saucony Jazz Triple Black|Silver, Size 5.5 M", "ctaText": "Shop now", "searchQuery": "running shoes"},
  {"adArchiveId": "1279489107485101", "pageId": "103032366405927", "pageName": "HOKA", "pageLikeCount": 1220034, "isActive": true, "startDate": "2026-04-01", "activeDays": 186, "platforms": ["FACEBOOK", "INSTAGRAM"], "displayFormat": "IMAGE", "bodyText": "The legs give out. The heart doesn’t. Together We Fly Higher.", "title": "FLY HUMAN FLY™", "ctaText": "Learn more", "linkUrl": "https://www.hoka.com/en/us/fly-human-fly/?utm_source=...", "searchQuery": "running shoes"},
  {"adArchiveId": "904160855878574", "pageId": "101442462022002", "pageName": "Shop FlavCity", "pageLikeCount": 26697, "isActive": true, "startDate": "2026-08-21", "activeDays": 44, "platforms": ["FACEBOOK", "INSTAGRAM", "AUDIENCE_NETWORK", "MESSENGER", "WHATSAPP", "THREADS"], "displayFormat": "VIDEO", "bodyText": "Tired of flipping over protein labels only to find junk? These packets have nothing to hide. Just 25g grass-fed protein, real fruit, and functional mushrooms. Done.", "title": "Flip the Label, Feel Good", "ctaText": "Shop now", "linkUrl": "https://www.shopflavcity.com/products/build-your-own-protein-smoothie-packets", "searchQuery": "meal kit"}
]
```

### Limits

- **About 30 ads per search.** For a logged out visitor, Facebook shows the first page of results and refuses requests for more with a rate limit, so each keyword or page ID gives about 30 ads on the default proxy. For more ads, add more keywords, narrower keywords, more page IDs or other countries.
- Residential proxy is optional. With it, scrolling sometimes loads more ads per search, but each search is slower and costs several times more to run. The price per result stays the same.
- Keyword search is Facebook's own match, so it can include ads that do not contain the exact words.
- If Facebook shows a check page, a CAPTCHA or a login wall, that search is stopped and listed in the log. The actor never answers these.
- A search takes about 30 to 90 seconds because a full browser loads the page.
- Searches with no ads, and run summaries, are never charged.

### FAQ

**How much does it cost to scrape 10,000 Facebook ads?**
$10, plus $0.001 for each run. At about 30 ads per search, 10,000 ads takes about 330 keywords or page IDs.

**Do I pay for compute or proxy on top?**
No. Platform usage is included in the $1 per 1,000 price.

**Do I need a Facebook account?**
No. The Ad Library is public and the actor opens it as a logged out visitor.

**How do I find a page ID?**
Every row has `pageId`. You can also paste an Ad Library link that contains `view_all_page_id`.

**Why are spend and impressions empty for most ads?**
Meta publishes those only for ads about social issues, elections or politics. Set `adType` to `political_and_issue_ads` to get them.

**Can I watch competitors over time?**
Yes. Schedule a daily run with their page IDs and compare rows by `adArchiveId`.

**Is it legal?**
The actor collects only public data that Meta shows to any visitor of the Ad Library. You are responsible for how you use it: follow Meta's terms and the data protection laws that apply to you, such as GDPR or CCPA.

**Is this an official Facebook or Meta product?**
No. It is an independent tool and is not affiliated with or endorsed by Meta.

**Do I need an Apify account?**
Yes. Actors run from an Apify account, and a free account is enough to start: it includes $5 of platform usage every month. You can [sign up here](https://www.apify.com?fpr=ymnoit). This is a referral link and it costs you nothing.

**Is there a limit on the free plan?**
Yes. A run started from a free plan account delivers the first 10 results, then ends with a message and a link to the plans. Any paid plan returns everything you ask for, up to your own limit. The price per result is the same on every plan.

### More from The One Dollar Store

Every actor here costs $1 per 1,000 results, platform usage included.

**Google and search**

- [Google News Scraper](https://apify.com/one_dollar_store/google-news-articles-scraper): News articles by keyword, topic or country.
- [Google Maps Leads Scraper](https://apify.com/one_dollar_store/google-maps-leads-scraper): Local businesses with phones, websites and emails.
- [Google Ads Transparency Scraper](https://apify.com/one_dollar_store/google-ads-transparency-scraper): Ads any advertiser or domain runs on Google.

**Maps and local business**

- [2GIS Business Scraper](https://apify.com/one_dollar_store/2gis-business-scraper): Businesses in Russia, Central Asia and the UAE.
- [Yandex Maps Scraper](https://apify.com/one_dollar_store/yandex-maps-business-scraper): Businesses on Yandex Maps around any city.
- [IndiaMART Supplier Scraper](https://apify.com/one_dollar_store/indiamart-supplier-scraper): Indian suppliers for any product, with phones.

**Social media**

- [Threads Scraper](https://apify.com/one_dollar_store/threads-post-scraper): Public Threads posts by keyword or profile.
- [Instagram Profile Scraper](https://apify.com/one_dollar_store/instagram-profile-data-scraper): Followers, posts and engagement for public profiles.
- [TikTok Hashtag Scraper](https://apify.com/one_dollar_store/tiktok-hashtag-videos-scraper): Videos, views and creators for any hashtag.
- [Pinterest Pin Search Scraper](https://apify.com/one_dollar_store/pinterest-pin-search-scraper): Public pins with images and outbound links.
- [Telegram Channel Scraper](https://apify.com/one_dollar_store/telegram-channel-posts-scraper): Posts, views and media from public channels.
- [Xiaohongshu Scraper](https://apify.com/one_dollar_store/xiaohongshu-explore-feed-scraper): RedNote notes from the public explore feeds.

**Shopping**

- [Amazon Reviews Scraper](https://apify.com/one_dollar_store/amazon-product-reviews-scraper): Public reviews for any Amazon product.
- [AliExpress Product Scraper](https://apify.com/one_dollar_store/aliexpress-product-search-scraper): Products with prices, orders sold and ratings.
- [Etsy Scraper](https://apify.com/one_dollar_store/etsy-listings-scraper): Listings with prices, shops and badges.
- [Carsales Scraper](https://apify.com/one_dollar_store/carsales-car-listings-scraper): Australian car listings with prices and specs.

**Real estate**

- [Zillow Rentals Scraper](https://apify.com/one_dollar_store/zillow-rentals-scraper): US rentals by city, ZIP or search link.
- [Zillow Sold Homes Scraper](https://apify.com/one_dollar_store/zillow-sold-homes-scraper): Recently sold US homes with prices and dates.
- [Zillow Photos Scraper](https://apify.com/one_dollar_store/zillow-listing-photos-scraper): Every photo of a Zillow listing.

**Jobs**

- [Foundit Jobs Scraper](https://apify.com/one_dollar_store/foundit-jobs-search-scraper): Indian jobs with salary and experience filters.
- [Naukri Jobs Scraper](https://apify.com/one_dollar_store/naukri-job-listings-scraper): Naukri.com jobs by keyword, city and experience.

**Company records**

- [Bundesanzeiger Scraper](https://apify.com/one_dollar_store/bundesanzeiger-filings-scraper): German company filings and notices.
- [US Business Registry Search](https://apify.com/one_dollar_store/us-business-registry-search): Company records from 6 US state registries.

### Changelog

- October 2026: first release.

# Actor input Schema

## `searchQueries` (type: `array`):

Words to search in the Ad Library, for example a brand, product or topic. Each keyword is a separate search.

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

Numeric Facebook page IDs, or Ad Library links that contain view_all_page_id, to get all ads of one advertiser. You can copy the ID from an ad's pageId in the results.

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

Two letter country code where the ads ran, for example US, GB, IN or DE. Use ALL for every country.

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

Which ads to return.

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

All ads, or only ads about social issues, elections or politics (these can include spend and impressions ranges).

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

Only ads with this kind of creative.

## `maxItems` (type: `integer`):

The run stops after this many ads in total. Minimum 10.

## `maxItemsPerTarget` (type: `integer`):

Stop each keyword or page after this many ads, so one search does not use the whole run. 0 means no limit.

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

Proxy for the browser. Apify data center proxy is the default; there Facebook usually allows the first page of about 30 ads per search. Residential proxy is optional: it can load more ads per search while scrolling, but searches are slower and cost several times more to run. The price per result is the same.

## Actor input object example

```json
{
  "searchQueries": [
    "running shoes"
  ],
  "country": "US",
  "activeStatus": "active",
  "adType": "all",
  "mediaType": "all",
  "maxItems": 50,
  "maxItemsPerTarget": 0,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (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 = {
    "searchQueries": [
        "running shoes"
    ],
    "country": "US",
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("one_dollar_store/facebook-ad-library-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 = {
    "searchQueries": ["running shoes"],
    "country": "US",
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("one_dollar_store/facebook-ad-library-scraper").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 '{
  "searchQueries": [
    "running shoes"
  ],
  "country": "US",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call one_dollar_store/facebook-ad-library-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,one_dollar_store/facebook-ad-library-scraper"
        }
    }
}
```

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/3T41qLAHJbdAFL5VA/builds/wnSBDoPaDXi4MtaMj/openapi.json
