---
title: "Advertisers"
description: "按名称在 Meta 广告资料库中查找广告主，每个广告主都带有 ads 作为 advertiser 接受的 id。"
---

> Every apinoa docs page as markdown: https://apinoa.com/llms.txt (all in one file: https://apinoa.com/llms-full.txt; this API family in one file: https://apinoa.com/docs/ads/llms.txt)

```http
GET | POST /v1/meta-ads/advertisers
```

参数可以用 `GET` 的查询字符串发送，也可以用 `POST` 的 JSON 正文发送，两者等效。

## 请求

```bash tab="cURL"
curl "https://gateway.apinoa.com/v1/meta-ads/advertisers?query=nike" \
  -H "x-api-key: $APINOA_API_KEY"
```

```js tab="JavaScript"
const params = new URLSearchParams({ query: "nike" });
const res = await fetch(`https://gateway.apinoa.com/v1/meta-ads/advertisers?${params}`, {
  headers: { "x-api-key": process.env.APINOA_API_KEY },
});
const { success, data, error } = await res.json();
```

```python tab="Python"
import os

import requests

res = requests.get(
    "https://gateway.apinoa.com/v1/meta-ads/advertisers",
    params={"query": "nike"},
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## 传入内容

| 传入 | 读取内容 | 说明 |
|---|---|---|
| `query` | 按名称查找广告主 | 广告主或品牌名称，就像在广告资料库搜索框中输入的那样 |

`country` 和 `adType` 与在 `ads` 中一样用于缩小搜索范围。

## 参数

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `query` | string | yes | 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). |

The same parameters, and every response type, are in the OpenAPI document: https://apinoa.com/openapi.json

## 响应

在 `data` 中返回 [`AdvertiserPage`](/docs/api-reference/ads/response-schema#advertiserpage)。 真实响应的节选：数组只保留前几项，长文本已截断。

```json
{
  "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](/docs/errors)。失败的调用不计费。

## 价格

**Price** 1 credit per call. [Plans and credits](https://apinoa.com/en/pricing).

## 说明

- 每次最多返回 15 个广告主，顺序与广告资料库的建议一致。没有匹配的名称时 `items` 为空。
- 广告主即 Facebook 主页。`id` 是 [`ads`](/docs/api-reference/meta-ads/ads) 作为 `advertiser` 接受的值；`country` 是主页的注册国家（广告资料库有说明时）。
- 每个广告主的 `ext` 包含只有 Meta 给出的信息：`handle`（主页的用户名）、`category`、`likes`、`verification`、`entityType`、关联的 Instagram 账号（`igUsername`、`igFollowers`、`igVerified`）和 `deleted`。响应本身的 `ext` 含搜索框的关键词建议和查询的精确短语形式。
