---
title: "Ad"
description: "Google 广告透明度中心中一条广告的完整信息：所有版本、投放地点、定向、出资方，以及可选的广告文字。"
---

> 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/google-ads/ad
```

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

## 请求

```bash tab="cURL"
curl "https://gateway.apinoa.com/v1/google-ads/ad?advertiser=AR16735076323512287233&id=CR01003845904182018049&country=DE&include=content" \
  -H "x-api-key: $APINOA_API_KEY"
```

```js tab="JavaScript"
const params = new URLSearchParams({ advertiser: "AR16735076323512287233", id: "CR01003845904182018049", country: "DE", include: "content" });
const res = await fetch(`https://gateway.apinoa.com/v1/google-ads/ad?${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/google-ads/ad",
    params={"advertiser": "AR16735076323512287233", "id": "CR01003845904182018049", "country": "DE", "include": "content"},
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## 传入内容

| 传入 | 读取 | 说明 |
|---|---|---|
| `id` + `advertiser` | 该广告 | 广告 id（`CR…`）及其广告主 id（`AR…`） |
| 仅 `id` | 该广告 | 广告的透明度中心 URL（`…/advertiser/AR…/creative/CR…`） |

`country` 决定返回哪些国家/地区，若广告在欧盟投放，还决定其展示次数；未传时使用 URL 中的地区，否则为全部地区。

## 参数

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `advertiser` | string |  | The advertiser id (AR…) that ran the ad; not needed with the ad's URL. |
| `country` | string |  | The country to read the ad for: it decides which countries come back, and in the EU their impressions. Default: the URL's region, else anywhere. |
| `id` | string |  | The ad's id (CR…) with `advertiser`, or the ad's Transparency Center URL (…/advertiser/AR…/creative/CR…). |
| `include` | string list |  | content: also read each version's preview — the ad's text and pictures as it shows them, in `cards`. Best-effort: one unit per preview read; a preview that cannot be read is not billed and the ad is still returned. |
| `political` | boolean |  | Read the ad from the political ads report (as `ads?political=true` lists it). |

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

## 响应

在 `data` 中返回 `Ad`。 真实响应的精简版：数组只保留前几项，长文本已截断。

```json
{
  "success": true,
  "data": {
    "library": "google-ads",
    "id": "CR01003845904182018049",
    "url": "https://adstransparency.google.com/advertiser/AR16735076323512287233/cre…",
    "advertiser": {
      "id": "AR16735076323512287233",
      "url": "https://adstransparency.google.com/advertiser/AR16735076323512287233?reg…"
    },
    "paidBy": "Nike, Inc.",
    "format": "IMAGE",
    "lastShownAt": "2026-11-25T14:07:30.000Z",
    "images": [],
    "videos": [],
    "cards": [
      {
        "text": "FC Barcelona 2026/27 Stadium Home Nike Men's Dri-FIT Soccer Replica Jers…",
        "ext": {
          "previewUrl": "https://displayads-formats.googleusercontent.com/ads/preview/content.js?…",
          "contentImages": [
            "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcTloVQt6GPLNB8OEv…"
          ],
          "contentMeta": {
            "creativeType": 38,
            "seedType": 37,
            "variationType": 53,
            "width": 154,
            "height": 305
          }
        }
      }
    ],
    "categories": [
      "Apparel & Accessories"
    ],
    "countries": [
      {
        "country": "NL",
        "impressions": {
          "lower": 0,
          "upper": 1000
        },
        "lastShownAt": "2024-08-09",
        "ext": {
          "firstShownAfterEpochDate": "2023-03-10",
          "platforms": [
            {
              "platform": "shopping",
              "impressions": {
                "lower": 0,
                "upper": 1000
              }
            }
          ]
        }
      },
      {
        "country": "PL",
        "impressions": {
          "lower": 0,
          "upper": 1000
        },
        "lastShownAt": "2024-08-05",
        "ext": {
          "firstShownAfterEpochDate": "2023-03-25",
          "platforms": [
            {
              "platform": "shopping",
              "impressions": {
                "lower": 0,
                "upper": 1000
              }
            }
          ]
        }
      }
    ],
    "ext": {
      "category": {
        "googleProductCategory": {
          "categoryId": 166,
          "categoryName": "Apparel & Accessories"
        },
        "source": 2
      },
      "previewUrl": "https://displayads-formats.googleusercontent.com/ads/preview/content.js?…",
      "targeting": {
        "categories": {
          "demographics": {
            "included": true,
            "excluded": false
          },
          "geography": {
            "included": true,
            "excluded": false
          },
          "contextual": {
            "included": false,
            "excluded": false
          }
        }
      },
      "eea": {
        "impressions": {
          "lower": 3000,
          "upper": 4000
        },
        "lastShownAt": "2024-08-27",
        "platforms": [
          {
            "platform": "shopping",
            "impressions": {
              "lower": 2000,
              "upper": 3000
            }
          }
        ],
        "ext": {
          "firstShownAfterEpochDate": "2023-03-01"
        }
      }
    }
  }
}
```

## 错误

| 状态 | 错误码 | 含义 |
|---|---|---|
| 400 | `INVALID_PARAMS` | 参数缺失、未知或超出范围。消息中会指出是哪一个。 |
| 401 | `UNAUTHORIZED` | 缺少 `x-api-key` 请求头，或密钥已吊销或未知。 |
| 402 | `INSUFFICIENT_CREDITS` | 积分不足以支付本次调用。请在控制台选择套餐或充值。 |
| 404 | `NOT_FOUND` | 广告透明度中心中不存在该广告。 |
| 429 | `MARKETPLACE_SATURATED` | 并发调用过多。请等待 `Retry-After` 秒后重试。 |
| 502 | `UPSTREAM_ERROR` | 平台返回了无法使用的内容。请退避后重试。 |

所有错误码见[错误](/docs/errors)。失败的调用不计费。

## 价格

**Price** 1 credit per call, plus 1 credit for each extra call it makes — at most 10 more, so 11 credits in total. [Plans and credits](https://apinoa.com/en/pricing).

## 说明

- 一个 `Ad`：[Ads API](/docs/api-reference/ads/response-schema) 中每个广告库返回的都是同一种记录。只有透明度中心提供的信息在 `ext` 中。
- `cards` 是该广告的所有版本：存档图片（`image`，含尺寸）或预览（`ext.previewUrl`）。
- `countries` 列出广告的投放国家/地区及最后一次在该地展示的日期。在欧盟投放的广告（以欧盟 `country` 读取时）和政治广告，每项还带有以范围给出的展示次数，有说明时按 Google 平台细分在 `ext.platforms` 中；`ext.eea` 和 `ext.us` 给出合计。
- `ext.targeting` 说明欧盟广告使用了哪些定向类型（人口统计、地理、上下文等），以及政治广告的地域条件。`paidBy` 是出资方，`categories` 是 Google 对广告推广内容的分类；Google 标记为合成媒体的广告带有 `aiGenerated`。
- `include=content` 还会读取每个预览：卡片的 `text` 是预览显示的文字（按顺序每段一行；预览本身显示的占位符如 `<Open Hours>` 会保留），`ext.contentImages` 是其加载的图片。每读取一个预览计 1 个单位。无法读取的预览会被省略且不计费，广告仍会返回。广告图片（`image`）不会被识别为文字。
- 透明度中心不公开视频文件，因此 `videos` 为空；视频广告的预览在 `ext.previewUrl` 中。
