Search the Meta ad library by keyword
meta-ad-library.meta-ads.library.searchSearch publicly running Facebook and Instagram ads by keyword
- 价格
- free按目录价
- 成功率
- —暂无成功率数据暂无成功率数据
- 延迟 p50
- ——
- 最后验证
- —尚未验证
GEThttps://toolswitch.dev/v1/tools/meta-ad-library.meta-ads.library.searchBeta- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
give it either search_terms or search_page_ids — a call with neither returns an error, not the whole library. ad_snapshot_url is the human-viewable render of the creative and needs the access token appended to load. Results are ads Meta has KEPT: commercial ads leave the library some time after they stop running, so this is a live-ish view, not an archive
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 查询参数 | ||||
after | 字符串 | 可选 | paging.cursors.after from the previous response | |
limit | 整数 | 可选 | page size; 25 by default, a few hundred is the practical ceiling before Meta starts timing out | 25 |
fields | 字符串 | 必填 | comma-separated; nothing but id comes back by default | id,page_id,page_name,ad_creative_bodies,ad_creative_link_titles,ad_creative_link_captions,ad_snapshot_url,ad_delivery_start_time,ad_delivery_stop_time,publisher_platforms,languages,estimated_audience_size |
ad_type | 字符串 | 可选 | ALL (default) | POLITICAL_AND_ISSUE_ADS | HOUSING_ADS | EMPLOYMENT_ADS | FINANCIAL_PRODUCTS_AND_SERVICES_ADS | ALL |
languages | 数组 | 可选 | ISO 639-1 codes (plus CMN, YUE) | ["en"] |
media_type | 字符串 | 可选 | ALL | IMAGE | MEME | VIDEO | NONE | VIDEO |
search_type | 字符串 | 可选 | KEYWORD_UNORDERED (default, all words in any order) | KEYWORD_EXACT_PHRASE | KEYWORD_UNORDERED |
search_terms | 字符串 | 可选 | max 100 characters; matched against the ad's text. Required in practice unless you filter by search_page_ids instead | project management software |
ad_active_status | 字符串 | 可选 | ACTIVE (default) | INACTIVE | ALL — ALL is what you want for creative research, since a competitor's best-performing ad may have finished | ALL |
publisher_platforms | 数组 | 可选 | FACEBOOK | INSTAGRAM | AUDIENCE_NETWORK | MESSENGER | WHATSAPP | OCULUS | THREADS | ["INSTAGRAM"] |
ad_delivery_date_max | 字符串 | 可选 | YYYY-MM-DD | |
ad_delivery_date_min | 字符串 | 可选 | YYYY-MM-DD; ads that were delivering on or after this date | 2026-06-01 |
ad_reached_countries | 数组 | 必填 | REQUIRED on every ads_archive call. JSON array of ISO country codes, URL-encoded — ["US"] — or ALL | ["US"] |
estimated_audience_size_min | 整数 | 可选 | one of the fixed buckets 100 | 1000 | 5000 | 10000 | 50000 | 100000 | 500000 | 1000000 | |
- 查询参数
after字符串可选paging.cursors.after from the previous response
limit整数可选page size; 25 by default, a few hundred is the practical ceiling before Meta starts timing out
示例:
25fields字符串必填comma-separated; nothing but id comes back by default
示例:
id,page_id,page_name,ad_creative_bodies,ad_creative_link_titles,ad_creative_link_captions,ad_snapshot_url,ad_delivery_start_time,ad_delivery_stop_time,publisher_platforms,languages,estimated_audience_sizead_type字符串可选ALL (default) | POLITICAL_AND_ISSUE_ADS | HOUSING_ADS | EMPLOYMENT_ADS | FINANCIAL_PRODUCTS_AND_SERVICES_ADS
示例:
ALLlanguages数组可选ISO 639-1 codes (plus CMN, YUE)
示例:
["en"]media_type字符串可选ALL | IMAGE | MEME | VIDEO | NONE
示例:
VIDEOsearch_type字符串可选KEYWORD_UNORDERED (default, all words in any order) | KEYWORD_EXACT_PHRASE
示例:
KEYWORD_UNORDEREDsearch_terms字符串可选max 100 characters; matched against the ad's text. Required in practice unless you filter by search_page_ids instead
示例:
project management softwaread_active_status字符串可选ACTIVE (default) | INACTIVE | ALL — ALL is what you want for creative research, since a competitor's best-performing ad may have finished
示例:
ALLpublisher_platforms数组可选FACEBOOK | INSTAGRAM | AUDIENCE_NETWORK | MESSENGER | WHATSAPP | OCULUS | THREADS
示例:
["INSTAGRAM"]ad_delivery_date_max字符串可选YYYY-MM-DD
ad_delivery_date_min字符串可选YYYY-MM-DD; ads that were delivering on or after this date
示例:
2026-06-01ad_reached_countries数组必填REQUIRED on every ads_archive call. JSON array of ISO country codes, URL-encoded — ["US"] — or ALL
示例:
["US"]estimated_audience_size_min整数可选one of the fixed buckets 100 | 1000 | 5000 | 10000 | 50000 | 100000 | 500000 | 1000000
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
curl -X GET 'https://toolswitch.dev/v1/tools/meta-ad-library.meta-ads.library.search' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/meta-ad-library.meta-ads.library.search",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/meta-ad-library.meta-ads.library.search", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());网关接口为 Beta,地址与鉴权方式可能变更。 示例参数仅为样例数据。 调用按 free 计费,已含服务费。