ScrapeAdLibrary
Search the public Meta Ad Library: ads, creatives, EU transparency data and advertisers.
Should I use this
Quality & Safety
Based on automated analysis of tool definitions and protocol compliance.
Context Cost
This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.
Install
One-Click Install
Add this to your `claude_desktop_config.json` file:
{
"mcpServers": {
"scrapeadlibrary": {
"command": "uvx",
"args": [
"scrapeadlibrary-mcp"
]
}
}
}Runnable packages
0.1.0stdioRemote endpoints
https://api.scrapeadlibrary.com/mcpstreamable-httpWhat it can do
Tool inventory
Tools (5)
🟢search_ads(query, page_id, country, status, ad_type, ...)
Search the public Meta Ad Library (Facebook, Instagram, Messenger, Audience Network, Threads) for ads by keyword and/or advertiser. Cost: 1 credit per call, whatever the number of ads returned (an empty result too); an error costs 0. `limit` (max 30, one page of the Ad Library) does not change the cost: keep it small only to keep the answer short. The next page is a new call (1 credit). 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), 'impressions' (most impressions first) or 'longevity' (longest-running first: days_active, applied to the returned page). min_days_active: Keep only ads running for at least this many days (applied to the returned page, so fewer ads may come back; same cost). Long-running ads are the ones that work ("winning ads"): each ad has days_active and a 0-100 winning_score (longevity, variants, EU reach). limit: Ads per page, 1-30 (default 10). cursor: next_cursor from a previous call, to get the next page (same filters).
Input Schema
{
"type": "object",
"properties": {
"query": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Query"
},
"page_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Page Id"
},
"country": {
"default": "ALL",
"title": "Country",
"type": "string"
},
"status": {
"default": "active",
"enum": [
"active",
"inactive",
"all"
],
"title": "Status",
"type": "string"
},
"ad_type": {
"default": "all",
"enum": [
"all",
"political"
],
"title": "Ad Type",
"type": "string"
},
"media_type": {
"default": "all",
"enum": [
"all",
"image",
"video",
"meme",
"none"
],
"title": "Media Type",
"type": "string"
},
"platforms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Platforms"
},
"languages": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Languages"
},
"active_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Active From"
},
"active_to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Active To"
},
"match": {
"default": "any",
"enum": [
"any",
"exact"
],
"title": "Match",
"type": "string"
},
"sort": {
"default": "relevance",
"enum": [
"relevance",
"impressions",
"longevity"
],
"title": "Sort",
"type": "string"
},
"min_days_active": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Min Days Active"
},
"limit": {
"default": 10,
"title": "Limit",
"type": "integer"
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cursor"
}
},
"title": "search_adsArguments"
}Output Schema
{
"type": "object",
"properties": {
"result": {
"title": "Result",
"type": "string"
}
},
"required": [
"result"
],
"title": "search_adsOutput"
}🟢get_ad(ad_id, country)
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: 1 credit. 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).
Input Schema
{
"type": "object",
"properties": {
"ad_id": {
"title": "Ad Id",
"type": "string"
},
"country": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Country"
}
},
"required": [
"ad_id"
],
"title": "get_adArguments"
}Output Schema
{
"type": "object",
"properties": {
"result": {
"title": "Result",
"type": "string"
}
},
"required": [
"result"
],
"title": "get_adOutput"
}🟢get_page(page_id)
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).
Input Schema
{
"type": "object",
"properties": {
"page_id": {
"title": "Page Id",
"type": "string"
}
},
"required": [
"page_id"
],
"title": "get_pageArguments"
}Output Schema
{
"type": "object",
"properties": {
"result": {
"title": "Result",
"type": "string"
}
},
"required": [
"result"
],
"title": "get_pageOutput"
}🟢get_page_ads(page_id, country, status, media_type, platforms, ...)
List the ads of one advertiser (competitor), newest and most relevant first. Cost: 1 credit per call, whatever the number of ads returned (an empty result too); an error costs 0. The next page is a new call (1 credit). 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), 'impressions' (most impressions first) or 'longevity' (longest-running first: days_active, applied to the returned page). min_days_active: Keep only ads running for at least this many days (applied to the returned page, so fewer ads may come back; same cost). Long-running ads are the ones that work ("winning ads"): each ad has days_active and a 0-100 winning_score (longevity, variants, EU reach). limit: Ads per page, 1-30 (default 10). cursor: next_cursor from a previous call, to get the next page (same filters).
Input Schema
{
"type": "object",
"properties": {
"page_id": {
"title": "Page Id",
"type": "string"
},
"country": {
"default": "ALL",
"title": "Country",
"type": "string"
},
"status": {
"default": "active",
"enum": [
"active",
"inactive",
"all"
],
"title": "Status",
"type": "string"
},
"media_type": {
"default": "all",
"enum": [
"all",
"image",
"video",
"meme",
"none"
],
"title": "Media Type",
"type": "string"
},
"platforms": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Platforms"
},
"languages": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Languages"
},
"active_from": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Active From"
},
"active_to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Active To"
},
"sort": {
"default": "relevance",
"enum": [
"relevance",
"impressions",
"longevity"
],
"title": "Sort",
"type": "string"
},
"min_days_active": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Min Days Active"
},
"limit": {
"default": 10,
"title": "Limit",
"type": "integer"
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cursor"
}
},
"required": [
"page_id"
],
"title": "get_page_adsArguments"
}Output Schema
{
"type": "object",
"properties": {
"result": {
"title": "Result",
"type": "string"
}
},
"required": [
"result"
],
"title": "get_page_adsOutput"
}🟢search_pages(query, country, limit)
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 call, whatever the number of advertisers returned (none found too); an error costs 0. Args: query: Brand name or keyword. country: ISO-3166 alpha-2 country or 'ALL' (default). limit: 1-10 (default 10).
Input Schema
{
"type": "object",
"properties": {
"query": {
"title": "Query",
"type": "string"
},
"country": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Country"
},
"limit": {
"default": 10,
"title": "Limit",
"type": "integer"
}
},
"required": [
"query"
],
"title": "search_pagesArguments"
}Output Schema
{
"type": "object",
"properties": {
"result": {
"title": "Result",
"type": "string"
}
},
"required": [
"result"
],
"title": "search_pagesOutput"
}Community
Evidence