Advertisers
按名称在 Meta 广告资料库中查找广告主,每个广告主都带有 ads 作为 advertiser 接受的 id。
GET | POST /v1/meta-ads/advertisers参数可以用 GET 的查询字符串发送,也可以用 POST 的 JSON 正文发送,两者等效。
请求
curl "https://gateway.apinoa.com/v1/meta-ads/advertisers?query=nike" \
-H "x-api-key: $APINOA_API_KEY"传入内容
| 传入 | 读取内容 | 说明 |
|---|---|---|
query | 按名称查找广告主 | 广告主或品牌名称,就像在广告资料库搜索框中输入的那样 |
country 和 adType 与在 ads 中一样用于缩小搜索范围。
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
query | string | 是 | An advertiser's name (or part of it): the advertisers the Ad Library's search box suggests, each with the id that ads?advertiser= takes. |
adType | enum | all (default), or one special category: political (social issues, elections or politics), housing, employment, credit. all political housing employment credit | |
country | string | Where the ads ran: an ISO 3166-1 alpha-2 code, or ALL (default). |
这些参数及所有响应类型也写在OpenAPI 文档中。
响应
在 data 中返回 AdvertiserPage。 真实响应的节选:数组只保留前几项,长文本已截断。
{
"success": true,
"data": {
"library": "meta-ads",
"items": [
{
"library": "meta-ads",
"id": "15087023444",
"url": "https://www.facebook.com/nike",
"name": "Nike",
"avatarUrl": "https://scontent-lga3-1.xx.fbcdn.net/v/t39.30808-1/284964043_10159903868…",
"verified": true,
"ext": {
"handle": "nike",
"category": "Sportswear Store",
"likes": 39488470,
"verification": "BLUE_VERIFIED",
"entityType": "PERSON_PROFILE",
"igUsername": "nike",
"igFollowers": 290733139,
"igVerified": true,
"deleted": false
}
},
{
"library": "meta-ads",
"id": "51212153078",
"url": "https://www.facebook.com/nikefootball",
"name": "Nike Football",
"avatarUrl": "https://scontent-lga3-3.xx.fbcdn.net/v/t39.30808-1/387181570_86332575516…",
"verified": true,
"ext": {
"handle": "nikefootball",
"category": "Product/service",
"likes": 39922622,
"verification": "BLUE_VERIFIED",
"entityType": "PERSON_PROFILE",
"igUsername": "nikefootball",
"igFollowers": 44677977,
"igVerified": true,
"deleted": false
}
}
],
"ext": {
"keywords": [
"nike jordan",
"nike for kids"
],
"exactPhrase": "\"nike\""
}
}
}错误
| 状态 | 代码 | 含义 |
|---|---|---|
| 400 | INVALID_PARAMS | 参数缺失、未知或超出范围。消息中会指出是哪一个。 |
| 401 | UNAUTHORIZED | 缺少 x-api-key 请求头,或密钥已吊销或未知。 |
| 402 | INSUFFICIENT_CREDITS | 积分不足以支付本次调用。请在控制台选择套餐或充值。 |
| 429 | MARKETPLACE_SATURATED | 并发调用过多。请等待 Retry-After 秒后重试。 |
| 502 | UPSTREAM_ERROR | 资料库返回了无法使用的内容。请退避后重试。 |
全部错误代码见 Errors。失败的调用不计费。
价格
价格 每次调用 1 积分。套餐与积分
说明
- 每次最多返回 15 个广告主,顺序与广告资料库的建议一致。没有匹配的名称时
items为空。 - 广告主即 Facebook 主页。
id是ads作为advertiser接受的值;country是主页的注册国家(广告资料库有说明时)。 - 每个广告主的
ext包含只有 Meta 给出的信息:handle(主页的用户名)、category、likes、verification、entityType、关联的 Instagram 账号(igUsername、igFollowers、igVerified)和deleted。响应本身的ext含搜索框的关键词建议和查询的精确短语形式。