Meta Ad Library ads for a keyword
crawl4ai.meta-ads.library.searchThe ads the Meta Ad Library (Facebook, Instagram, Messenger) shows for a keyword search, one row per ad: advertiser page, dates, platforms, text, link, button, media, cards, and spend and impressions for political ads. `query` is the search text; `country` is ALL or two letters (US, GB, DE); `active_status` is active or all; `limit` up to 100. A view shows up to 30 ads; below `limit`, the recipe adds the search split by media type (4 more fetches, not in the Library's order). No login. 2-8 s; if Facebook refuses our address, a residential exit (3-10 s), then a browser: 20-45 s, up to 10 units. Columns: ad_archive_id, ad_url, page_id, page_name, page_url, page_likes, is_active, start_date, end_date, platforms, display_format, title, body, link_url, link_caption, cta, cta_type, images, videos, cards, same_creative_ads, impressions, spend, currency, paid_for_by.
- Price
- $0.00165/successAt provider cost
- Success rate
- —No success-rate data yetNo success-rate data yet
- Latency p50
- ——
- Last verified
- Oct 11, 2026Verified working
POSThttps://toolswitch.dev/v1/tools/crawl4ai.meta-ads.library.searchPreview- Uses platform quota
- Synchronous response
- Reads public data
Parameters
This tool has no parameters. See provider docs ↗ Provider docs
Code samples
Replace $TOOLSWITCH_KEY with the key you created in the console.
curl -X POST 'https://toolswitch.dev/v1/tools/crawl4ai.meta-ads.library.search' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
-H "Content-Type: application/json" \
--data-raw '{"query":"running shoes"}'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/crawl4ai.meta-ads.library.search",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("{\"query\":\"running shoes\"}"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/crawl4ai.meta-ads.library.search", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
"Content-Type": "application/json",
},
body: JSON.stringify(JSON.parse("{\"query\":\"running shoes\"}")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());This gateway API is in preview; its URL and authentication may change. The example parameters are sample data. Calls are billed at $0.00165/success, including the service fee.