Apinoa Docs

Ad

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

查看原始 .mdx
GET | POST /v1/google-ads/ad

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

请求

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

传入内容

传入读取说明
id + advertiser该广告广告 id(CR…)及其广告主 id(AR…)
仅 id该广告广告的透明度中心 URL(…/advertiser/AR…/creative/CR…)

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

参数

参数类型必填说明
advertiserstringThe advertiser id (AR…) that ran the ad; not needed with the ad's URL.
countrystringThe 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.
idstringThe ad's id (CR…) with advertiser, or the ad's Transparency Center URL (…/advertiser/AR…/creative/CR…).
includestring listcontent: 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.
politicalbooleanRead the ad from the political ads report (as ads?political=true lists it).

这些参数及所有响应类型也写在OpenAPI 文档中。

响应

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

{
  "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"
        }
      }
    }
  }
}

错误

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

所有错误码见错误。失败的调用不计费。

价格

价格 每次调用 1 积分,每多一次调用加 1 积分——最多再加 10 次,合计最多 11 积分。套餐与积分

说明

  • 一个 Ad:Ads API 中每个广告库返回的都是同一种记录。只有透明度中心提供的信息在 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 中。

本页内容