Competitor Ad Teardown
A Competitor Ad Teardown agent is a workforce template that pulls a named competitor's live Facebook Ad Library data through Apify, tells apart {{ }}-tagged templated ads from genuinely hand-authored creative, ranks the hand-authored set by real days-running, names the specific gap in their offer mix, and writes three counter-ads tied to that gap.
- What it does: Pulls a competitor's real Facebook Ad Library data, separates hand-authored ads from templated ones, ranks winners by days-running, names the gap in their ad mix, and writes three counter-ads.
- Best for: Performance marketers, DTC/e-commerce operators, agencies benchmarking client accounts, and founders who don't yet know who their real competitors are.
- Apps used: Apify (Facebook Ads Library scraper actor), built-in web search.
- Setup time: Under 10 minutes to connect Apify and run your first teardown.
Last verified from workflow config Septemeber 2026. Includes common failure modes and fixes.
Problem this solves
- Before: you open the Facebook Ad Library by hand, scroll dozens of ads, guess which ones are actually working, and never know if a slick-looking DCO carousel is templated boilerplate or a real winning script.
- After: the agent pulls the ads, classifies which ones are actually hand-authored, points at the single longest-running ad with its real hook line and link, names what's missing from the mix, and hands you three ready-to-run counter-ads.
- Before: you can only analyze a competitor you already know by name.
- After: give it just a category and a country. It finds real, currently-operating competitors via live search (never invented from memory) before spending a cent.
How do you build a Facebook ad-spy or competitor-analysis agent yourself?
The category behind tools like AdSpy, BigSpy, and Foreplay breaks down into five layers, whether you buy a SaaS tool, build your own, or use this template:
- Data source: the Meta Ad Library itself, or a paid mirror of it: the free, official record of every active and historical Facebook/Instagram/Messenger ad.
- Extraction layer: a scraper that pulls structured ad records (copy, dates, format, platform) without hand-copying from the browser.
- Authorship classification: telling apart ads a human actually wrote from ads a dynamic-creative engine auto-generated from a product feed. Most tools skip this step and just show you everything.
- Ranking logic: deciding which ads matter. Days-running is the most defensible public signal, since spend and reach are hidden outside the EU.
- Synthesis and output: turning raw ad data into a gap analysis and new creative, not just a searchable database.
Building this yourself with Claude Code, Codex, or a custom stack means wiring an Apify (or similar) actor call, writing your own
{{ }}-tag classification logic, handling the two distinct zero-results failure modes (a private page vs. a genuinely quiet advertiser), and building spend-cap guardrails so a bad prompt doesn't burn your Apify credit. It's a real, doable weekend project for someone comfortable with an agent framework and API billing math.
Using this pre-built template skips that build entirely: the classification rule, the zero-ads diagnosis, and the spend-cap math are already written into the agent's instructions, and you're running your first teardown in under 10 minutes. For a sibling template using the same Apify/Composio connection pattern, see the Shopify Store Analyzer.
Setup guide
Add this template from the SketricGen template gallery. This is a workforce template, with no brand-onboarding step; you go straight into the agent canvas with the Competitor Ad Teardown agent already configured with its full instructions & tools.
Step 1: Connect your own Apify account
The Apify tool node ships unconnected. You connect your own Apify account so the agent can call APIFY_RUN_ACTOR, APIFY_ACTOR_RUN_GET, and APIFY_GET_DATASET_ITEMS against your credit, not a shared pool.
This is what actually spends money when the agent pulls ads, so make sure the connected account has credit before your first run.
Step 2: Review the agent's configurable defaults
Open the agent and check its Configurable IDs block: COUNTRY defaults to US, ADS_PER_COMPETITOR defaults to 60, and MAX_SPEND_USD is a hard cap recalculated as ads × $0.00075 × 3 whenever the ad count changes. Use Use AI inside the agent to help adjust these defaults or refine any part of its instructions before your first run.
Step 3: Test with one named competitor
Give the agent a Facebook Page URL or a brand name. It resolves the page (asking you to confirm if it had to search for it), then asks you to confirm country, active-vs-inactive ads, and ad count before spending anything, stating the estimated cost and the hard cap up front.
Approve, and it pulls the ads, classifies them, and reports back the longest-running winner, the gap, and three counter-ads.
Step 4: Try niche discovery and self-benchmarking, then deploy
Test a prompt naming only a category and country (e.g. "clothing brands in Pakistan") to trigger the niche-competitor-discovery skill, and a prompt like "compare my Page to [competitor]" to trigger the self-vs-competitor-benchmark skill. Once both behave as expected, deploy the agent to your team's chat channel of choice.
Common issues
- Zero ads returned isn't always the same problem. The agent distinguishes a per-row error like
PAGE_PRIVATE(the run succeeded, but the page blocks Ad Library access) from a genuinely empty result (the advertiser has no matching ads in that country), and reports which one happened instead of retrying silently. - Forgetting to confirm scope before a large pull. The agent always states estimated cost and waits for a go-ahead before spending, but if you skip reading that message you can end up scoping a bigger pull than intended.
- Expecting spend or reach numbers. Those fields are null outside the EU on the default actor. The agent ranks by days-running, not by a spend estimate it can't see, and says so rather than guessing.
- Running niche discovery past 5-6 competitors. The runtime has a roughly 15-tool-call ceiling per turn; going past 5-6 discovered competitors leaves little room for the synthesis step and file write to finish.
Customization knobs:
COUNTRY,ADS_PER_COMPETITOR,MAX_SPEND_USD, and whether to allow the fallback actor (apify/facebook-ads-scraper, priced roughly 6.7x higher but reaching further back in history). The agent's instructions require telling you before it ever switches to it.
Who it's for
- Performance and paid-media marketers get a direct replacement for manually scrolling the Ad Library: the agent names the single longest-running ad with its real hook line and
ad_library_url, and writes three counter-ads tied to a named gap before you brief a single new campaign. - E-commerce and DTC operators get their competitor's ads clustered by offer type: discount, bundle, free shipping, new arrival, social proof, problem/solution, which maps directly onto how DTC Facebook campaigns are actually structured.
- Agencies benchmarking a client's account get a comparison pass across offer mix, hook patterns, platform spread, and days-running distribution between the client's own Page and a named rival, with counter-ads addressed to the client's account specifically, not generic copy.
- Founders who don't know their competitors by name yet can start with just a category and a country. The agent finds real, currently-operating competitors via live search and confirms the list before spending anything.
What the agent does
This template can:
- Resolve a competitor from a direct Facebook Page URL or a brand name, stating which page it found and never guessing silently.
- Confirm scope and cost (country, active-vs-inactive, ad count, estimated spend, and the hard cap) before it ever runs an actor.
- Pull ads through Apify with an exact field projection, retrying the fetch once (never the whole run) if the first attempt comes back empty.
- Tell apart PAGE_PRIVATE errors from genuinely empty results when a pull returns zero ads, and report which one happened.
- Derive exact days-running for every ad from its own end date, working for active and inactive ads alike.
- Classify by merge-tag, not display format: an ad is "templated" only if its title or body literally contains a
{{ }}tag, so a hand-authored DPA ad isn't lumped in with a templated DCO carousel. - Cluster hand-authored ads by offer type, hook pattern, creative format, and publisher platform.
- Name the proven winner: the single longest-running hand-authored ad, quoted verbatim with its real day count and Ad Library link.
- Name the specific gap in the competitor's mix, stated concretely rather than as generic advice.
- Write three counter-ads, each explicitly tied to the named gap, as finished hook/body/CTA copy, not a creative brief.
- Discover a whole niche's competitors from just a category and country, then synthesize a niche-wide gap shared across all of them.
- Benchmark your own Page against a rival, naming what the competitor does that you don't, and where you're already ahead.
How it works
- You give the agent a competitor's Facebook Page, a brand name, a niche plus country, or your own Page plus a rival to benchmark.
- The agent resolves the relevant page(s) with a single
web_searchcall each, confirming its choice with you. - It confirms scope (country, active-only vs. include-inactive, ad count) and states the estimated Apify cost before spending anything.
- On your go-ahead, it runs
APIFY_RUN_ACTORandAPIFY_GET_DATASET_ITEMSagainst thecurious_coder/facebook-ads-library-scraperactor, then derives days-running and classifies every ad. - It clusters the hand-authored ads, names the longest-running winner with a real quote and link, and names the gap in the mix. For a niche pull, it also synthesizes one gap shared across every competitor scraped.
- It writes three counter-ads tied directly to that gap, saves the full teardown to
/agent/as a JSON file, and then composes its closing chat summary.
Requirements
You need an Apify account with credit on it. The tool node is unconnected by default, so you connect your own account and every pull is billed to it. No knowledge base or file upload is required for this template; it runs entirely from chat and live web search. If you want to extend the workflow (e.g. push a finished teardown into a doc or a Slack channel), SketricGen's library of 2000+ connected apps is available to add manually to the canvas.
Apps used
| App | What it's used for | Typical permission scope |
|---|---|---|
| Apify | Runs the Facebook Ads Library scraper actor and fetches results | APIFY_RUN_ACTOR, APIFY_ACTOR_RUN_GET, APIFY_GET_DATASET_ITEMS, APIFY_ACTOR_RUN_ABORT_POST; account must be connected by the user |
| Web Search (built-in) | Resolves a brand name to its official Facebook Page URL | No connection required |
Use cases
Tear down a named competitor's ads before launching a campaign Give the agent a competitor's Page and get their longest-running winner, hook inventory, and a gap-driven counter-ad set back in one pass. Best for: performance and paid-media marketers.
Find the offer types your closest DTC rival keeps running See exactly which offer types (discount, bundle, free shipping) a competitor sustains long-term versus what they've dropped. Best for: e-commerce/DTC operators. See the Data Analysis and Visualization template for turning the resulting teardown data into charts.
Benchmark a client's account against a named rival Run one comparison across offer mix, hooks, formats, platforms, and days-running, with counter-ads addressed to the client's own account. Best for: agencies.
Discover who's actually advertising in your niche and country Start from just a category and a market. The agent finds real, currently-operating competitors and their gap before you know a single name. Best for: founders and small brand owners.
Example prompts/outputs
Example 1: single competitor
Prompt: "Tear down the Facebook ads for [competitor brand]."
Output (Markdown-style, no fixed JSON schema for this template): a stated resolved Page, confirmed scope/cost, an offer-type and hook-pattern breakdown of the hand-authored ads, the single longest-running ad quoted with its real hook line, day count, and Ad Library link, the named gap, and three counter-ads with hook/body/CTA, saved to /agent/teardown_<brand>_<country>_<date>.json.
Example 2: niche discovery
Prompt: "Find the top clothing brands in Pakistan and tear down their Facebook ads."
Output: a confirmed list of real, currently-operating brands (sourced from live search, never memory), each run through the same teardown, plus one niche-wide gap synthesized across all of them, and three counter-ads targeting that shared gap, saved to /agent/teardown_niche_<niche-slug>_<country>_<date>.json.
Why you need this template
- No fabricated numbers: the agent never claims spend, impressions, reach, or audience size where the data doesn't exist; it ranks on days-running, a fact it can actually verify.
- Real quotes, not paraphrases: every hook line reported back is the actual copy that ran, not a rewritten, catchier-sounding version.
- Cost stated before it's spent: you see the estimated Apify charge and the hard cap before a single dollar of your credit is used.
- Works with zero prior competitor knowledge: a category and a country is enough to get a confirmed, real competitor list before anything is scraped.
FAQs
It's a starting point, not a locked automation. Open the agent and use Use AI to help draft or update its instructions. Adding new agents or connecting new tools is done manually in the canvas.
Yes, instead of manually scrolling the Meta Ad Library, this agent pulls a competitor's ads through Apify, classifies which ones are actually hand-authored, and ranks them by days-running.
- Works from a direct Page URL or just a brand name.
- Also works from a category plus country with no specific brand named.
The agent calculates exact days-running for every ad from its own end date (or, for active ads, the most recent data available), so you get a real day count rather than a guess.
Yes, Meta's own Ad Library is free and public. This template automates pulling, classifying, and analyzing what it returns, so you don't do that manually ad by ad.
Those are searchable ad databases you browse yourself. This agent does the pull and the analysis in one pass: classifying authorship, ranking by duration, naming a specific gap, and writing finished counter-ads, not just surfacing a list of ads.
Yes. Give the agent your own Page plus a named competitor (or none, and it discovers 2 by default) and it runs a comparison pass across offer mix, hooks, formats, platform spread, and days-running, calling out where you're already ahead, not just where you're behind.
Yes. Name a category and a country and the agent sources real candidates from live search, resolves each to a Facebook Page, and confirms the list with you before spending anything. It never invents a competitor name from memory.
Yes. COUNTRY defaults to US but is fully editable, and any niche-discovery pull always scrapes with country set to "all," since a brand's ad-targeting geography often doesn't match the market it's known in.
The default actor charges $0.00075 per ad, so 60 ads costs roughly $0.05. The agent states the estimate and a hard spend cap before running anything, and tells you explicitly if it would need to switch to the pricier fallback actor.
Not as a claim of fact. Spend, reach, and conversion data are hidden outside the EU on the default actor. The agent reports "running 94 days" as a fact and labels anything like "their best performer" clearly as an inference, not a verified metric.
The Meta Ad Library this agent pulls from covers Facebook, Instagram, and Messenger placements together, so a competitor's cross-placement ads show up in the same pull.
Related templates
View moreWhatsApp AI Agent
Answers WhatsApp support questions from your brand knowledge base, and never invents a policy.
AI Receptionist
Learns your brand from your website, answers FAQs 24/7, and books demos on Google Calendar.
AI Brand Content Creator
Create researched, on-brand campaign and social content with inspected visuals, captions, calls to action, and reusable delivery files.
Web Lead Extractor
Turn a plain description of your ICP into an outreach-ready lead list scraped from Google Maps.
AI Competitor Intelligence Analyst
Discover the competitors that matter and translate sourced positioning, SEO, content, and offer evidence into defensible growth opportunities.
Google Ads Performance Manager
Analyze Google Ads performance with search-demand evidence and turn wasted spend into prioritized, approval-controlled optimization actions.