Search Facebook ad library ads by keyword
scrapecreators.x.v1-facebook-adlibrary-search-adsSearches the Meta Ad Library by keyword and returns matching ads.
- 价格
- $0.00188/call按供应商原价
- 成功率
- —暂无成功率数据暂无成功率数据
- 延迟 p50
- ——
- 最后验证
- —尚未验证
GEThttps://toolswitch.dev/v1/tools/scrapecreators.x.v1-facebook-adlibrary-search-ads?query=running预览- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
sort_by is order-only: ranking by total_impressions does not mean the response carries verified spend or impression counts. Search may return a non-null collation_count that is null on scrapecreators.x.v1-facebook-adlibrary-ad detail for the same ad — grouping semantics differ between search and detail; do not treat collation_count as creative-variant or budget counts.
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 查询参数 | ||||
trim | 布尔 | 可选 | Set to true for a trimmed down version of the response | false |
query | 字符串 | 必填 | Keyword to search for | running |
cursor | 字符串 | 可选 | Cursor to paginate through results | AQHRYLVDkoMkvGv7yK1rcce-vJmKiKv330R4v3j9KHSOaYvmF1bq1QkotG0rgW8Fkrj- |
status | 字符串 | 可选 | Status of the ad. Defaults to ACTIVE. | ACTIVE |
ad_type | 字符串 | 可选 | Search for all ads or only political and issue ads | all |
country | 字符串 | 可选 | This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL. | ALL |
sort_by | 字符串 | 可选 | Order only. One of: total_impressions | relevancy_monthly_grouped. Defaults to impressions ranking (total_impressions). Controls result ORDER, not verified performance — does not guarantee non-null spend, impressions_text, or a positive impressions_index. Those fields are often null / -1 for commercial ads and are not verified performance metrics. | total_impressions |
end_date | 字符串 | 可选 | Impressions end date. Needs to be in YYYY-MM-DD format. | 2025-02-16 |
media_type | 字符串 | 可选 | Media type of the ad. Defaults to ALL. Meme just means the ad has text and an image. No clue why they call it meme. | ALL |
start_date | 字符串 | 可选 | Impressions start date. Needs to be in YYYY-MM-DD format. | 2025-01-05 |
search_type | 字符串 | 可选 | If you want to search by exact phrase or not | keyword_unordered |
- 查询参数
trim布尔可选Set to true for a trimmed down version of the response
示例:
falsequery字符串必填Keyword to search for
示例:
runningcursor字符串可选Cursor to paginate through results
示例:
AQHRYLVDkoMkvGv7yK1rcce-vJmKiKv330R4v3j9KHSOaYvmF1bq1QkotG0rgW8Fkrj-status字符串可选Status of the ad. Defaults to ACTIVE.
示例:
ACTIVEad_type字符串可选Search for all ads or only political and issue ads
示例:
allcountry字符串可选This can only be one country. It has to be the 2 letter code for the country. It defaults to ALL.
示例:
ALLsort_by字符串可选Order only. One of: total_impressions | relevancy_monthly_grouped. Defaults to impressions ranking (total_impressions). Controls result ORDER, not verified performance — does not guarantee non-null spend, impressions_text, or a positive impressions_index. Those fields are often null / -1 for commercial ads and are not verified performance metrics.
示例:
total_impressionsend_date字符串可选Impressions end date. Needs to be in YYYY-MM-DD format.
示例:
2025-02-16media_type字符串可选Media type of the ad. Defaults to ALL. Meme just means the ad has text and an image. No clue why they call it meme.
示例:
ALLstart_date字符串可选Impressions start date. Needs to be in YYYY-MM-DD format.
示例:
2025-01-05search_type字符串可选If you want to search by exact phrase or not
示例:
keyword_unordered
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
curl -X GET 'https://toolswitch.dev/v1/tools/scrapecreators.x.v1-facebook-adlibrary-search-ads?query=running' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/scrapecreators.x.v1-facebook-adlibrary-search-ads?query=running",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/scrapecreators.x.v1-facebook-adlibrary-search-ads?query=running", {
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());网关接口为预览版,地址与鉴权方式可能调整。 示例参数仅为样例数据。 调用按 $0.00188/call 计费,已含服务费。