Meta Ad Library Scraper Skill

Download every active ad a company runs on Facebook and Instagram. This skill finds the company's Ad Library page, pulls its active ads and groups them into unique creatives with their copy, dates, platforms and links. It delivers one clean file per company.

By , Co-founder and CEO, Porter Metrics

Install skill

Setup

Pick the app you use. Every route starts by connecting Porter Metrics, because the skill reads all its data through it.

  1. 1
    Connect Porter Metrics to your AI app: add this MCP server and sign in with Google. It is what runs the scraper and returns the data, with no other account or key.
    MCP SERVER URL
    https://mcp.portermetrics.com/mcp
  2. 2
  3. 3
    Open claude.ai or Claude Desktop, go to Customize › Skills, click +, then Upload a skill and pick the zip.
  4. 4
    Ask: Use the Meta Ad Library Scraper skill to pull the active ads of [company name].

Prompt

Once the skill and Porter Metrics are connected, paste this and replace the company name.

PROMPT
Use the Meta Ad Library Scraper skill to pull the active ads of [company name].

Example outputs

A Porter report built from public Meta Ad Library ads, the same data this skill returns as a file.

The cleaned file the skill hands over, one row per unique creative. Shown with sample data for a fictional brand, Acme Running.

ACME-RUNNING-CREATIVES.JSONSample data
{
  "company": "Acme Running",
  "page_id": "100000000000001",
  "page_name": "Acme Running",
  "active_count": 2,
  "run_date": "2026-12-03",
  "creatives": [
    {
      "creative_id": "c-01",
      "library_ids": ["1000000000000101", "1000000000000102", "1000000000000103"],
      "ads_count": 3,
      "media_type": "video",
      "start_date": "2026-10-14",
      "days_running": 50,
      "platforms": ["facebook", "instagram"],
      "primary_text": "Your first 5K starts with the right shoe. Try the Acme Stride for 30 days, free returns.",
      "headline": "Acme Stride · Built for new runners",
      "cta": "Shop now",
      "link": "https://acme.example/stride",
      "media_url": "https://acme.example/media/stride-15s.mp4",
      "library_url": "https://www.facebook.com/ads/library/?id=1000000000000101"
    },
    {
      "creative_id": "c-02",
      "library_ids": ["1000000000000201"],
      "ads_count": 1,
      "media_type": "image",
      "start_date": "2026-11-28",
      "days_running": 5,
      "platforms": ["instagram"],
      "primary_text": "Black Friday: 25% off every trail shoe until Sunday.",
      "headline": "25% off trail shoes",
      "cta": "Learn more",
      "link": "https://acme.example/sale",
      "media_url": "https://acme.example/media/trail-sale.jpg",
      "library_url": "https://www.facebook.com/ads/library/?id=1000000000000201"
    }
  ]
}
The full skillEverything below is the skill file itself: its summary, its Index and every step. Copy it, download it or read it here.

name: meta-ad-library-scraper

  • objective: One file with every active ad a company runs on Facebook and Instagram, grouped into unique creatives.
  • trigger: Ask to scrape, download or list a company’s Meta ads, by its name or an Ad Library link. To tag and analyze the ads, use Meta Ads Research.
  • parameters: A company name, or an Ad Library or Facebook page link. Optional: how many ads to pull.
  • output: A creatives JSON file and the raw result in a run folder, plus the count in the chat.
  • reference: Every step runs through the Porter Metrics MCP (https://mcp.portermetrics.com/mcp).

Index

Item Part Use it when
Connect Porter Metrics Start Starting any run
Shared rules Start Applying the scope, cost and run folder rules to every step
Ask for the input Setup Turning a company name into its Ad Library page
Run the scraper Scrape Pulling the active ads
Clean the output Scrape Turning the raw result into one row per item
Hand over Finish Giving the user the file and the summary
Tools Reference Finding the Porter Metrics action for each job

Connect Porter Metrics

Index ↑

Run this before any other step.

Rule What to do
Check Call the Porter Metrics MCP whoami tool. A reply with an account means the connection works.
Not connected Stop the task and help the user connect: add the MCP server https://mcp.portermetrics.com/mcp to their AI app, sign in with Google, then run the check again.
Resume Continue with Ask for the input once the check passes.
Porter first Every job in the Tools table runs through the Porter Metrics MCP, so no other tool or key is needed.

Shared rules

Index ↑

These rules apply to every step.

Rule What to do
Public data only Read only what anyone sees logged out. Never sign in, never use the user’s cookies or accounts.
Extract, never judge Every field holds what the source shows. Scores, winners and advice stay out; they belong to the skills in Part of these skills on this page.
Start small The first run uses the default limit. Tell the user the count before raising it, because every result is billed.
Dropped call A dropped call may already be billed. Run it again with a smaller input, never the same heavy call twice.
Empty field A field the source does not show stays empty. Never fill it from a guess.
Run folder Save what the action returned, untouched, in meta-ad-library-scraper/[date]/[target]/raw/, and the cleaned file next to it.

Ask for the input

Index ↑

Ask only for the company; take the defaults for the rest.

Input Required Default
Company name, or an Ad Library or Facebook page link Yes none
Page ID No Read from the link’s view_all_page_id, or found by the audit
Ads to pull No The audit’s default cap

Run the scraper

Index ↑

Pull the page’s active ads and group them as unique creatives.

Rule What to do
Find the page Start meta_ads_research.run_audit with the brand name. A needs_user_input reply lists the candidate pages: show them and ask which one.
Page ID first With a link, pass page_id instead of the name; it skips the search.
Discovery only Pass top_n 0: the scraper collects creatives and transcribes nothing, which keeps the call short.
Wait Poll meta_ads_research.get_audit_status with the job id until it finishes.
Full records Read each creative’s link, platforms, variants and dates from meta_ads_research.generate_report, preview only, no narrative.
One media file is one creative Count creatives, and keep the number of ads that use each one as its own field.
No country setting The audit reads every country. Filter by country after pulling, only when the user asks for one.

Clean the output

Index ↑

Keep one row per unique creative with these fields, in this order.

Field What it holds
creative_id The creative’s fingerprint from the audit
library_ids Every Ad Library ID that uses it
ads_count How many ads use it
media_type video or image
start_date The earliest start date among its ads
days_running Days from that start date to the run date
platforms Each platform it can run on
primary_text The ad copy as published
headline The headline under the media
cta The button text
link The link written in the ad
media_url The video or image file
library_url Its Ad Library page
Output (JSON)
{"company": "", "page_id": "", "page_name": "", "active_count": 0, "run_date": "", "creatives": [{"creative_id": "", "library_ids": [], "ads_count": 0, "media_type": "video|image", "start_date": "", "days_running": 0, "platforms": [], "primary_text": "", "headline": "", "cta": "", "link": "", "media_url": "", "library_url": ""}]}
Rule What to do
Files Give the user the path of the cleaned file and the raw folder.
Summary Say in the chat how many items came back, the date range they cover and any field that came back empty for every item.
Next step When the user wants analysis, name the full skill that reads this file (Part of these skills on this page).

Porter Metrics MCP actions run through execute_action.

Use Tool Parameters
Connection check whoami none
Start the audit meta_ads_research.run_audit brand or page_id · max_items · top_n 0
Audit status meta_ads_research.get_audit_status job_id; call again about every 30 seconds while running
Full creative records meta_ads_research.generate_report page_id · brand · no narrative; preview only

FAQ

Yes. The skill is free to copy, download and change. It reads data through the Porter Metrics MCP, which you can connect for free.

Yes. Every step reads or publishes data through the Porter Metrics MCP. Without it the skill stops at its first step, Connect Porter Metrics, and walks you through connecting.

Claude (web, desktop and Claude Code), ChatGPT, Codex, Cursor and any app that reads skill files or lets you paste instructions, as long as the Porter Metrics MCP is connected there.

Part of these skills

The skill is free. The Porter connection is free.

Start free