Sourcelane

Meta Ad Library Scraper

Ad Intelligence

Operated by Sourcelane✓ verified

Scrapes the Meta (Facebook & Instagram) Ad Library to retrieve every matching ad for keywords, advertiser pages, or Ad Library URLs and returns one record per ad containing publisher identity and page metadata, active/inactive status and run dates, ad copy elements (headlines, body text, captions, call-to-action text and types, landing page URLs), creative assets (image and video CDN URLs, HD/SD video links, preview images, carousel cards, display format), distribution metadata (publisher platforms and variant counts), timing metrics (total active time and run duration), and political/issue ad attributes (spend ranges, currency, reach estimates, impressions ranges, disclaimers and bylines). Technical features include direct scraping of the public Ad Library without login or a developer account, support for queries by keyword, advertiser page or Ad Library URL (with URL-embedded filters honored), country/platform/media/status/language/date filtering, pagination through large result sets reported by the Ad Library, and generation of signed creative URLs that expire after a short period.

Verified Sep 28, 3:55 AM

$0.0008

per ad

Up to 100 per call. Only pay for results returned; failed calls are refunded.

What people use it for

Trust & reliability

7d uptime trend
WindowUptimeSuccess ratep50p95Calls
24h————0
7d————0
30d————0

Calling contract

Call it through Sourcelane's gateway or MCP server. We run the connector, apply your agent's spend guardrails, and bill only the results returned.

Call it via Sourcelane

curl -X POST https://api.usesourcelane.com/v1/call \
  -H "Authorization: Bearer sl_live_your_agent_key" \
  -H "Content-Type: application/json" \
  -d '{"listing":"meta-ad-library-scraper","params":{"keywords":["lululemon"],"maxAdsPerQuery":5},"maxResults":10}'

Request params

FieldTypeRequiredDescription
keywordsarrayoptionalSearch the Ad Library by keyword or phrase (e.g. 'protein powder', 'lululemon'). Each keyword is a separate search.
pageIdsarrayoptionalNumeric Facebook page IDs to pull every ad from (find it in the Ad Library URL as view_all_page_id=...). Use this to scrape all ads for a specific competitor.
adLibraryUrlsarrayoptionalPaste full facebook.com/ads/library URLs. Keyword (q=), page (view_all_page_id=), country, status, media type and date filters embedded in the URL are honoured.
countrystringoptional2-letter country code the ads were shown in (US, GB, AU, DE,...) or ALL for worldwide.
adActiveStatusstringoptionalOnly currently running ads, only ended ads, or both.
mediaTypestringoptionalFilter by creative format. 'Meme' is Meta's name for image ads with text overlaid.
adTypestringoptionalAll ads, or only political and social-issue ads (these include spend and impression ranges).
searchTypestringoptionalHow keywords are matched against ad text (keyword searches only).
sortBystringoptionalOrder results by estimated impressions (most-seen ads first) or by most recent.
languagestringoptionalOptional 2-letter language code to filter ad text (EN, ES, FR, DE,...). Leave empty for all languages.
startDatestringoptionalOnly ads that started running on or after this date, YYYY-MM-DD. Leave empty for no lower bound.
endDatestringoptionalOnly ads that started running on or before this date, YYYY-MM-DD. Leave empty for no upper bound.
maxAdsPerQueryintegeroptionalMaximum ads to return for each keyword, page ID or URL. Set 0 for no limit (the connector pages through the whole result set). Capped at 100 per call.

Each result contains

FieldTypeDescription
querystringQuery
queryTypestringQuery Type
adArchiveIdstringAd Archive Id
adLibraryUrlstringAd Library Url
isActivebooleanIs Active
startDatestringStart Date
endDatestringEnd Date
totalActiveTimeSecondsnullTotal Active Time Seconds
pageIdstringPage Id
pageNamestringPage Name
pageProfileUrlstringPage Profile Url
pageProfilePictureUrlstringPage Profile Picture Url
pageLikeCountinteger—
pageCategoriesarray—
publisherPlatformsarray—
displayFormatstring—
titlenull—
bodystring—
captionstring—
linkUrlstring—
linkDescriptionnull—
ctaTextstring—
ctaTypestring—
imagesarray—
videosarray—
cardsarray—
extraTextsarray—
extraLinksarray—
collationCountinteger—
collationIdstring—
spendnull—
currencynull—
reachEstimatenull—
impressionsnull—
countryIsoCodenull—
disclaimernull—
bylinenull—
instagramActorNamenull—
isAaaEligibleboolean—
scrapedAtstring—

Use Meta Ad Library Scraper from Claude, ChatGPT or Cursor

Pick your tool and connect in under a minute. Then just ask — for example: “What ads is Shein running right now on Meta and Google? Group them by offer.”

Connect Claude

Web, desktop and mobile. Paste one URL.

  1. 1Copy your personal connector URL
  2. 2In Claude open Settings → Connectors → Add custom connector
  3. 3Paste the URL and click Add — done
Manual setup (config files, REST, Python) +

Claude Code

Adds the Sourcelane MCP server with your key as a header.

terminal
claude mcp add --transport http sourcelane https://api.usesourcelane.com/mcp \
  --header "Authorization: Bearer sl_live_your_agent_key"

Claude Desktop (config file)

Alternative to the connector URL: add to claude_desktop_config.json, then restart Claude.

claude_desktop_config.json
{
  "mcpServers": {
    "sourcelane": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.usesourcelane.com/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer sl_live_your_agent_key"
      }
    }
  }
}

Cursor & Windsurf

Add to ~/.cursor/mcp.json (or Windsurf's mcp_config.json).

mcp.json
{
  "mcpServers": {
    "sourcelane": {
      "url": "https://api.usesourcelane.com/mcp",
      "headers": {
        "Authorization": "Bearer sl_live_your_agent_key"
      }
    }
  }
}

VS Code

Save as .vscode/mcp.json. VS Code prompts for your key once.

.vscode/mcp.json
{
  "servers": {
    "sourcelane": {
      "type": "http",
      "url": "https://api.usesourcelane.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:sourcelane-key}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "sourcelane-key",
      "description": "Sourcelane agent key",
      "password": true
    }
  ]
}

ChatGPT Custom GPT (Actions)

Create a GPT → Actions → Import from URL, then Authentication: API Key, Bearer.

OpenAPI schema URL
https://usesourcelane.com/openapi.json

REST

One POST. Pass maxResults to cap cost.

curl
curl -X POST https://api.usesourcelane.com/v1/call \
  -H "Authorization: Bearer sl_live_your_agent_key" \
  -H "Content-Type: application/json" \
  -d '{"listing":"meta-ad-library-scraper","params":{"keywords":["lululemon"],"maxAdsPerQuery":5},"maxResults":10}'

Python, LangChain, CrewAI, OpenAI Agents SDK…

Wrap the REST call as a tool, or point an MCP client at the endpoint.

python
import requests

res = requests.post(
    "https://api.usesourcelane.com/v1/call",
    headers={"Authorization": "Bearer sl_live_your_agent_key"},
    json={
        "listing": "meta-ad-library-scraper",
        "params": {"keywords":["lululemon"],"maxAdsPerQuery":5},
        "maxResults": 10,
    },
    timeout=300,
)
body = res.json()
print(body["receipt"]["chargedMicros"], "micro-USD for", body["receipt"]["results"], "results")
print(body["data"])

Reviews

—

0 reviews

5
0
4
0
3
0
2
0
1
0

Leave a review

Loading reviews…