ScrapeAdLibrary
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SCRAPEADLIBRARY_API_KEY | Yes | Your API key (starts with `sal_`). Required for the local server. | |
| SCRAPEADLIBRARY_BASE_URL | No | Override API base URL (default: `https://api.scrapeadlibrary.com`). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Search the public Meta Ad Library (Facebook, Instagram, Messenger, Audience Network, Threads): find ads by keyword or advertiser, read full ad details with EU/UK transparency data, and look up advertiser pages. Every call spends the user's credits: lists cost 1 credit per 10 results, an ad detail 2, a page profile 1. Use small limits and only fetch details when needed.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_adsA | 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 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). |
| get_adA | 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 |
| get_pageA | 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). |
| get_page_adsA | 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). |
| search_pagesA | 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). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| competitor_ad_research | Analyse the ads a competitor is running right now. Args: competitor: Brand name or advertiser page ID (e.g. 'Nike' or '15087023444') country: ISO-3166 alpha-2 country (e.g. 'IT') or 'ALL' |
| keyword_market_scan | Map who advertises on a keyword and how. Args: keyword: Product, category or topic (e.g. 'protein powder') country: ISO-3166 alpha-2 country or 'ALL' |
| analyze_ad | Deep-dive into one ad: creative, copy, targeting and reach. Args: ad_id: Ad Library ID (e.g. '1550534860016399') |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| api_reference | Complete API reference: endpoints, parameters, objects, errors. |
| quickstart | Getting started with the MCP server. |
| pricing | Pricing and credit costs per tool. |
| examples | Common research workflows. |
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.