# 怎麼在 Google 廣告透明中心列出某個品牌的全部廣告

> 在 Google 廣告透明中心查到品牌的廣告主 ID，再一頁頁列出它在搜尋、YouTube、展示網路上的廣告：id 和 domain 怎麼選，格式和國家篩選，程式碼和費用。

網頁版：https://okdata.online/zh-hant/guides/google-ads-transparency-advertiser-ads/

先用 Google 廣告透明中心廣告主搜尋找到廣告主，再用 Google 廣告主的廣告翻頁列出它的廣告。下面的示例一共 5 次呼叫，花費 $0.02；請求到了平台的呼叫，返回為空、查不到或出錯也照常計費。

更新於 2026-11-12

要做的事：想看某個品牌在 Google 上都投了什麼，覆蓋搜尋、YouTube、展示網路、購物、地圖和 Play，以及每條廣告是什麼時候線上的。透明中心網站只能一條條點開看。先把品牌名換成 Google 的廣告主 ID，再一頁頁列出它的廣告。最後得到一張廣告表，每條有格式、預覽圖、首次和最近展示時間，以及回到透明中心的連結。

不需要 Google 帳號，也不用登入 Google Ads。每次呼叫就是帶著 key 發一個 HTTPS 請求。

## 分步操作

### 第一步：找到廣告主 ID

呼叫[Google 廣告透明中心廣告主搜尋](https://okdata.online/zh/apis/google/advertisers/search/)，`query` 填品牌名，`country` 可選（ISO 國家程式碼，預設 `US`）。一次呼叫最多返回 10 個匹配的廣告主，每次 $0.004，每個有：

- `id`：廣告主 ID，`AR` 後面跟 20 位數字。
- `name`：Google 驗證過的名稱，常常是付錢的公司主體，不一定是你熟悉的品牌名。
- `region`：註冊所在的國家或地區。
- `ads`：透明中心估計的廣告數量。

```bash
curl -G "https://api.okdata.online/v1/google/advertisers/search" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'query=Kettle & Pine' \
  -d country=US
```

同名的結果出現好幾行很常見：一個名稱可能對應多個廣告主 ID，有的註冊在不同地區，有的根本是不相干的公司。挑 `region` 和 `ads` 估計值都對得上的那一行，第一次用時開啟它的 `url` 核對一下。這個介面沒有第二頁，結果不對就換個更準確的查詢詞。

### 第二步：列出廣告

呼叫[Google 廣告主的廣告](https://okdata.online/zh/apis/google/advertisers/ads/list/)，傳 `id`（第一步拿到的）或 `domain`（品牌官網域名，比如 `kettleandpine.com`），二選一。兩個都給或都不給會返回 `invalid_params`，不扣費。

- **`id`**：只返回這一個已驗證廣告主的廣告。
- **`domain`**：可以跳過第一步，返回指向這個網站的廣告。其中可能混有其他廣告主，比如經銷商或代理在推同一個網站，所以要逐行看 `advertiser.name`。

兩個篩選引數：`country`（只看在這個國家展示過的廣告；不填為全部）和 `format`（預設 `all`，可選 `text`、`image`、`video`）。一次呼叫最多返回 40 條廣告，每次 $0.004。每條廣告有 `id`（素材 ID，`CR` 後面跟 20 位數字）、`url`、`advertiser`（`id` 和 `name`）、`format`、預覽圖 `images`、`first_shown_at` 和 `last_shown_at`。

```bash
curl -G "https://api.okdata.online/v1/google/advertisers/ads/list" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  -d id=AR09284716350029384715 -d country=US -d format=video
```

要下一頁，就把 `page.next_cursor` 原樣作為 `cursor` 傳回去，直到 `page.has_more` 為 `false`。

### 第三步：用 Python 寫

```python
import collections
import csv
import os
import requests

API = "https://api.okdata.online"
HEADERS = {"Authorization": f"Bearer {os.environ['OKDATA_API_KEY']}"}
MAX_PAGES = 4  # 每頁一次呼叫


def get(path, **params):
    body = requests.get(API + path, headers=HEADERS, params=params, timeout=60).json()
    if body["code"] != "ok":
        raise RuntimeError(f"{body['code']}: {body['message']} (charged: {body['charged']})")
    return body


found = get("/v1/google/advertisers/search", query="Kettle & Pine", country="US")["data"]["items"]
advertiser = max(found, key=lambda a: a["ads"] or 0)  # 第一次跑時人工核對一下選得對不對

ads, cursor = [], None
for _ in range(MAX_PAGES):
    body = get("/v1/google/advertisers/ads/list", id=advertiser["id"], country="US", format="video", **({"cursor": cursor} if cursor else {}))
    ads += body["data"]["items"]
    if not body["page"]["has_more"]:
        break
    cursor = body["page"]["next_cursor"]

with open("google_ads.csv", "w", newline="", encoding="utf-8") as f:
    out = csv.writer(f)
    out.writerow(["creative_id", "advertiser", "format", "first_shown", "last_shown", "preview", "url"])
    for a in ads:
        out.writerow([a["id"], a["advertiser"]["name"], a["format"], a["first_shown_at"], a["last_shown_at"], (a["images"] or [""])[0], a["url"]])

by_month = collections.Counter((a["first_shown_at"] or "")[:7] for a in ads)
print(advertiser["name"], len(ads), "ads;", "new per month:", sorted(by_month.items()))
```

## 注意事項

- **列表裡沒有的欄位。** 標題、落地頁、行動按鈕、投放位置、影片檔案、是否在投和觸達人數都為 null，並在 `meta.unavailable` 裡註明。`text` 通常是空的：很多廣告（包括文字廣告）只以渲染好的預覽圖展示，文案就在圖裡。用視覺模型或 OCR 讀一遍 `images` 就能把文案取回來。
- **有的廣告沒有預覽圖。** 透明中心沒有預覽的素材，`images` 為 null。
- **沒有花費和曝光。** 透明中心不公佈商業廣告的這兩項資料。
- **沒有按渠道篩選。** 不能直接按搜尋、YouTube 或展示網路篩。文字廣告大多是搜尋廣告，影片廣告大多在 YouTube，所以 `format` 是最接近的替代辦法。
- **額外欄位。** `view=full` 會加上 `ext.domain`，即這條廣告對應的網站。
- **重發同一個請求不重複扣費。** 每次呼叫帶一個 `Idempotency-Key` 請求頭；24 小時內同樣的請求配同樣的 key，會拿回存好的結果，不再扣費。平台出錯後的重試算一次新呼叫，照常計費。

完整的匯出流程和每個缺口的說明，見[怎麼把 Google 廣告透明中心裡競品的廣告匯出來](https://okdata.online/zh/answers/export-google-ads-transparency-center/)。還想同時看這個品牌在 Meta 和 TikTok 上的廣告，看[怎麼查競品在三個廣告庫裡的廣告](https://okdata.online/zh/answers/competitor-ads-meta-google-tiktok/)。

## 示例花費

搜一次某廚具品牌的廣告主，再取它在美國展示過的影片廣告共 4 頁

| 介面 | 呼叫次數 | 單價 | 小計 |
|---|---|---|---|
| [Google 廣告透明中心廣告主搜尋](https://okdata.online/zh/apis/google/advertisers/search/) | 1 | $0.004 | $0.004 |
| [Google 廣告主的廣告](https://okdata.online/zh/apis/google/advertisers/ads/list/) | 4 | $0.004 | $0.016 |
| 合計 | 5 |  | $0.02 |

按本頁生成時的價格計算。請求到了平台的呼叫，返回為空或出錯也照常計費。

## 在你的 AI 裡用（MCP）

先接好 MCP 服務，然後直接說你要什麼。智慧體會自己找到這些介面、看清價格，再用你的餘額呼叫。

可以這樣說：在 Google 廣告透明中心找美國的 Kettle & Pine 這個品牌對應的廣告主，再列出它在美國展示過的影片廣告，取 4 頁，帶格式、首次和最近展示時間、預覽圖。哪幾個月上新廣告最多？

```json
{
  "endpoint": "google.advertisers.search",
  "params": {
    "query": "Stanley"
  },
  "idempotency_key": "<新的 UUID>"
}
```

MCP：`https://api.okdata.online/mcp`

## 本指南用到的介面

- [Google 廣告透明中心廣告主搜尋](https://okdata.online/zh/apis/google/advertisers/search/) `google.advertisers.search`：$0.004/次 · 每頁約 10 個廣告主
- [Google 廣告主的廣告](https://okdata.online/zh/apis/google/advertisers/ads/list/) `google.advertisers.ads.list`：$0.004/次 · 每頁約 40 條廣告

## 更多Google內容

- [Google API](https://okdata.online/zh/apis/google/)
- [怎麼在 Google 廣告透明中心列出某個品牌的全部廣告](https://okdata.online/zh/guides/google-ads-transparency-advertiser-ads/)
- [怎麼一次看全競品在 Meta、Google 和 TikTok 上投的廣告？](https://okdata.online/zh/answers/competitor-ads-meta-google-tiktok/)
- [怎麼把 Google 廣告透明中心裡競品的廣告匯出來？](https://okdata.online/zh/answers/export-google-ads-transparency-center/)
- [Google 廣告透明中心的廣告主 ID（AR 開頭）是什麼？](https://okdata.online/zh/answers/google-ads-advertiser-id/)
- [廣告主廣告列表介面](https://okdata.online/zh/roles/advertisers-ads-list/)
