ScrapeAdLibrary
OfficialProvides access to Facebook ads in the Meta Ad Library, including ad search, ad details, advertiser profiles, and an advertiser's ads.
Allows searching Instagram ads in the Meta Ad Library, including creatives, active status, advertiser information, and related ad details.
Includes Messenger ads available through the Meta Ad Library for ad search and advertiser/creative research.
Enables searching the public Meta Ad Library for competitor ads, creatives, advertisers, political ad spend, and EU/UK reach and targeting data.
Includes Threads ads available through the Meta Ad Library for ad search and advertiser/creative research.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
ScrapeAdLibrary MCP Server
An MCP server that lets AI assistants (Claude Desktop, Claude Code, Cursor, Cline...) search the public Meta Ad Library (Facebook, Instagram, Messenger, Audience Network, Threads) through the ScrapeAdLibrary API: competitor ads, creatives, advertisers, political ad spend, EU (DSA) reach and targeting.
Features
5 Tools — search ads, ad detail, advertiser profile, advertiser's ads, advertiser search
4 Documentation Resources — API reference, quickstart, pricing, workflow examples
3 Prompt Templates — competitor ad research, keyword market scan, single ad analysis
Related MCP server: Facebook Ads Library MCP Server
Connect without installing (Claude, ChatGPT, Claude Code)
The same tools are available as a hosted remote MCP server with OAuth sign-in: no API key to copy, nothing to install. Add this URL as a custom connector and sign in with your ScrapeAdLibrary account:
https://api.scrapeadlibrary.com/mcpClaude (web, Desktop, mobile): Customize → Connectors → Add custom connector.
ChatGPT: chatgpt.com/plugins → Add custom MCP server → OAuth.
Claude Code:
claude mcp add --transport http scrapeadlibrary https://api.scrapeadlibrary.com/mcp, then/mcpto sign in.
Calls use your account's credits with the API's pricing. Step-by-step guide: scrapeadlibrary.com/docs/mcp.
Quick Start (local server with an API key)
1. Get an API Key
Sign up at scrapeadlibrary.com and create an API key (starts with sal_).
2. Configure Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"scrapeadlibrary": {
"command": "uvx",
"args": ["scrapeadlibrary-mcp"],
"env": {
"SCRAPEADLIBRARY_API_KEY": "sal_your_key_here"
}
}
}
}3. Use it
Ask Claude:
"What ads is Nike running in Italy right now? Summarise their messaging."
"Show me active video ads about 'protein powder' in the US, sorted by impressions"
"Which advertisers run ads for 'running shoes'?"
"Get the EU reach and targeting of ad 1550534860016399"
Configuration for Other Clients
Cursor
Add the same JSON block to .cursor/mcp.json.
Claude Code
claude mcp add scrapeadlibrary -e SCRAPEADLIBRARY_API_KEY=sal_your_key_here -- uvx scrapeadlibrary-mcpInstallation Alternatives
pip
pip install scrapeadlibrary-mcp
SCRAPEADLIBRARY_API_KEY=sal_xxx scrapeadlibrary-mcpnpx
SCRAPEADLIBRARY_API_KEY=sal_xxx npx scrapeadlibrary-mcp(The npm package is a thin wrapper: it runs the Python server via uvx, or python3 -m as a
fallback.)
Docker
docker build -t scrapeadlibrary-mcp .
docker run -i --rm -e SCRAPEADLIBRARY_API_KEY=sal_xxx scrapeadlibrary-mcpTools
Tool | Description | Cost | Key defaults |
| Search ads by keyword and/or advertiser, with country, status, media, platform, language, date filters | 1 credit per 10 ads | limit=10, status=active |
| Full ad: text, media, cards, advertiser, payer/beneficiary, EU/UK transparency | 2 credits | — |
| Advertiser profile: category, likes, Instagram, active ads estimate | 1 credit | — |
| Ads of one advertiser | 1 credit per 10 ads | limit=10, status=active |
| Advertisers that ran ads matching a keyword | 1 credit per 10 results | limit=10 |
Empty results and errors cost 0 credits. Lists return a cursor to fetch the next page.
Environment Variables
Variable | Required | Description |
| Yes | Your API key (starts with |
| No | Override API base URL (default: |
Development
uv venv && uv pip install -e ".[dev]"
.venv/bin/pytest
.venv/bin/ruff check . && .venv/bin/ruff format --check .Test with MCP Inspector:
SCRAPEADLIBRARY_API_KEY=sal_xxx .venv/bin/mcp dev dev_server.pyassets/logo-400.png is still the placeholder logo inherited from the template: replace it with
the final brand logo before publishing to registries.
License
MIT
Available Tools
5 toolsget_adAInspect
Get the full detail of one ad: complete text, all media and carousel cards, the advertiser profile, who paid for it (payer/beneficiary), and EU (DSA) / UK transparency data (reach, targeted ages, gender, locations, reach breakdown by country and age).
Cost: 2 credits.
Args:
ad_id: Ad Library ID (the numeric id returned by search_ads).
country: ISO-3166 alpha-2 country for transparency data, or 'ALL' (default).
Inputs: ad_id (required), country. Returns: result
get_pageAInspect
Get an advertiser's profile: name, category, likes, Instagram account and followers, verification, and an estimate of how many ads it is running now.
Cost: 1 credit.
Args: page_id: Numeric advertiser page ID (from search_ads results or search_pages).
Inputs: page_id (required). Returns: result
get_page_adsAInspect
List the ads of one advertiser (competitor), newest and most relevant first.
Cost: 1 credit per 10 ads returned, rounded up; an empty result costs 0.
Args: page_id: Numeric advertiser page ID (use search_pages to find it from a brand name). country: ISO-3166 alpha-2 country or 'ALL' (default). status: 'active' (default), 'inactive' or 'all'. media_type: 'all', 'image', 'video', 'meme' or 'none'. platforms: Subset of facebook, instagram, messenger, audience_network, threads. languages: ISO-639-1 language codes. active_from: YYYY-MM-DD. active_to: YYYY-MM-DD. sort: 'relevance' (default) or 'impressions'. limit: Ads per page, 1-50 (default 10). cursor: next_cursor from a previous call, to get the next page (same filters).
Inputs: page_id (required), sort, limit, cursor, +7 more. Returns: result
search_adsAInspect
Search the public Meta Ad Library (Facebook, Instagram, Messenger, Audience Network, Threads) for ads by keyword and/or advertiser.
Cost: 1 credit per 10 ads returned, rounded up (limit=10 → 1 credit, limit=50 → 5);
an empty result or an error costs 0. Keep limit small unless the user needs more.
Args: query: Keyword or phrase (1-100 chars). Required unless page_id is given. page_id: Restrict to one advertiser (numeric page ID, see search_pages). country: ISO-3166 alpha-2 country where the ads ran (e.g. 'IT', 'US') or 'ALL'. status: 'active' (default), 'inactive' or 'all'. ad_type: 'all' or 'political' (political & issue ads, with spend/impressions). media_type: 'all', 'image', 'video', 'meme' or 'none'. platforms: Subset of facebook, instagram, messenger, audience_network, threads. languages: ISO-639-1 language codes of the ad text (e.g. ['it', 'en']). active_from: YYYY-MM-DD; ads running at some point from this date. active_to: YYYY-MM-DD; ads running at some point up to this date. match: 'any' (all words, default) or 'exact' (exact phrase). sort: 'relevance' (default) or 'impressions' (most impressions first). limit: Ads per page, 1-50 (default 10). cursor: next_cursor from a previous call, to get the next page (same filters).
Inputs: sort, limit, match, query, +10 more. Returns: result
search_pagesAInspect
Find advertisers (Facebook/Instagram pages) that ran ads matching a keyword or brand name. Use it to get the page_id needed by get_page and get_page_ads.
Cost: 1 credit per 10 advertisers returned, rounded up; an empty result costs 0.
Args: query: Brand name or keyword. country: ISO-3166 alpha-2 country or 'ALL' (default). limit: 1-30 (default 10).
Inputs: query (required), limit, country. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clear primary resource (ads vs. advertiser pages) and action (search vs. get detail vs. list). The one blurry boundary is search_ads with a page_id filter versus get_page_ads, which both return one advertiser's ads; descriptions hint at the difference (keyword search vs. browsing a competitor's page) but don't explicitly say when to prefer one over the other.
All five tools follow a strict verb_noun snake_case pattern using two consistent verbs: search_ads/search_pages and get_ad/get_page/get_page_ads. Resource nouns (ad, page) are used predictably, so names are easy to infer and remember.
Five tools is a tight, well-earned surface for an ad-library lookup service: one search and one detail tool per entity type (ads, pages), plus a page-to-ads listing. Nothing feels redundant or missing at the count level.
The surface covers the full discovery-to-detail lifecycle: find pages, list/search ads, and expand a single ad with transparency data, with cursor pagination handled inside search tools. Minor gaps are utilities an agent might want, such as listing valid countries/languages/platform filters or a cheaper way to count an advertiser's active ads before spending credits.
Maintenance
Related MCP Connectors
Real-time Meta, Google, LinkedIn and TikTok ad library access for AI assistants. No API keys.
Ad library and ad spy for AI agents: winning Facebook and Instagram ads, competitor ads and hooks.
Meta ad intelligence via Apify: ad copy, CTAs, platforms, advertisers.
Meta Ad Library by keyword, brand or Page ID: Facebook and Instagram ads. No login.
Related MCP Servers
- FlicenseAqualityDmaintenanceSearches the Meta (Facebook) Ad Library by keyword and returns ad details including advertiser, ad copy, and EU reach, without requiring an API key.31-
- AlicenseAqualityBmaintenanceEnables searching and analyzing Facebook's public ads library for any brand, including ad images, text, and video analysis.918 npm332MIT
- AlicenseNot gradedqualityCmaintenanceEnables searching and scraping the public Facebook Ad Library to extract structured ad data such as advertiser, copy, landing URLs, and CTAs for competitive research, all without an account or API token.MIT

Spytrend MCP Serverofficial
AlicenseNot gradedqualityBmaintenanceEnables AI assistants to search and retrieve Meta and TikTok advertising intelligence — ads, creatives, advertisers, the accounts behind them, destinations and rankings — through a hosted, browser-authenticated endpoint with no installation or API key. Supports full record lookups, similarity and trend queries, favorite folders, plus ready-made skills and recipes for competitive ad research.131MIT