ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

meta-ad-spy

Competitive intelligence skill for spying on competitor ads using Meta's Ad Library. Use this skill whenever the user wants to: research competitor Facebook/Instagram ads, analyze ad strategies, extract ad creatives or copy, find how long ads have been running, scout ad spend patterns, monitor industry advertising trends, or build any kind of competitor ad intelligence report. Triggers on phrases like "check competitor ads", "what ads is [brand] running", "spy on ads", "Facebook ad library", "Meta ad library", "scrape ads", "monitor ads", "ad intelligence", "ad research", or any request to analyze advertising strategies on Meta platforms. Always use this skill even if the user just mentions they want to understand what a competitor is doing on Facebook or Instagram.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/abhishekj9621/meta-ad-spy
Or

Meta Ad Spy — Competitor Ad Intelligence Skill

A two-phase skill for extracting and analyzing competitor ads from Meta platforms.

Architecture Overview

Phase 1: Playwright Scraper (No API key needed)
  └── facebook.com/ads/library → Ad creatives, copy, status, platforms, dates
  
Phase 2: Meta Graph API (Requires access token)
  └── graph.facebook.com/v23.0/ads_archive → Spend ranges, impressions, demographics
  
Analysis Layer: Claude synthesizes insights from both sources

PHASE 1: Playwright Scraper

When to use: Always as the first step, or when user has no API token.
What it gets: Ad creatives (image/video URLs), ad copy, CTA text, page name, start date, active status, platforms (Facebook/Instagram), ad format (carousel, video, static).
What it can't get: Spend ranges, impressions, demographic breakdown (those need Phase 2).

Setup

pip install playwright --break-system-packages
playwright install chromium
pip install asyncio --break-system-packages

Core Playwright Script

Write this to /tmp/meta_ad_scraper.py:

import asyncio
import json
import re
import sys
from playwright.async_api import async_playwright

async def scrape_ad_library(
    search_query: str = None,
    page_id: str = None,
    country: str = "ALL",
    ad_type: str = "all",           # all | political_and_issue_ads | housing_ads
    active_status: str = "active",  # active | inactive | all
    media_type: str = "all",        # all | image | meme | video | none
    max_ads: int = 50
) -> list[dict]:
    """
    Scrape Meta Ad Library for competitor ads.
    Either search_query or page_id must be provided.
    """
    results = []

    # Build URL
    base = "https://www.facebook.com/ads/library/?"
    params = {
        "active_status": active_status,
        "ad_type": ad_type,
        "country": country,
        "media_type": media_type,
    }
    if search_query:
        params["q"] = search_query
        params["search_type"] = "keyword_unordered"
    elif page_id:
        params["view_all_page_id"] = page_id
        params["search_type"] = "page"
    
    url = base + "&".join(f"{k}={v}" for k, v in params.items())

    async with async_playwright() as p:
        browser = await p.chromium.launch(
            headless=True,
            args=[
                "--no-sandbox",
                "--disable-blink-features=AutomationControlled",
                "--disable-dev-shm-usage",
            ]
        )
        context = await browser.new_context(
            viewport={"width": 1440, "height": 900},
            user_agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
            locale="en-US",
        )
        # Stealth: mask webdriver
        await context.add_init_script("""
            Object.defineProperty(navigator, 'webdriver', { get: () => undefined });
        """)

Metadata

Stars4473
Views1
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-abhishekj9621-meta-ad-spy": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.

Related Skills

ecommerce-manager-claw

Manage ecommerce store backends in real time via their APIs. Use this skill whenever the user mentions their online store, shop, or ecommerce platform — even casually. Triggers include: checking stock, updating inventory, viewing or fulfilling orders, adding or editing products, looking up customer info, or any request to "manage my store", "check my shop", "update my listings", "see my orders", or similar phrasing. Supports Shopify, WooCommerce, BigCommerce, Wix, PrestaShop, Adobe Commerce (Magento), Amazon (SP-API), Etsy, and Shopware. Always use this skill when the user wants to interact with or retrieve data from any ecommerce backend.

abhishekj9621 4473

ads-manager-claw

Manage paid advertising campaigns across Meta (Facebook & Instagram), Google Ads, X, and Snapchat — optimized for Indian businesses. This skill analyzes performance, detects issues, and recommends high-ROI actions before executing anything.

abhishekj9621 4473

ecom-manager-d2c

AI ecommerce operations manager

abhishekj9621 4473

ad-intelligence

Competitive ad intelligence skill for fetching, analyzing, and reporting on competitor ads across Meta (Facebook/Instagram), Google Ads Transparency Center, and LinkedIn Ad Library. Use this skill whenever a user asks about competitor ads, what ads a brand is running, ad creative analysis, ad copy research, campaign monitoring, ad library lookups, or marketing intelligence on any of these platforms. Also trigger for phrases like "what ads is [company] running", "spy on competitor ads", "find ads from [brand]", "check ad library", "pull ad data", "analyze competitor campaigns", or any request involving scraping or fetching public ad data from Meta, Google, or LinkedIn. This is a two-phase skill — Phase 1 uses web scraping (no API keys needed), Phase 2 unlocks deeper data via official and third-party APIs.

abhishekj9621 4473

engagement-analytics-tracker

Use this skill whenever the user needs help with behavioral analytics, engagement tracking, or data collection across any digital touchpoint. Trigger for: website behavioral analytics (scroll depth, form abandonment, session tracking, GTM setup, GA4 custom events), email engagement tracking (open/click/attribution via Klaviyo, Mailchimp, or custom platforms), social media engagement monitoring (owned and competitor), mobile app analytics (Firebase, Amplitude, Mixpanel, AppsFlyer), user-level engagement scoring, cohort analysis, conversion tracking, event schema design, data layer setup, attribution modeling, or any request like "track user behavior", "set up analytics", "measure engagement", "build an event schema", "track form abandonment", "email attribution", "app retention analysis", "what events should I track?", or "how do I measure X". Always use this skill — do not guess at tracking implementations from memory; patterns and APIs change.

abhishekj9621 4473