Meta ads library skill

Research competitor Facebook and Instagram ads from the Meta Ads Library via the Hyper MCP — search by keyword, pull full ad creative and metadata, enrich with page contact info for lead generation, and surface structured ad-intelligence summaries in chat.

by hyperfx-ai·MIT license·GitHub ↗

★ 90 Stars on the repo·Checked

npx degit hyperfx-ai/marketing-skills/skills/meta-ads-library#main ~/.claude/skills/meta-ads-library

SKILL.md · 8.7 KB · installs the whole folder to ~/.claude/skills/meta-ads-library

Files of Meta ads library

Files 1 file
Show the full text167 lines

Meta Ads Library

Guide for searching the Meta Ads Library and producing structured competitor ad intelligence.

The skill's job is to turn raw scraped ads into useful summaries: top advertisers, common CTAs, recurring hooks, recently launched creatives, and (optionally) enriched lead lists. All output is presented inline in chat — there is no database or persistence layer.

Out of scope — defer to other skills

Request Send them to
Multi-source competitor research (site, social, search rank, etc., not just ads) competitor-intel
Generating new ad creative based on what you found ad-creative-generation

Requirements

If search("meta_ad_library_ads_search") does not find meta_ad_library_ads_search, stop and tell the user to enable Hyper MCP and connect Apify.

How to run the tools in this skill

Every tool in this skill is named by its canonical tool name. Run it with the call your surface gives you:

Surface Find a tool Run it
MCP client (Claude, Cursor, Codex, ChatGPT) search("<what you want to do>"), then describe("<name>") call("<name>", {...})
Hyper CLI hyperai search "<what you want to do>", then hyperai describe <name> hyperai call <name> --json '{...}'

If a tool is not found, its integration is not connected or not enabled for the workspace: stop and tell the user which integration to connect.

Tool surface

Tool Purpose
meta_ad_library_ads_search Search the Meta Ads Library by keyword. Returns compact results (title, body, CTA, link, page name, dates, platforms). Max 40 per call.
meta_ad_library_ads_get Get full details for a specific ad. Requires both ad_archive_id and page_id — both come from meta_ad_library_ads_search results.
meta_ad_library_ads_search_enriched Search + enrich each result with page contact info (email, phone, website). Slower (multiple API calls per result). Max 20 per call.
meta_ad_library_pages_search Search Facebook pages by category + location (not by keyword). Useful for building a lead list from a vertical.
meta_ad_library_pages_scrape Scrape detailed data from specific Facebook page URLs.

Critical rules

  1. Public-only data. The Meta Ads Library is public. Don't attempt to bypass any access control or scrape private content.
  2. Count limits differ between tools. meta_ad_library_ads_search allows count up to 40. meta_ad_library_ads_search_enriched caps at 20 — exceeding this returns an error.
  3. meta_ad_library_ads_get needs two IDs. Both ad_archive_id and page_id are required. Both are returned in every meta_ad_library_ads_search result row — pass them through together.
  4. Enriched search is slow. It makes a Facebook page scrape per ad and optionally a website scrape. Only use it when contact info matters (lead-gen workflows). For pure ad intelligence, use the regular meta_ad_library_ads_search.
  5. Apify-backed tools fail intermittently. Expect occasional "fetch failed" responses. Retry once after a short delay before reporting the source as missing.
  6. Don't over-interpret a single ad. "Brand X is running a discount" is noise. "5 of the top 10 advertisers in this query are running discounts" is signal. Always aggregate before drawing conclusions.

Workflow

Phase 1 — Define the query

Before running anything, agree on:

  1. The search query — keyword(s) competitors would target. Examples: "meal kit delivery", "AI marketing tools", "skincare for sensitive skin".
  2. Country — ISO code (e.g. "US", "GB", "AU"). Default to "ALL" only if the user explicitly wants global.
  3. Active vs all — active_status="active" is usually what you want. Inactive ads are historical and noisier.
  4. Time window — period accepts "last24h", "last7d", "last14d", "last30d", or "all_time". Match the window to the user's intent (weekly digest → "last7d", trend research → "last30d").
  5. The job — what is this for?
    • Creative trend report → use meta_ad_library_ads_search, summarize patterns across hooks, CTAs, formats.
    • Top advertiser snapshot → use meta_ad_library_ads_search, group by page_name.
    • Lead list → use meta_ad_library_ads_search_enriched, filter for rows with contact_email or contact_website.
Phase 2 — Pull the ads
meta_ad_library_ads_search(
    query="meal kit delivery",
    country="US",
    active_status="active",
    count=40,                # max for this tool
    period="last30d"
)

Each result row includes: ad_archive_id, page_id, page_name, is_active, start_date_formatted, end_date_formatted, title, body, cta_text, link_url, caption, ad_library_url, page_categories, publisher_platform.

For more than 40 ads, paginate by re-calling with offset=40, offset=80, etc.

For lead-gen with contact info:

meta_ad_library_ads_search_enriched(
    query="meal kit delivery",
    country="US",
    active_status="active",
    count=20,                # max for the enriched tool
    scrape_websites=True,
    filter_spam=False
)

Enriched rows add: contact_email, contact_phone, contact_website, page_followers, page_rating, address, business hours.

Phase 3 — Get full creative for the most interesting ads (optional)

meta_ad_library_ads_search returns truncated bodies for some ads. To get the complete creative — including video URLs and images — call meta_ad_library_ads_get on the specific ads worth a deeper look:

meta_ad_library_ads_get(
    ad_archive_id="559220927273823",      # from search results
    page_id="328127803978438"             # from search results
)

Both args come from the same row in meta_ad_library_ads_search. Do this for the top 3–5 ads, not all 40 — each detail call is a separate Apify run.

Phase 4 — Surface the intelligence

Present the findings inline in chat. Pick the format that matches the user's job from Phase 1.

Top advertisers (group by page):

Page Active ads Categories Notable angle
Brand A 12 Restaurant, Meal Kit "Skip the grocery store" hook in 8/12 ads
Brand B 7 Software, Subscription Heavy on UGC video, "$1 first week" offer

Common CTAs and hooks:

Pattern Count Examples
Sign up CTA 18 …
Shop now CTA 12 …
Price-anchor opener ("From $X/week") 9 …
Founder-story opener 4 …

Recently launched ads (last 7 days):

Page Started CTA Hook Library URL
Brand A 2026-04-28 Sign up "Skip the grocery run this week" <ad_library_url>

Lead list (enriched only):

Page Email Website Followers Active ads
Brand A [email protected] a.com 12K 7
Phase 5 — Recurring monitoring (optional)

If the user wants ongoing tracking:

  1. Save the query, country, and active_status settings.
  2. Re-run weekly with period="last7d".
  3. Brief becomes a delta report — new ads since the last run, advertisers that changed posting cadence, CTA / offer shifts.

This is when competitor-intel becomes the better skill — it handles multi-source diffing across many surfaces, not just Meta ads.

Output standards

  • Always cite the ad_library_url for any specific ad referenced in the brief — the user can click through to verify.
  • Aggregate before quoting. Don't paste raw ad bodies; extract the pattern and quote 1–2 representative examples.
  • Mark interpretation explicitly. "Observation: 8 of 10 top advertisers use a 'first week free' offer. Possible interpretation: …".
  • Note the time window. Every brief should state the search query, country, and date range it was generated from.
1---
2name: meta-ads-library
3description: Research competitor Facebook and Instagram ads from the Meta Ads Library via the Hyper MCP — search by keyword, pull full ad creative and metadata, enrich with page contact info for lead generation, and surface structured ad-intelligence summaries in chat. Use when the user wants to scrape the Meta Ads Library, spy on competitor ads, monitor new ads in a category, build a lead list from advertisers, or surface creative trends across an industry.
4requires_toolkits:
5 - meta_ads_library
6icon: meta_ads_library
7short_description: Search the Meta Ads Library for competitor ads and surface structured ad intelligence.
8---
9 
10# Meta Ads Library
11 
12Guide for searching the Meta Ads Library and producing structured competitor ad intelligence.
13 
14The skill's job is to turn raw scraped ads into useful summaries: top advertisers, common CTAs, recurring hooks, recently launched creatives, and (optionally) enriched lead lists. All output is presented inline in chat — there is no database or persistence layer.
15 
16## Out of scope — defer to other skills
17 
18| Request | Send them to |
19| --- | --- |
20| Multi-source competitor research (site, social, search rank, etc., not just ads) | [`competitor-intel`](../competitor-intel) |
21| Generating *new* ad creative based on what you found | [`ad-creative-generation`](../ad-creative-generation) |
22 
23## Requirements
24 
25- **Hyper MCP installed and connected.** [https://app.hyperfx.ai/mcp](https://app.hyperfx.ai/mcp)
26- **Apify integration connected** at [https://app.hyperfx.ai/apps](https://app.hyperfx.ai/apps) — the Meta Ads Library tools run via Apify under the hood.
27 
28If `search("meta_ad_library_ads_search")` does not find `meta_ad_library_ads_search`, stop and tell the user to enable Hyper MCP and connect Apify.
29 
30### How to run the tools in this skill
31 
32Every tool in this skill is named by its canonical tool name. Run it with the call your surface gives you:
33 
34| Surface | Find a tool | Run it |
35| --- | --- | --- |
36| MCP client (Claude, Cursor, Codex, ChatGPT) | `search("<what you want to do>")`, then `describe("<name>")` | `call("<name>", {...})` |
37| Hyper CLI | `hyperai search "<what you want to do>"`, then `hyperai describe <name>` | `hyperai call <name> --json '{...}'` |
38 
39If a tool is not found, its integration is not connected or not enabled for the workspace: stop and tell the user which integration to connect.
40 
41## Tool surface
42 
43| Tool | Purpose |
44| --- | --- |
45| `meta_ad_library_ads_search` | Search the Meta Ads Library by keyword. Returns compact results (title, body, CTA, link, page name, dates, platforms). Max 40 per call. |
46| `meta_ad_library_ads_get` | Get full details for a specific ad. Requires both `ad_archive_id` **and** `page_id` — both come from `meta_ad_library_ads_search` results. |
47| `meta_ad_library_ads_search_enriched` | Search + enrich each result with page contact info (email, phone, website). Slower (multiple API calls per result). Max 20 per call. |
48| `meta_ad_library_pages_search` | Search Facebook pages by category + location (not by keyword). Useful for building a lead list from a vertical. |
49| `meta_ad_library_pages_scrape` | Scrape detailed data from specific Facebook page URLs. |
50 
51## Critical rules
52 
531. **Public-only data.** The Meta Ads Library is public. Don't attempt to bypass any access control or scrape private content.
542. **Count limits differ between tools.** `meta_ad_library_ads_search` allows `count` up to 40. `meta_ad_library_ads_search_enriched` caps at 20 — exceeding this returns an error.
553. **`meta_ad_library_ads_get` needs two IDs.** Both `ad_archive_id` and `page_id` are required. Both are returned in every `meta_ad_library_ads_search` result row — pass them through together.
564. **Enriched search is slow.** It makes a Facebook page scrape per ad and optionally a website scrape. Only use it when contact info matters (lead-gen workflows). For pure ad intelligence, use the regular `meta_ad_library_ads_search`.
575. **Apify-backed tools fail intermittently.** Expect occasional `"fetch failed"` responses. Retry once after a short delay before reporting the source as missing.
586. **Don't over-interpret a single ad.** "Brand X is running a discount" is noise. "5 of the top 10 advertisers in this query are running discounts" is signal. Always aggregate before drawing conclusions.
59 
60## Workflow
61 
62### Phase 1 — Define the query
63 
64Before running anything, agree on:
65 
661. **The search query** — keyword(s) competitors would target. Examples: `"meal kit delivery"`, `"AI marketing tools"`, `"skincare for sensitive skin"`.
672. **Country** — ISO code (e.g. `"US"`, `"GB"`, `"AU"`). Default to `"ALL"` only if the user explicitly wants global.
683. **Active vs all** — `active_status="active"` is usually what you want. Inactive ads are historical and noisier.
694. **Time window** — `period` accepts `"last24h"`, `"last7d"`, `"last14d"`, `"last30d"`, or `"all_time"`. Match the window to the user's intent (weekly digest → `"last7d"`, trend research → `"last30d"`).
705. **The job** — what is this for?
71 - **Creative trend report** → use `meta_ad_library_ads_search`, summarize patterns across hooks, CTAs, formats.
72 - **Top advertiser snapshot** → use `meta_ad_library_ads_search`, group by `page_name`.
73 - **Lead list** → use `meta_ad_library_ads_search_enriched`, filter for rows with `contact_email` or `contact_website`.
74 
75### Phase 2 — Pull the ads
76 
77```
78meta_ad_library_ads_search(
79 query="meal kit delivery",
80 country="US",
81 active_status="active",
82 count=40, # max for this tool
83 period="last30d"
84)
85```
86 
87Each result row includes: `ad_archive_id`, `page_id`, `page_name`, `is_active`, `start_date_formatted`, `end_date_formatted`, `title`, `body`, `cta_text`, `link_url`, `caption`, `ad_library_url`, `page_categories`, `publisher_platform`.
88 
89For more than 40 ads, paginate by re-calling with `offset=40`, `offset=80`, etc.
90 
91For lead-gen with contact info:
92 
93```
94meta_ad_library_ads_search_enriched(
95 query="meal kit delivery",
96 country="US",
97 active_status="active",
98 count=20, # max for the enriched tool
99 scrape_websites=True,
100 filter_spam=False
101)
102```
103 
104Enriched rows add: `contact_email`, `contact_phone`, `contact_website`, `page_followers`, `page_rating`, address, business hours.
105 
106### Phase 3 — Get full creative for the most interesting ads (optional)
107 
108`meta_ad_library_ads_search` returns truncated bodies for some ads. To get the complete creative — including video URLs and images — call `meta_ad_library_ads_get` on the specific ads worth a deeper look:
109 
110```
111meta_ad_library_ads_get(
112 ad_archive_id="559220927273823", # from search results
113 page_id="328127803978438" # from search results
114)
115```
116 
117Both args come from the same row in `meta_ad_library_ads_search`. Do this for the top 3–5 ads, not all 40 — each detail call is a separate Apify run.
118 
119### Phase 4 — Surface the intelligence
120 
121Present the findings inline in chat. Pick the format that matches the user's job from Phase 1.
122 
123**Top advertisers (group by page):**
124 
125| Page | Active ads | Categories | Notable angle |
126| --- | --- | --- | --- |
127| Brand A | 12 | Restaurant, Meal Kit | "Skip the grocery store" hook in 8/12 ads |
128| Brand B | 7 | Software, Subscription | Heavy on UGC video, "$1 first week" offer |
129 
130**Common CTAs and hooks:**
131 
132| Pattern | Count | Examples |
133| --- | --- | --- |
134| `Sign up` CTA | 18 | … |
135| `Shop now` CTA | 12 | … |
136| Price-anchor opener ("From $X/week") | 9 | … |
137| Founder-story opener | 4 | … |
138 
139**Recently launched ads (last 7 days):**
140 
141| Page | Started | CTA | Hook | Library URL |
142| --- | --- | --- | --- | --- |
143| Brand A | 2026-04-28 | Sign up | "Skip the grocery run this week" | <ad_library_url> |
144 
145**Lead list (enriched only):**
146 
147| Page | Email | Website | Followers | Active ads |
148| --- | --- | --- | --- | --- |
149| Brand A | [email protected] | a.com | 12K | 7 |
150 
151### Phase 5 — Recurring monitoring (optional)
152 
153If the user wants ongoing tracking:
154 
1551. Save the query, country, and `active_status` settings.
1562. Re-run weekly with `period="last7d"`.
1573. Brief becomes a delta report — *new* ads since the last run, advertisers that changed posting cadence, CTA / offer shifts.
158 
159This is when [`competitor-intel`](../competitor-intel) becomes the better skill — it handles multi-source diffing across many surfaces, not just Meta ads.
160 
161## Output standards
162 
163- **Always cite the `ad_library_url`** for any specific ad referenced in the brief — the user can click through to verify.
164- **Aggregate before quoting.** Don't paste raw ad bodies; extract the pattern and quote 1–2 representative examples.
165- **Mark interpretation explicitly.** "Observation: 8 of 10 top advertisers use a 'first week free' offer. Possible interpretation: …".
166- **Note the time window.** Every brief should state the search query, country, and date range it was generated from.
167 

Discussion

Alternatives

Also in Social & retail adsSee all 401 in Marketing →
Ad creativeWhen the user wants to generate, iterate, or scale ad creative — headlines, descriptions, primary text, or full ad variations — for any paid advertising platform. Also use when the user mentions 'ad copy variations,' 'ad creative,' 'generate headlines,' 'RSA headlines,' 'bulk ad copy,' 'ad iterations,' 'creative testing,' 'write me some ads,' 'Facebook ad copy,' 'Google ad headlines,' 'LinkedIn ad text,' 'static ads,' 'ad templates,' 'iMessage ad,' 'chat reveal ad,' 'ChatGPT ad,' 'Apple Notes ad,' 'AirDrop ad,' 'creative strategy,' 'creative roadmap,' 'creative retro,' 'hook writing,' 'creative review page,' 'present ad creative for approval,' 'motion video ad,' 'faceless video ad,' 'UGC ad,' 'greenscreen ad,' 'TikTok/Reels ad format,' 'which ad format to make,' 'Meta ad format tier list,' or 'creative format taxonomy.' Use this whenever someone needs to produce ad copy at scale or iterate on existing ads. For campaign strategy and targeting, see ads. For landing page copy, see copywriting.Marketing · MITAmazon Ads AuditYou share your Amazon advertising numbers and goals; you get back a plain-language review of what's draining your budget and what to change first.Business & ops · MITApple Ads AuditPaste what you're spending on Apple Search Ads and your recent numbers; get back a plain review of what's wasting money and what to fix first.Business & ops · MITAd creative builderUse when the user asks to "write ad copy", "generate RSA headlines", or "build ad creative at volume"; produces ad units — RSA headlines/descriptions, hooks, and an angle matrix — message-matched to the destination landing page. Not for scoring an ad account — use ad-account-auditor; not for the post-click page — use landing-optimizer; not for organic articles — use content-writer. 广告创意/广告文案/RSA标题Marketing · Apache-2.0