# Facebook Ads Library Scraper | Meta广告库采集 | $0.40/1K (`monkey.d.scraping/facebook-ads-library-scraper`) Actor

Scrape the Meta Ad Library by keyword, brand, Page ID or ad ID: Facebook and Instagram ad copy, images, videos, landing pages, CTAs, dates and platforms. From $0.40/1K ads, platform usage included, no login. Meta广告资料库采集。

- **URL**: https://apify.com/monkey.d.scraping/facebook-ads-library-scraper.md
- **Developed by:** [Monkey D. Scraping](https://apify.com/monkey.d.scraping) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 ads

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 | From $0.40/1K

**Facebook Ads Library Scraper** exports ads from the public **Meta Ad Library** by keyword, brand or advertiser page. Get the ad text, headline, images, videos, landing page, call to action, start date, platforms (Facebook, Instagram, Messenger, Threads, WhatsApp, Audience Network) and the advertiser page with its likes and categories. **From $0.40 per 1,000 ads** ($0.60 on the Free plan), platform usage included. No Facebook account, login or cookies needed.

Built for marketers, agencies, e-commerce teams, dropshippers and analysts who want to see what competitors advertise on Facebook and Instagram, which products and angles they push, and how long each ad has been running.

Also known as: Meta Ad Library scraper, Facebook Ad Library scraper, Facebook ads scraper, Instagram ads scraper, Meta ads spy tool, Facebook Ad Library API alternative.

**中文用户 / 中文用戶：** [简体中文说明](#chinese-simplified) · [繁體中文說明](#chinese-traditional)（Meta广告资料库采集、Facebook广告库爬虫、Facebook Ad Library API）

#### Why choose this Facebook Ads Library scraper?

- **Low, all-inclusive price.** $0.60 per 1,000 ads on Free, down to **$0.40 on Business and higher**. Platform usage is **included**: the price you see is the price you pay, with no separate compute bill.
- **Fast.** About 600 ads per minute in our tests: 75 ads in 19 seconds, 600 ads in 63 seconds (15 November 2026).
- **Four ways to search.** Keywords and brand names, one advertiser by Facebook Page ID, any link copied from the Meta Ad Library with its own filters, or single ads by Library ID.
- **Find the strongest or the newest ads.** Sort by most impressions or newest first, and filter by platform (Facebook, Instagram, Messenger, Threads, WhatsApp, Audience Network) and ad language.
- **Complete creatives.** Every image, video, video cover and carousel card, each card with its own text, headline and landing page.
- **Clean copy for catalogue ads.** Catalogue and dynamic ads show the real product text, headline and link instead of template placeholders.
- **Worldwide.** Search one of 244 countries or all countries at once, active or inactive ads.
- **Political and issue ads included.** Spend range, impressions range, currency and "Paid for by" when the library publishes them.
- **You never pay for duplicates.** An ad found by two searches in the same run is saved and charged once.
- **Real-time API.** The Server tab returns ads in the HTTP response in seconds, for AI agents and automations.
- **No login, no cookies, no Facebook account.**

#### What can you use it for?

- **Competitor ad research**: list every active ad of a brand on Facebook and Instagram, with creatives, copy and landing pages.
- **Winning product and creative research**: search a keyword (for example `posture corrector` or `protein powder`) and sort by `startDate` to find ads that have been running for months.
- **Landing page and funnel analysis**: collect the `linkUrl` of each ad, with UTM parameters, to see where competitors send traffic.
- **Creative libraries and swipe files**: gather images, videos and hooks of a niche for your creative team or for AI analysis.
- **Lead generation**: find businesses that advertise in a niche and a country, with their Facebook page, likes and category.
- **Political and issue ad monitoring**: track spend and impressions ranges and who paid for the ads.
- **Monitoring with schedules or API**: run the same search daily or weekly and compare results by `adId`.

#### What data do you get?

| Field | Description |
|---|---|
| `adId`, `adUrl` | Library ID and link to the ad in the Meta Ad Library |
| `status`, `startDate`, `endDate` | `active` or `inactive`, first day and last day the ad was shown (YYYY-MM-DD) |
| `pageName`, `pageId`, `pageUrl` | Advertiser page |
| `pageLikes`, `pageCategories`, `pageProfilePictureUrl` | Page likes, categories and picture |
| `adText`, `title`, `linkDescription` | Ad copy, headline and link description |
| `linkUrl`, `caption` | Landing page with its tracking parameters, and the display link |
| `ctaText`, `ctaType` | Call to action, for example `Shop now` / `SHOP_NOW` |
| `displayFormat` | `IMAGE`, `VIDEO`, `CAROUSEL`, `MULTI_IMAGES`, `DCO` (dynamic creative) or `DPA` (catalogue ad) |
| `imageUrls`, `videoUrls`, `videoPreviewImageUrls` | Creative links as published by the library |
| `cards` | Carousel and catalogue cards, each with text, headline, link, CTA, image and video |
| `platforms` | Where the ad runs: `facebook`, `instagram`, `messenger`, `threads`, `whatsapp`, `audience_network` |
| `versions`, `collationId` | How many versions of the same ad the library groups together |
| `categories`, `paidBy`, `spend`, `currency`, `impressions`, `reachEstimate` | For ads about social issues, elections or politics |
| `containsAiGeneratedMedia`, `isReshared`, `brandedContent` | Labels published by the library |

Every row also has `searchTerm` or `searchPageId`, `searchCountry` and `scrapedAt`.

- Covers the ads the Meta Ad Library publishes: ads active now in every country, plus inactive ads where the library keeps them.
- Spend, impressions and payer are published by Meta for ads about social issues, elections or politics; for other ads these fields are `null`.
- Fields that an ad does not have (for example a video in an image ad) are `null` or empty.
- Image and video links are temporary links published by the library: download the files you want to keep.

#### How much does it cost?

You pay only for the ads you get. Platform usage is included.

| Apify plan | Price per 1,000 ads | 100 ads | 1,000 ads |
|---|---|---|---|
| Free | $0.60 | $0.06 | $0.60 |
| Starter | $0.55 | $0.055 | $0.55 |
| Scale | $0.50 | $0.05 | $0.50 |
| Business and higher | **$0.40** | $0.04 | $0.40 |

Each run also has a start fee of $0.00005 per GB of memory ($0.0001 at the default 2 GB). The Server tab uses the same price per ad.

- Duplicate ads are removed and not charged.
- A search that finds no ads costs nothing.
- Set a maximum cost per run in Apify Console and the run stops when it is reached.

#### How to use it

1. Enter one or more **keywords or advertiser names**, one per line. Or paste a **Facebook Page ID** or a **Meta Ad Library link** to get the ads of one advertiser.
2. Choose the **country** where the ads are shown, or all countries.
3. Set **maximum ads per search**. Start with 20 to see the output.
4. Optional: in the advanced options choose **sort order**, platforms, ad languages, media type, exact phrase, dates, or specific **ad IDs**.
5. Click **Start** and export to JSON, CSV, Excel, or use the API.

##### Tips

- **All ads of one brand**: open the brand in the Meta Ad Library, copy the link from the address bar (it contains `view_all_page_id=`) and paste it in **Advertiser pages or Ad Library links**. Keyword search also returns other advertisers that mention the brand.
- **Long-running ads**: keep **Active ads** and look at the oldest `startDate`: ads that have been running for months usually perform.
- **Exact products**: turn on **Match the exact phrase** for keywords with several words, for example `running shoes`.
- **Fresh creatives**: choose **Newest first** to see the ads launched in the last days.
- **Instagram only**: pick Instagram in **Platforms**; add `en` or `it` in **Ad languages** to keep one market's copy.

#### Input example

```json
{
  "searchTerms": ["nike"],
  "country": "US",
  "maxAdsPerSearch": 100,
  "activeStatus": "active"
}
```

All ads of one advertiser, by Facebook Page ID:

```json
{
  "pages": ["15087023444"],
  "country": "ALL",
  "maxAdsPerSearch": 500
}
```

#### Output example

Real result, media links shortened:

```json
{
  "adId": "1298488261783748",
  "adUrl": "https://www.facebook.com/ads/library/?id=1298488261783748",
  "status": "active",
  "searchTerm": "adidas",
  "searchPageId": null,
  "searchCountry": "US",
  "pageName": "Whatnot",
  "pageId": "112727500143177",
  "pageUrl": "https://www.facebook.com/RealWhatnot/",
  "pageLikes": 313097,
  "pageCategories": ["Shopping"],
  "adText": "Take your sneaker game to the next level with incredible deals on the hottest styles⚡Live on Whatnot",
  "title": "Whatnot: Shop, Sell, Connect",
  "caption": "itunes.apple.com",
  "linkUrl": "http://itunes.apple.com/app/id1488269261",
  "ctaText": "Install now",
  "ctaType": "INSTALL_MOBILE_APP",
  "displayFormat": "VIDEO",
  "platforms": ["facebook", "instagram", "messenger"],
  "startDate": "2026-05-13",
  "endDate": "2026-11-14",
  "versions": 2,
  "collationId": "1304647241132349",
  "imageUrls": [],
  "videoUrls": ["https://video.xx.fbcdn.net/o1/v/t2/f2/m366/AQNh8ggi9I1k...mp4"],
  "videoPreviewImageUrls": ["https://scontent.xx.fbcdn.net/v/t39.35426-6/699010975_787607664288614_n.jpg"],
  "cards": [],
  "categories": [],
  "paidBy": null,
  "spend": null,
  "impressions": null,
  "containsAiGeneratedMedia": false,
  "scrapedAt": "2026-11-15T00:35:53.808Z"
}
```

#### Ready-to-run examples

| Example | Use case | What you get |
|---|---|---|
| [Competitor ads by Facebook page](https://apify.com/monkey.d.scraping/facebook-ads-library-scraper/examples/facebook-competitor-ads-by-page) | See every active ad of one brand | Up to 50 active Nike ads in all countries, with copy, creatives and landing pages |
| [Facebook广告库采集：美国市场Temu相关广告](https://apify.com/monkey.d.scraping/facebook-ads-library-scraper/examples/facebook-ads-cross-border-zh) | Cross-border e-commerce research | Up to 50 active Temu-related ads in the United States |

#### Use it from the API, automations and AI agents

- **API and clients**: start runs and read results with the Apify API, the Python client or the JavaScript client. The dataset is plain JSON, one object per ad.
- **Automations**: connect it to n8n, Make or Zapier, or schedule it in Apify Console for daily or weekly monitoring.
- **AI agents**: available as a tool through the Apify MCP server. A good agent instruction: "Search the Meta Ad Library for `<brand>` in `<country>`, return up to 50 active ads, then summarise the main offers, hooks and landing pages." The fields `adText`, `title`, `linkUrl`, `startDate` and `displayFormat` are the most useful for analysis.

#### Real-time API (Server mode)

Need ads inside an HTTP response instead of a dataset? Use the **Server** tab. Send the same JSON input to `POST /search`, or call `GET /search?q=nike&country=US&max=20`, and the ads come back in seconds with the same fields as a normal run, ready for AI agents, n8n, Make and competitor alerts.

```json
{
  "searchTerms": ["nike"],
  "country": "US",
  "maxAdsPerSearch": 20
}
```

The response holds `ads` and a `summary` per search. Each request runs up to 3 searches with up to 100 ads each. Copy the server URL from the Server tab. Ads cost the same as in a normal run and are also saved to the dataset of the server run in your account. Normal runs, schedules and dataset exports keep working exactly as before.

The server runs in **single-tenant** mode: each user gets a separate server run in their own account, and the Server tab shows the active mode. For long lists of brands or thousands of ads, a normal run is the better fit; if the server is busy, retry after a few seconds.

#### FAQ

**Do I need a Facebook account or cookies?**
No. The scraper reads the public Meta Ad Library like a visitor does.

**Does it also cover Instagram ads?**
Yes. The Meta Ad Library contains the ads on Facebook, Instagram, Messenger, Threads, WhatsApp and Audience Network. The `platforms` field tells you where each ad runs.

**How do I get every ad of one advertiser?**
Use the Facebook Page ID or the Ad Library link of the page in **Advertiser pages or Ad Library links**. You find both in the Meta Ad Library: search the brand, pick the page, and the address bar shows `view_all_page_id=<Page ID>`.

**Can I get one specific ad?**
Yes. Put its Library ID or ad link (`facebook.com/ads/library/?id=...`) in **Ad IDs**. Each ID returns that ad with all its fields.

**Can I see only Instagram ads, or ads in one language?**
Yes. Use **Platforms** and **Ad languages** in the advanced options.

**Can I search by keyword and by advertiser in the same run?**
Yes. Each keyword, page and link is a separate search, and ads found twice are saved once.

**Can I see how much an advertiser spends?**
Meta publishes spend and impressions ranges for ads about social issues, elections or politics. Choose that ad category in the advanced options to get them.

**How can I find winning ads?**
Search active ads and look at `startDate` and `versions`: ads that have run for a long time, or with many versions, are the ones advertisers keep investing in.

**What do DCO and DPA mean?**
`DCO` is a dynamic creative ad (Meta mixes several texts and images) and `DPA` is a catalogue ad (products from a feed). For both, `cards` lists the variations, and the main fields show the first one.

**How much does it cost?**
From $0.40 per 1,000 ads on Business plans, $0.60 on Free, with platform usage included and a start fee of $0.00005 per GB of memory. Duplicates and empty searches are not charged.

**Is it an alternative to the official Facebook Ad Library API?**
Yes, for commercial ads worldwide and without an access token or identity verification.

**How do I monitor a competitor?**
Save an Apify task with the brand or page and schedule it. Compare runs by `adId`: new IDs are new ads, missing IDs have stopped.

**Can I download the images and videos?**
The results contain the links published by the library. They are temporary, so download the files you need soon after the run.

#### Chinese Simplified

#### 中文说明：Meta广告资料库采集工具（Facebook广告库爬虫 / Facebook Ad Library API）

**Facebook Ads Library Scraper** 按关键词、品牌名或广告主主页，批量导出 **Meta广告资料库**（Meta Ad Library，原Facebook广告库）中的公开广告：广告文案、标题、图片和视频素材、落地页链接、行动号召按钮、开始投放日期、投放平台（Facebook、Instagram、Messenger、Threads、WhatsApp、Audience Network），以及广告主主页的粉丝数和类目。**每1,000条广告0.40美元起**（免费套餐0.60美元），平台用量已包含。无需Facebook账号、无需登录、无需Cookie。

专为跨境电商卖家、独立站、出海品牌、广告代理和数据分析团队打造：一眼看清竞品在Facebook和Instagram上投了哪些广告、主推哪些产品和卖点、每条广告已经跑了多久。

##### 为什么选择这款Facebook广告采集工具？

- **价格低，费用全包**：每1,000条广告0.60美元（免费套餐），Business及以上套餐低至0.40美元。平台用量已包含，没有额外账单。
- **速度快**：实测每分钟约600条广告（2026年11月15日：75条19秒，600条63秒）。
- **四种搜索方式**：关键词或品牌名、广告主的Facebook主页ID、直接粘贴Meta广告资料库的链接（保留链接里的筛选条件），或按广告资料库ID获取单条广告。
- **找到最强或最新的广告**：按展示量或最新排序，并可按投放平台（Facebook、Instagram、Messenger、Threads、WhatsApp）和广告语言筛选。
- **素材完整**：全部图片、视频、视频封面和轮播卡片，每张卡片都有自己的文案、标题和落地页。
- **目录广告也有真实文案**：目录广告（DPA）和动态创意（DCO）返回真实的产品文案、标题和链接，而不是模板占位符。
- **覆盖全球**：可选244个国家或地区，或一次搜索全部国家；在投和已停投的广告都可以采集。
- **重复广告不收费**：同一次运行中被多个搜索命中的广告只保存、只计费一次。

##### 适用场景

- **跨境电商选品**：搜索 `posture corrector`、`pet supplies` 等关键词，按 `startDate` 找出已经连续投放数月的广告，发现爆款产品。
- **竞品广告监控**：导出竞品品牌在Facebook和Instagram上的全部在投广告，含素材、文案和落地页。
- **广告素材灵感**：批量收集同类目的图片、视频和文案，建立素材库，分析开头钩子和创意方向。
- **落地页与投放漏斗分析**：收集每条广告的 `linkUrl`（含UTM参数），看竞品把流量引到哪里。
- **独立站与品牌出海调研**：了解目标市场里谁在投广告、投在哪些平台、用什么卖点。
- **销售线索**：找出某个细分领域和国家正在投放广告的商家，含主页链接、粉丝数和类目。
- **定时监控**：保存为任务并设置定时运行，每天或每周自动获取最新广告。

##### 可以获取哪些数据？

- **广告信息**：广告资料库ID和链接、状态（在投 / 已停投）、开始和最后展示日期、广告格式（图片、视频、轮播、多图、动态创意、目录广告）、投放平台、同一广告的版本数。
- **文案与落地页**：广告文案、标题、链接描述、落地页链接（含跟踪参数）、显示链接、行动号召按钮。
- **素材**：图片链接、视频链接、视频封面，以及每张轮播卡片的文案、标题、链接和素材。
- **广告主**：主页名称、主页ID、主页链接、粉丝数、类目和头像。
- **社会议题、选举或政治类广告**：花费区间、展示量区间、币种和付款方（Meta公开时）。

##### 价格

按结果付费，平台用量已包含：

| Apify套餐 | 每1,000条广告 | 100条 | 1,000条 |
|---|---|---|---|
| Free | 0.60美元 | 0.06美元 | 0.60美元 |
| Starter | 0.55美元 | 0.055美元 | 0.55美元 |
| Scale | 0.50美元 | 0.05美元 | 0.50美元 |
| Business及以上 | **0.40美元** | 0.04美元 | 0.40美元 |

每次运行另有启动费：每GB内存0.00005美元（默认2GB为0.0001美元）。重复广告不计费；没有结果的搜索不收费；可在Apify控制台设置每次运行的最高费用，达到后自动停止。

##### 使用方法

1. 输入一个或多个**关键词或品牌名**，每行一个；或粘贴**Facebook主页ID**或**Meta广告资料库链接**，获取某个广告主的全部广告。
2. 选择广告投放的**国家**，或选择全部国家。
3. 设置**每次搜索的最大广告数**，建议先用20条查看结果。
4. 可选：在高级选项里选择排序（展示量最高或最新）、投放平台、广告语言、素材类型、完全匹配、日期，或填写指定的广告ID。
5. 点击 **Start**，完成后导出为JSON、CSV、Excel，或通过API获取。

```json
{
  "searchTerms": ["temu"],
  "country": "US",
  "maxAdsPerSearch": 100,
  "activeStatus": "active"
}
```

**一键运行中文示例：** [Facebook广告库采集：美国市场Temu相关广告](https://apify.com/monkey.d.scraping/facebook-ads-library-scraper/examples/facebook-ads-cross-border-zh)（上面的输入已保存为示例任务，打开即可运行）。

##### 常见问题

**需要Facebook账号或Cookie吗？**
不需要。工具像普通访客一样读取公开的Meta广告资料库。

**能采集Instagram广告吗？**
可以。Meta广告资料库包含Facebook、Instagram、Messenger、Threads、WhatsApp和Audience Network上的广告，`platforms` 字段显示每条广告投放在哪些平台。

**怎样获取某个品牌的全部广告？**
在Meta广告资料库里搜索品牌并选择其主页，复制地址栏里的链接（含 `view_all_page_id=`），粘贴到 **Advertiser pages or Ad Library links** 即可。

**怎样找到爆款广告？**
搜索在投广告，看 `startDate` 和 `versions`：投放时间长、版本多的广告，通常是广告主持续加投的广告。

**能下载广告图片和视频吗？**
结果中包含广告资料库公开的图片和视频链接。链接有时效，请在运行后尽快下载需要的文件。

**可以通过API、自动化工具或AI智能体调用吗？**
可以。支持Apify API、Python和Node.js客户端，以及n8n、Make、Zapier等自动化工具；也可以通过Apify MCP服务器作为AI智能体的工具使用。

**有实时API吗？**
有。在 **Server** 标签页可以用 `POST /search`（与普通运行相同的JSON输入）或 `GET /search?q=nike&country=US&max=20` 调用，几秒内在HTTP响应中返回广告，适合AI智能体、n8n和Make。价格与普通运行相同。

**中文说明会翻译采集到的数据吗？**
不会。中文说明只是使用文档；采集到的数据保持来源的原始语言（广告文案按发布时的原文呈现）。

##### 其他广告情报工具

- [TikTok广告库采集工具](https://apify.com/monkey.d.scraping/tiktok-ads-library-scraper)：按品牌或关键词导出TikTok广告，含广告主、各国覆盖量和年龄×性别定向。
- [Google广告采集工具（Google广告透明度中心）](https://apify.com/monkey.d.scraping/google-ads-transparency-scraper)：按域名或品牌查看竞品在Google搜索、YouTube和Google购物上的广告。
- [领英广告库采集工具](https://apify.com/monkey.d.scraping/linkedin-ad-library-scraper)：B2B竞品在LinkedIn上的广告、展示量和定向。
- [微软/必应广告库采集工具](https://apify.com/monkey.d.scraping/microsoft-ads-library-scraper)：竞品在必应上的搜索广告、落地页和UTM参数。
- [Facebook评论采集工具](https://apify.com/monkey.d.scraping/facebook-comments-scraper)：导出竞品Facebook帖子、Reels和视频广告下的评论与回复，了解用户真实反馈。
- [Instagram评论采集工具](https://apify.com/monkey.d.scraping/instagram-comments-scraper)：导出竞品Instagram帖子和Reels下的评论，了解海外用户真实反馈。

#### Chinese Traditional

#### 中文說明（繁體）：Meta廣告檔案庫擷取工具（Facebook廣告檔案庫爬蟲 / Facebook Ad Library API）

**Facebook Ads Library Scraper** 依關鍵字、品牌或廣告主粉絲專頁，從公開的 **Meta廣告檔案庫** 匯出廣告文案、標題、圖片與影片素材、到達網頁連結、行動呼籲按鈕、開始刊登日期與刊登平台（Facebook、Instagram、Messenger、Threads、WhatsApp）。**每1,000則廣告0.40美元起**，平台用量已包含。不需要帳號，也不必登入。

##### 為什麼選擇這款Facebook廣告爬蟲？

- **費用全包**：每1,000則廣告0.60美元（免費方案），Business以上方案低至0.40美元，平台用量已包含。
- **速度快**：實測每分鐘約600則廣告。
- **四種搜尋方式**：關鍵字或品牌、粉絲專頁編號、直接貼上Meta廣告檔案庫的連結，或依廣告編號取得單則廣告。
- **排序與篩選**：依曝光量或最新排序，並可依平台與廣告語言篩選。
- **素材完整**：圖片、影片、影片封面與輪播卡片，目錄廣告也回傳真實的商品文案與連結。
- **重複廣告不計費**。

##### 適用場景

- **競品分析**：匯出競爭品牌在Facebook與Instagram上的所有刊登中廣告與素材。
- **廣告監測**：設定排程每天或每週執行，依 `adId` 比對新廣告與已停刊的廣告。
- **品牌行銷靈感**：搜尋關鍵字，依 `startDate` 找出長期刊登的廣告與熱門切入點。
- **到達網頁分析**：收集每則廣告的 `linkUrl` 與UTM參數。

##### 使用方法

1. 輸入**關鍵字或品牌**，每行一個；或貼上**粉絲專頁編號**或**Meta廣告檔案庫連結**。
2. 選擇**國家**，設定**每次搜尋的最大廣告數**（建議先用20則）。
3. 選填刊登狀態、素材類型與日期，點擊 **Start**，匯出JSON、CSV、Excel或透過API取得。

```json
{
  "searchTerms": ["shopee"],
  "country": "TW",
  "maxAdsPerSearch": 100
}
```

##### 價格

依結果付費，平台用量已包含：每1,000則廣告 Free 0.60美元、Starter 0.55美元、Scale 0.50美元、Business以上 **0.40美元**。每次執行另有啟動費，每GB記憶體0.00005美元。

##### 常見問題

**需要Facebook帳號或Cookie嗎？**
不需要，工具就像一般訪客一樣讀取公開的廣告檔案庫。

**可以擷取Instagram廣告嗎？**
可以，`platforms` 欄位會顯示每則廣告刊登的平台。

**中文說明會翻譯擷取到的資料嗎？**
不會。說明是中文，資料保留來源的原始語言（廣告文案以刊登時的語言呈現）。

完整欄位與輸出範例請見[英文說明](#what-data-do-you-get)或[简体中文说明](#chinese-simplified)。

#### Related ad research tools

- [TikTok Ads Library Scraper](https://apify.com/monkey.d.scraping/tiktok-ads-library-scraper): TikTok ads by brand or keyword, with advertiser, reach by country and age × gender targeting.
- [Google Ads Scraper — Transparency Center](https://apify.com/monkey.d.scraping/google-ads-transparency-scraper): a competitor's Google Search, YouTube and Shopping ads by domain or brand, with ad texts and landing pages.
- [LinkedIn Ad Library Scraper](https://apify.com/monkey.d.scraping/linkedin-ad-library-scraper): LinkedIn ads by company, keyword or payer, with impressions by country, targeting and dates.
- [Microsoft Ads Library Scraper](https://apify.com/monkey.d.scraping/microsoft-ads-library-scraper): Bing ads by keyword, advertiser or website domain, with landing pages and UTM parameters.

#### More tools for marketers

- [Facebook Comments Scraper](https://apify.com/monkey.d.scraping/facebook-comments-scraper): export comments and replies under competitors' Facebook posts, reels and video ads to see how audiences react.
- [Instagram Comments Scraper](https://apify.com/monkey.d.scraping/instagram-comments-scraper): export comments under competitors' Instagram posts and reels, with authors, likes and post details.
- [Facebook Page Posts Scraper](https://apify.com/monkey.d.scraping/facebook-page-posts-scraper): the organic posts of the same pages you find in the Ad Library.
- [YouTube Scraper | Transcripts, Comments, Shorts](https://apify.com/monkey.d.scraping/youtube-scraper): videos, Shorts, channels and playlists with transcripts and comments.
- [Website SEO Audit & Contact Scraper](https://apify.com/monkey.d.scraping/website-opportunity-auditor): audit the landing pages your competitors advertise, with SEO issues and contact details.

These are separate Actors and are never called by this Actor.

# Actor input Schema

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

Brand, advertiser name or keyword, one per line, for example nike or protein powder. Each line is a separate search in the Meta Ad Library.

## `pages` (type: `array`):

Get every ad of one advertiser: paste the numeric Facebook Page ID (for example 15087023444) or a link copied from the Meta Ad Library (facebook.com/ads/library/?...). A pasted link keeps its own filters.

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

Country where the ads are delivered. Choose All countries for a worldwide search.

## `maxAdsPerSearch` (type: `integer`):

Stops each search after this many unique ads. Start with 20 to preview the output; duplicates are never charged.

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

Active ads are running now. Inactive ads have stopped.

## `sortBy` (type: `string`):

Most impressions first (the library default) or the newest ads first.

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

Keep only ads with this kind of creative.

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

All ads, or only ads about social issues, elections or politics (these also carry spend, impressions and the payer).

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

Keep only ads that run on these platforms. Empty: all platforms.

## `contentLanguages` (type: `array`):

Keep only ads written in these languages, as two-letter codes such as en, it, es or de. Empty: all languages.

## `exactPhrase` (type: `boolean`):

Keywords with several words must appear together in this order, for example running shoes.

## `dateFrom` (type: `string`):

Keep ads that were running on or after this date. Empty: no start limit.

## `dateTo` (type: `string`):

Keep ads that were running on or before this date. Empty: today.

## `adIds` (type: `array`):

Get specific ads by Library ID (for example 1702938977100376) or ad link (facebook.com/ads/library/?id=...). Each ID is one search.

## Actor input object example

```json
{
  "searchTerms": [
    "nike"
  ],
  "country": "ALL",
  "maxAdsPerSearch": 20,
  "activeStatus": "active",
  "sortBy": "impressions",
  "mediaType": "all",
  "adType": "all",
  "exactPhrase": false
}
```

# Actor output Schema

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

One row per unique ad, with text, landing page, dates and platforms.

## `creatives` (type: `string`):

Image and video links, format and call to action per ad.

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

Searches, ads the library reports, ads saved and filters used.

# 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"
    ],
    "country": "ALL",
    "maxAdsPerSearch": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("monkey.d.scraping/facebook-ads-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 = {
    "searchTerms": ["nike"],
    "country": "ALL",
    "maxAdsPerSearch": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("monkey.d.scraping/facebook-ads-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 '{
  "searchTerms": [
    "nike"
  ],
  "country": "ALL",
  "maxAdsPerSearch": 20
}' |
apify call monkey.d.scraping/facebook-ads-library-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,monkey.d.scraping/facebook-ads-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/Gi7oE1XtxYdbgo8Gy/builds/7vW9b8WrHrhVTQfjl/openapi.json
