---
title: "Ads"
description: "按关键词搜索 TikTok 广告资料库，或列出某个广告主在欧盟、英国等资料库覆盖的国家投放的全部广告。"
---

> 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/tiktok-ads/ads
```

参数可以用 `GET` 的查询字符串发送，也可以用 `POST` 的 JSON 请求体发送，两者等价。

## 请求

```bash tab="cURL"
curl "https://gateway.apinoa.com/v1/tiktok-ads/ads?advertiserName=NIKE%20Retail%20B.V.&advertiser=6876453864464188162&country=DE" \
  -H "x-api-key: $APINOA_API_KEY"
```

```js tab="JavaScript"
const params = new URLSearchParams({ advertiserName: "NIKE Retail B.V.", advertiser: "6876453864464188162", country: "DE" });
const res = await fetch(`https://gateway.apinoa.com/v1/tiktok-ads/ads?${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/tiktok-ads/ads",
    params={"advertiserName": "NIKE Retail B.V.", "advertiser": "6876453864464188162", "country": "DE"},
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## 传入内容

| 传入 | 读取内容 | 说明 |
|---|---|---|
| `query` | 匹配关键词的广告 | |
| `advertiserName` | 某个广告主投放的全部广告 | [`advertisers`](/docs/api-reference/tiktok-ads/advertisers) 返回的名称；同时传入 `advertiser`（其 id）可跳过查找 |

传入 `query` 或 `advertiserName`，以及 `country`：以下之一：AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, IS, LI, NO, CH, GB, TR, BR。资料库覆盖在欧盟和欧洲经济区、瑞士、英国、土耳其和巴西展示的广告，不覆盖美国。筛选条件（`startDate`、`endDate`、`sort`、`order`、`status`）两者都可搭配使用。

## 参数

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `advertiser` | string |  | With `advertiserName`: the advertiser's id (`advertisers` and an ad's `advertiser.id` give it), which saves the name lookup. A comma list where the library lists several. |
| `advertiserName` | string |  | Every ad one advertiser ran: its name exactly as `advertisers` lists it. |
| `country` | enum |  | Where the ads were shown (required): one of AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, IS, LI, NO, CH, GB, TR, BR — the EU, the EEA, Switzerland, the UK, Turkey and Brazil (not the US), which is what the library covers. `AT` `BE` `BG` `HR` `CY` `CZ` `DK` `EE` `FI` `FR` `DE` `GR` `HU` `IE` `IT` `LV` `LT` `LU` `MT` `NL` `PL` `PT` `RO` `SK` `SI` `ES` `SE` `IS` `LI` `NO` `CH` `GB` `TR` `BR` |
| `cursor` | string |  | Opaque cursor from the previous page's `cursor`. Pass it alone for the next page. |
| `endDate` | string |  | Last day shown, YYYY-MM-DD (default: today). |
| `order` | enum |  | desc (default) or asc. `desc` `asc` |
| `query` | string |  | Keywords to search the library's ads for. |
| `sort` | enum |  | Order: the day last shown (default), creation, or impressions. `lastShown` `created` `impressions` |
| `startDate` | string |  | First day shown, YYYY-MM-DD (default: 30 days before `endDate`). |
| `status` | enum |  | all ads (default), or only those still running. `all` `active` |

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

## 响应

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

```json
{
  "success": true,
  "data": {
    "library": "tiktok-ads",
    "items": [
      {
        "library": "tiktok-ads",
        "id": "1882724572699761",
        "url": "https://library.tiktok.com/ads/detail/?ad_id=1882724572699761",
        "advertiser": {
          "name": "NIKE Retail B.V."
        },
        "images": [],
        "videos": [
          {
            "url": "https://library.tiktok.com/api/v1/cdn/1795662568/video/aHR0cHM6Ly92MTZtLnRpa3Rva…",
            "coverUrl": "https://p16-common-sign.tiktokcdn.com/tos-useast2a-p-0037-euttp/oIP9EXaIYbgzE0ZC…"
          }
        ],
        "cards": [],
        "firstShownAt": "2026-11-24T00:00:00.000Z",
        "lastShownAt": "2026-11-24T00:00:00.000Z",
        "reach": {
          "text": "100K-200K",
          "lower": 100000,
          "upper": 200000
        },
        "ext": {
          "audit_status": "1",
          "type": "2",
          "spent": "",
          "impression": 0,
          "show_mode": 1,
          "rejection_info": null,
          "sor_audit_status": "1"
        }
      }
    ],
    "cursor": "dERsZAXeOKHmah7cEuTr7TborJxvm1ZkC31Xm_ImwWtV6floyr3ypouSoI4TEDeGpJKZHrwiQqgmYBj7…",
    "total": 16528
  }
}
```

## 错误

| 状态 | 代码 | 含义 |
|---|---|---|
| 400 | `INVALID_CURSOR` | 该 `cursor` 不是本操作返回的。请不带它重新开始。 |
| 400 | `INVALID_PARAMS` | 参数缺失、未知或超出范围。消息中会指出是哪一个。 |
| 401 | `UNAUTHORIZED` | 缺少 `x-api-key` 请求头，或密钥已吊销或未知。 |
| 402 | `INSUFFICIENT_CREDITS` | 积分不足以支付本次调用。请在控制台选择套餐或充值。 |
| 404 | `NOT_FOUND` | 资料库中没有该名称的广告主。消息中会列出资料库给出的名称。 |
| 429 | `MARKETPLACE_SATURATED` | 并发调用过多。请等待 `Retry-After` 秒后重试。 |
| 502 | `UPSTREAM_ERROR` | 平台返回了无法使用的内容。请退避后重试。 |
| 503 | `SERVICE_UNAVAILABLE` | 临时故障。请退避后重试。 |

全部错误代码见 [Errors](/docs/errors)。失败的调用不计费。

## 价格

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

## 说明

- `advertiser` 是广告主的 `id`，需与 `advertiserName` 一起传入：TikTok 资料库按名称和 id 一起查找广告主。两者都由 `advertisers` 返回。
- `total` 是匹配的广告数，与资料库所示一致。关键词搜索最多计到 5,000，达到上限时改为返回 `totalRange`（`lower`: 5000）。广告主的广告会完整计数。
- `startDate` 和 `endDate` 是广告展示期间的日期（`YYYY-MM-DD`）；不传时为最近 30 天。
- `reach` 是广告触达的独立用户数范围，包含 TikTok 显示的文本（`100K-200K`）以及从中读取的上下限。
- 出资方、链接、各国展示量和定向信息请用 [`ad`](/docs/api-reference/tiktok-ads/ad) 读取。
- 只有 TikTok 提供的信息（审核代码、展示相关字段）以资料库原名放在 `ext` 中。
- 要获取下一页，只传 `cursor`。
