Spy on competitor Meta ads with Claude Code + Airtable

Scrape competitor ads and store them in Airtable for analysis.

playbook
Last updated Oct 28, 2026

Tools featured in this playbook

This article was originally posted on GitHub

Pull your competitors' ads from the Meta Ad Library straight into Airtable — ad copy, headlines, creatives (images + videos), targeting, platforms, and more.

---

Want to go deeper?

This template is just one piece of the puzzle. Inside my Mr Paid Social community on Skool you'll get:

  • Hands-on help with this scraper (and every other AI ad tool I build)

  • A growing library of AI workflows for creative, copy, and media buying

  • Live trainings and a community of media buyers leveling up their Meta ads with AI

Join us at skool.com/mrpaidsocial →

---

Getting Started

1. Open Claude Code

Open Claude Code (CLI, desktop app, or IDE extension).

2. Paste this repo URL and say "set this up"

That's it. Claude will clone the repo, install dependencies, walk you through API key setup, and get everything running.

---

What you'll need

What you get

A `Competitor Ads` Airtable table with 20 fields per ad:

| Field | Description |

|---|---|

| Competitor Ad Name | Auto-generated descriptive name |

| Facebook Page | Page running the ad |

| Creative | Image or video attachment (auto-downloaded) |

| Ad Copy | Full ad text |

| Headline / Description / CTA | Link preview fields |

| Landing Page URL | Where the ad sends traffic |

| Ad Library URL | Direct link to view in Meta's Ad Library |

| Start Date / Last Seen Date | When the ad ran |

| Active Status | Active or Inactive |

| Platforms | Facebook, Instagram, Messenger, Audience Network, Threads |

| Impressions | High / Medium / Low (derived from EU reach data) |

| Target Ages / Locations | Audience targeting |

| ...and more | Languages, EU Total Reach, Page ID, Ad Library ID |

Two ways to find competitors

  • Direct — give Claude a list of Facebook page names or IDs

  • Discover — give Claude a URL (like your website or a competitor's Skool page) and it will suggest relevant competitors automatically

How it works under the hood

  1. `pull_ads.py` calls the Meta Ad Library API (`ads_archive`) for each competitor

  2. Parallel headless Chrome workers extract creative images/videos from ad snapshots

  3. `pyairtable` batch-inserts all records directly to your Airtable base (~20 seconds for 100+ ads)

  4. A JSON backup is saved locally

See [`CLAUDE.md`](./CLAUDE.md) for the full Claude Code runtime flow and [`META_ADS_LIBRARY_API.md`](./META_ADS_LIBRARY_API.md) for the API reference.

Comments

Login to leave a comment