Published 2026-10-28 by Atlas Data
Every big ad platform now publishes a public ad library: the Meta Ad Library (Facebook, Instagram, Messenger, Threads), the Google Ads Transparency Center, the LinkedIn Ad Library and the TikTok Ad Library. They are great for browsing by hand and painful for anything else: four interfaces, four sets of filters, no export.
This guide connects all four to an AI assistant through the Model Context Protocol (MCP), so you can ask a question like "What is Allbirds advertising on Facebook and Instagram right now, and where do the ads link to?" and the assistant fetches the ads itself.
It uses four Atlas Data scrapers that run on Apify and are exposed through Apify's hosted MCP server. There is nothing to install or host.
What you need
- An MCP client: Claude Desktop, Claude Code, Cursor, VS Code (Copilot agent mode) or any other client that supports remote (Streamable HTTP) servers.
- An Apify account. Runs are billed per result to that account (prices below).
Step 1: The endpoint
One URL exposes the four ad-library scrapers as MCP tools:
https://mcp.apify.com/?tools=atlasdata/facebook-ad-library-scraper-reliable,atlasdata/google-ads-transparency-scraper-reliable,atlasdata/linkedin-ad-library-scraper-reliable,atlasdata/tiktok-ad-library-scraper-reliable
Each entry in tools= is one scraper. Remove the ones you do not need; fewer tools keep the assistant's context small.
Step 2: Connect your client
Claude Desktop (OAuth): Settings → Connectors → Add custom connector, name it Atlas Data Ads, paste the URL and sign in to Apify when asked.
Cursor: add this to ~/.cursor/mcp.json. With OAuth the URL is enough; to use a token, add the header and keep the token in your environment:
{
"mcpServers": {
"atlas-data-ads": {
"url": "https://mcp.apify.com/?tools=atlasdata/facebook-ad-library-scraper-reliable,atlasdata/google-ads-transparency-scraper-reliable,atlasdata/linkedin-ad-library-scraper-reliable,atlasdata/tiktok-ad-library-scraper-reliable",
"headers": { "Authorization": "Bearer ${env:APIFY_TOKEN}" }
}
}
}
Claude Code:
claude mcp add --transport http atlas-data-ads \
"https://mcp.apify.com/?tools=atlasdata/facebook-ad-library-scraper-reliable,atlasdata/google-ads-transparency-scraper-reliable,atlasdata/linkedin-ad-library-scraper-reliable,atlasdata/tiktok-ad-library-scraper-reliable" \
--header "Authorization: Bearer $APIFY_TOKEN"
Configs for VS Code and for clients that only speak stdio (via mcp-remote) are in the atlas-data-mcp repository.
After connecting, the client should list four atlasdata--… tools plus Apify's helpers (get-actor-run, get-dataset-items, get-key-value-store-record, abort-actor-run) for paging through large results.
Step 3: Ask
Prompts that map well onto the tools:
- "Get the active Facebook and Instagram ads for Allbirds in the US. Group them by landing page and list the calls to action."
- "Which Google ads has hubspot.com run in Germany since 1 September? Split them by format (text, image, video)."
- "Pull Notion's LinkedIn ads from the last 30 days and summarise the offers and target audiences."
- "Find TikTok ads mentioning protein bar in France and list the advertisers and landing pages."
- "Compare the messaging of Pleo, Spendesk and Payhawk across their Meta and LinkedIn ads."
The assistant reads each tool's input schema through MCP and fills in fields such as searchTerms, country, activeStatus and maxAdsPerSearch on its own. Asking for a small number of ads first ("get 20 ads") keeps runs quick and cheap.
What comes back
A Meta ad from a real run (search allbirds, US, active ads; trimmed):
{
"pageName": "Allbirds",
"adLibraryUrl": "https://www.facebook.com/ads/library/?id=1664440795196274",
"isActive": true,
"startDate": "2026-10-27",
"publisherPlatforms": ["facebook", "instagram", "audience_network", "threads"],
"displayFormat": "VIDEO",
"title": "Men's Dasher NZ",
"bodyText": "Lightweight, breathable comfort for busy days and spontaneous plans. The Men's Dasher NZ.",
"ctaText": "Shop now",
"linkUrl": "https://www.allbirds.com/products/mens-dasher-nz-natural-black"
}
Records also carry image and video URLs, daysRunning, page details, and, where Meta publishes them (for example EU and political ads), reach, impressions and spend ranges.
The other tools return comparable records: Google ads with format, first and last shown dates, countries and EU impression ranges; LinkedIn ads with copy, CTA, landing URL and, for EU ads, impressions and targeting; TikTok ads with video, text and reach, plus landing page, CTA and targeting when details are requested.
What it costs
| Tool | Per ad | Per run start |
|---|---|---|
| Facebook / Meta Ad Library | $0.0005 ($0.50 / 1,000) | $0.002 |
| Google Ads Transparency | $0.0015 ($1.50 / 1,000) | $0.003 |
| LinkedIn Ad Library | $0.0008, $0.0015 with details | $0.0025 |
| TikTok Ad Library | $0.0004, $0.0015 with details | $0.001 per GB of memory |
A question that pulls 50 ads from each of the four libraries (with LinkedIn details) costs about $0.20. If an agent runs unattended, set a monthly usage limit in Apify Console.
Limits worth knowing
- The libraries only show what the platforms publish. Google publishes impressions only for EU/EEA ads; TikTok's library only covers the EU/EEA, UK, Switzerland and Turkey; LinkedIn's targeting and impression data are EU-only.
- Name searches can match several advertisers. If the assistant picks the wrong one, give it the domain (Google), the Facebook page URL (Meta) or the company page (LinkedIn).
- The assistant summarises what it fetched. For anything you will present to a client, open the
adLibraryUrllinks and check.
Without an assistant
The same scrapers can be called from code or scheduled in Apify Console. See How to track a competitor's TikTok and Google ads for a weekly tracker, and Track a competitor's ads on Google, LinkedIn and TikTok with Python for a Python version.
The four tools on the Apify Store: Facebook Ads Library Scraper · Google Ads Transparency Scraper · LinkedIn Ads Library Scraper · TikTok Ads Library Scraper.