Meta 广告搜索 API
按关键词搜 Meta 广告库(Facebook、Instagram 等)里的广告:广告主、文案、图片视频、落地页、投放起止日期和投放平台,每页 30 条。
| 项目 | 值 |
|---|---|
| 地址 | GET https://api.feedmcp.com/v1/meta/ads/search |
| ID | meta.ads.search |
| 价格 | $0.002 / 次 |
| 返回 | 一页 广告对象列表 |
| 认证 | Authorization: Bearer $FEEDMCP_API_KEY |
翻页游标大约一小时内有效,过期后从第一页重新搜(过期的游标会报错,不收费)。翻页时上游会去掉重复的广告,所以后面的页可能不满 30 条。动态商品广告(
format为 dpa)的标题和图片取自第一个商品。
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
keyword |
string | 是 | 搜索关键词 |
country |
string | 否 | 只看在这个国家投放的广告,两位国家代码,例如 US、GB、DE;不传就是全部国家 |
status |
active / inactive / all |
否 | active 正在投放、inactive 已停止、all 全部,默认 active |
media |
all / image / video |
否 | 素材类型:all、image 图片、video 视频,默认 all |
sort |
impressions / newest |
否 | impressions 按展示量从高到低,newest 最新,默认 impressions |
cursor |
string | 否 | 翻页游标。第一页不传;下一页传上一页返回的 page.next_cursor。每一页单独计费 |
所有接口还支持 view=full:在返回里附上平台的原始数据(raw),价格不变。
返回字段
data.items 是一组「广告」对象,所有平台字段相同:
| 字段 | 类型 | 说明 |
|---|---|---|
id |
string | 广告 ID,可以直接传给这个广告库的详情接口:Meta 是广告库 ID,Google 是「AR…/CR…」,LinkedIn 和 TikTok 是数字 ID |
platform |
string | 广告库:meta、google、linkedin、tiktok |
url |
string | null | 广告在广告库里的链接 |
advertiser.id |
string | null | 广告主 ID:Meta 是 Facebook 主页 ID,Google 是 AR 开头的 ID,可以直接传给广告主的广告列表 |
advertiser.name |
string | null | 广告主名字 |
format |
string | null | 广告格式,例如 image、video、text、dpa(动态商品广告)、Carousel Ad |
headline |
string | null | 标题 |
text |
string | null | 正文文案 |
cta |
string | null | 按钮文字,例如 Shop now |
landing_url |
string | null | 落地页 |
images |
string[] | 图片地址 |
videos |
string[] | 视频地址 |
first_shown |
string | null | 开始投放的时间,ISO 8601,UTC |
last_shown |
string | null | 最近一次投放的时间(还在投放的广告是今天) |
active |
boolean | null | 是否还在投放(只有 Meta) |
placements |
string[] | 投放位置(只有 Meta):facebook、instagram、messenger、threads、audience_network |
countries |
string[] | 投放的国家,两位代码(平台公开时才有) |
impressions |
{min, max} | null | 展示量区间(平台公开时才有;TikTok 是触达人数区间) |
paid_by |
string | null | 出资方(LinkedIn,以及 Meta 的政治广告) |
什么时候扣费
成功调用一次 $0.002,空结果也算一次(搜索的空结果也是答案)。参数错误、平台出错、超时都不收费。
每次返回的 meta.billing 里写着这次扣了多少、还剩多少余额。
调用示例
cURL
curl "https://api.feedmcp.com/v1/meta/ads/search?keyword=camping+tent" \
-H "Authorization: Bearer $FEEDMCP_API_KEY"
Python
import os, requests
r = requests.get(
"https://api.feedmcp.com/v1/meta/ads/search",
params={"keyword": "camping tent"},
headers={"Authorization": f"Bearer {os.environ['FEEDMCP_API_KEY']}"},
timeout=30,
)
print(r.json())
JavaScript
const res = await fetch("https://api.feedmcp.com/v1/meta/ads/search?keyword=camping+tent", {
headers: { Authorization: `Bearer ${process.env.FEEDMCP_API_KEY}` },
});
console.log(await res.json());
MCP
在装好 FeedMCP 的 AI 里,调用 call 工具:
{
"endpoint": "meta.ads.search",
"params": {
"keyword": "camping tent"
},
"max_price": "0.002"
}
返回示例
示例数据是虚构的,格式和真实返回一致。
{
"code": "ok",
"request_id": "req_7Qm2kXb9TzLp",
"data": {
"items": [
{
"id": "1193112469566051",
"platform": "meta",
"url": "https://www.facebook.com/ads/library/?id=1193112469566051",
"advertiser": {
"id": "22437985072",
"name": "Trail Outfitters",
"avatar": "https://scontent.xx.fbcdn.net/a.jpg",
"url": "https://www.facebook.com/trailoutfitters/"
},
"format": "image",
"headline": "Winter tents, 20% off 1",
"text": "Stay warm on the trail this winter.",
"cta": "Shop now",
"landing_url": "https://example.com/tents",
"images": [
"https://scontent.xx.fbcdn.net/ad.jpg"
],
"videos": [],
"first_shown": "2025-10-19T21:06:40.000Z",
"last_shown": "2025-11-18T21:06:40.000Z",
"active": true,
"placements": [
"facebook",
"instagram"
],
"countries": [],
"impressions": null,
"paid_by": null
},
{
"id": "1193112469566052",
"platform": "meta",
"url": "https://www.facebook.com/ads/library/?id=1193112469566052",
"advertiser": {
"id": "22437985072",
"name": "Trail Outfitters",
"avatar": "https://scontent.xx.fbcdn.net/a.jpg",
"url": "https://www.facebook.com/trailoutfitters/"
},
"format": "image",
"headline": "Winter tents, 20% off 2",
"text": "Stay warm on the trail this winter.",
"cta": "Shop now",
"landing_url": "https://example.com/tents",
"images": [
"https://scontent.xx.fbcdn.net/ad.jpg"
],
"videos": [],
"first_shown": "2025-10-19T21:06:40.000Z",
"last_shown": "2025-11-18T21:06:40.000Z",
"active": true,
"placements": [
"facebook",
"instagram"
],
"countries": [],
"impressions": null,
"paid_by": null
}
]
},
"page": {
"next_cursor": "eyJjdXJzb3IiOjIwfQ",
"has_more": true
},
"warnings": [],
"meta": {
"endpoint": "meta.ads.search",
"platform": "meta",
"fetched_at": "2026-11-19T08:00:00.000Z",
"source": "FeedMCP",
"catalog_revision": "d09a736bd39e8b3f",
"billing": {
"charged": true,
"amount": "0.002",
"currency": "USD",
"balance": "9.98"
}
}
}
出错时的格式见 错误码:每个错误都写明扣没扣钱(charged)和能不能重试(retry)。
Meta 广告库的其他接口
- Meta 广告主的广告:$0.002
- Meta 广告详情:$0.002
- Meta 广告主搜索:$0.002
- Meta 广告视频字幕:$0.002
常见问题
Meta 广告搜索接口多少钱?
成功调用一次 $0.002,空结果也算一次(搜索的空结果也是答案)。参数错误、平台出错、超时都不收费。
需要平台账号吗?
不需要,只取公开数据。
ID 或链接怎么找?
广告用广告库链接里 id= 后面的数字;广告主用 Facebook 主页的数字 ID(广告里的 advertiser.id,或者用广告主搜索找)。
怎么取更多条?
返回里有 page.next_cursor 时,把它作为 cursor 参数传回来取下一页。每一页单独计费。
怎么在 AI 里用?
装好 MCP 后直接说你要什么,AI 会调用 meta.ads.search。