构建响应

您的应用处理来自 Google 的出价请求后,必须构建并发送响应。本指南介绍了如何编写应用代码以构建响应。

创建 Protobuf BidResponse 消息

Authorized Buyers 会将 BidRequest 作为 HTTP POST 的消息正文发送出去。如果您的出价端点配置为使用 protobuf 格式,您的应用必须发送一个响应,其中 Content-Type 标头设置为 application/octet-stream,并且消息正文由序列化协议缓冲区组成。协议缓冲区是 openrtb.proto 中定义的 BidResponse 消息。您的应用必须针对每个 BidRequest 返回可解析的 BidResponse。超时和无法解析的响应会被视为错误,Google 会对错误率较高的出价方进行节流。

如果您不想对展示出价,则必须返回空的 HTTP 204 响应。您可以从参考数据页面获取 openrtb.proto

广告素材 ID

您的 BidResponse 通过 BidResponse.seatbid.bid.crid 字段(限制为 64 字节)指定广告素材。即使是类似的广告素材,如果在任何显著特征(包括但不限于尺寸、声明的网址、广告素材属性和供应商类型)方面存在差异,也必须为此字段提供不同的值。换句话说,如果有任何两个广告满足以下条件,您就必须为其指定不同的广告素材 ID:

  • 外观或行为有所不同。
  • 渲染到不同的图片。
  • 以不同的方式呈现(例如,一个广告由图片组成,另一个广告则是视频)。

在设计应用时,您应确定一种系统的标识符生成方法,该方法应适用于您计划提交的广告素材类型。

广告属性

Google 建议您声明广告素材属性,以便使用 BidResponse.seatbid.bid.apisBidResponse.seatbid.bid.attr 的组合或 BidResponse.seatbid.bid.ext.attribute 扩展来描述广告的特性和定位条件。以下内容介绍了如何声明属性:

  • VPAID
    BidResponse.seatbid.bid.apis 设置为 VPAID_1VPAID_2。对于 JSON 格式,此值可以分别设置为 12
  • MRAID
    BidResponse.seatbid.bid.apis 设置为 MRAID_1,或将其设置为 3(对于 JSON 格式)。
  • SIZELESS
    BidResponse.seatbid.bid.attr 设置为 RESPONSIVE,或将其设置为 18(JSON 格式)。
  • PLAYABLE
    这通过将 BidResponse.seatbid.bid.attr 设置为 USER_INTERACTIVE13(对于 JSON 格式)来指明。

如需了解如何获取有关广告素材检测到的属性的反馈,请参阅 Creatives 资源

公开出价字段

参与公开出价的广告交易平台和广告联盟出价方发送的出价响应与参与标准实时出价的 Authorized Buyers 买方发送的出价响应类似。公开出价客户可以指定少量其他字段,并且一些现有字段可能有其他用途。其中包括:

OpenRTB Authorized Buyers 详细信息
BidResponse.imp[].pmp.deals[].id BidResponse.ad[].adslot[].exchange_deal_id

广告交易平台命名空间中的交易 ID,与此出价相关联并报告给发布商。

BidResponse.seatbid[].bid[].ext.exchange_deal_type BidResponse.ad[].adslot[].exchange_deal_type

向发布商报告的交易类型,会影响交易在竞价中的处理方式。

BidResponse.seatbid[].bid[].ext.third_party_buyer_token BidResponse.ad[].adslot[].third_party_buyer_token 如果作为公开出价方参与竞价的广告交易平台充当中介,则此令牌用于识别最终第三方买方信息。此值从第三方买方处获取,必须在出价响应中保持不变,以便传递给 Google。

建议

  • 在服务器上启用持久性 HTTPS 连接(也称为“保持连接”或“连接重复使用”)。将超时时间至少设置为 10 秒;在许多情况下,设置更高的值会很有帮助。Google 会在应用的初始延迟时间测试期间验证这一点,因为 Authorized Buyers 会以较高的速率发送请求,并且需要避免为每个请求建立单独的 TCP 连接而产生的延迟时间开销。
  • 添加可选的展示跟踪网址,以跟踪展示何时呈现,而不是出价方何时胜出。由于胜出和呈现之间存在流失,因此这样可以获得更准确的跟踪统计信息。

  • 请确保出价方代码不依赖于已废弃的字段,因为这可能会导致出价失败并出现错误。
  • BidResponse 中添加 BidResponse.seatbid.bid.wBidResponse.seatbid.bid.h。如果请求包含多个广告尺寸,则对该请求的 BidResponse 必须包含这些字段,否则将从竞价中移除。
  • 将响应大小限制在 8 KB 以下。非常大的响应可能会增加网络延迟时间并导致超时。
  • 请遵循针对需要 SKAdNetwork 归因的 iOS 广告资源出价的准则

出价响应示例

以下示例展示了 Protobuf 和 JSON 请求的可读取示例。

序列化响应
id: "9u09jhHJXT2fbaDZ9V1x66"
seatbid {
  bid {
    id: "37Td8Gbw1Lr8161bA4B"
    impid: "1"
    price: 0.075
    adm: "<iframe marginwidth=0 marginheight=0 height=600 frameborder=0 width=160 scrolling=no src=\"https://test.com/ads?id=123456&curl=%%CLICK_URL_ESC%%&wprice=%%WINNING_PRICE_ESC%%\"></iframe>"
    adomain: "google.com"
    adomain: "google.com"
    crid: "test_creative_id_156129"
    cat: "IAB22"
    w: 320
    h: 50
    language: "es"
    slotinpod: SLOT_POSITION_POD_ANY
    cattax: IAB_CONTENT_1_0
    [com.google.doubleclick.bid] {
      impression_tracking_url: "https://test.com/impression?id=123456"
      exchange_deal_type: OPEN_AUCTION
      event_notification_token {
        payload: "token"
      }
      billing_id: 61560909063
    }
  }
  seat: "4778:9251:780612"
}
cur: "USD"
{
  "id": "9u09jhHJXT2fbaDZ9V1x66",
  "seatbid": [
    {
      "bid": [
        {
          "id": "37Td8Gbw1Lr8161bA4B",
          "impid": "1",
          "price": 0.075,
          "adm": "<iframe marginwidth=0 marginheight=0 height=600 frameborder=0 width=160 scrolling=no src=\"https://test.com/ads?id=123456&curl=%%CLICK_URL_ESC%%&wprice=%%WINNING_PRICE_ESC%%\"></iframe>",
          "adomain": [
            "google.com",
            "google.com"
          ],
          "crid": "test_creative_id_156129",
          "cat": [
            "IAB22"
          ],
          "w": 320,
          "h": 50,
          "language": "es",
          "slotinpod": 0,
          "cattax": 1,
          "ext": {
            "impression_tracking_url": [
              "https://test.com/impression?id=123456"
            ],
            "exchange_deal_type": 0,
            "event_notification_token": {
              "payload": "token"
            },
            "billing_id": "61560909063"
          }
        }
      ],
      "seat": "4778:9251:780612"
    }
  ],
  "cur": "USD"
}
序列化响应
ad {
  html_snippet: "<iframe marginwidth=0 marginheight=0 height=600 frameborder=0 width=160 scrolling=no src=\"https://test.com/ads?id=123456&curl=%%CLICK_URL_ESC%%&wprice=%%WINNING_PRICE_ESC%%\"></iframe>"
  adslot {
    id: 1
    max_cpm_micros: 226722
    billing_id: 78614473201
    currency: "USD"
  }
  click_through_url: "google.com"
  attribute: 105
  buyer_creative_id: "test_creative_id_827359"
  width: 336
  height: 280
  impression_tracking_url: "https://test.com/imp?id=123456"
  event_notification_token: "token"
}

重要提示:示例中所述的 Protobuf 消息在此处以人类可读的文本表示。不过,消息并非以这种方式通过线路发送。使用 Google 或 OpenRTB Protobuf 格式时,系统只接受序列化的 BidResponse 消息。

您可以使用以下 C++ 代码创建和序列化 BidResponse 消息:

BidResponse bid_response;
// fill in bid response with bid information
string post_response;
if (bid_response.SerializeToString(&post_response)) {
  // respond to the POST with post_response as the content
} else {
  // return an error to the POST
}

指定广告素材

您的出价响应会指定在您的出价胜出时要投放的广告素材。您的出价必须包含一种受支持的广告格式(AMP、视频、原生)。在此示例中,我们使用 html_snippet 字段指定广告素材。

或者,您也可以根据广告格式,使用以下一个字段指定广告素材:

  • SDK 呈现的广告
    • BidResponse.seatbid.bid.ext.sdk_rendered_ad
  • AMP
    • BidResponse.seatbid.bid.amp_ad_url
  • 视频
    • BidResponse.seatbid.bid.adm
  • 原生广告
    • BidResponse.seatbid.bid.adm_native

BidResponse.seatbid.bid.adm 字段中使用 HTML 代码段指定托管在您自己的服务器上的广告。该代码段封装在插入网页中的 iFrame 中,以便在网页加载时检索和呈现广告。您必须精心制作 HTML 代码段,以便广告(横幅广告或插页式广告)在 iFrame 中正确呈现,并且尺寸与您要出价的广告位相称。

此外,在以下情况下,出价响应中声明的广告尺寸必须与出价请求中的某个尺寸组合完全一致:

  • 广告是常规横幅广告(而非视频广告、原生广告或插页式广告)。
  • 出价方已在出价响应中声明大小。每当请求中包含多个尺寸时,都必须声明尺寸。
  • 插页式广告是例外情况。对于插页式广告,宽度必须至少为屏幕宽度的 50%,高度至少为屏幕高度的 40%。

您可以使用任何能够正常呈现的有效 HTML 代码指定 HTML 代码段广告素材,但请注意创建 BidResponse 消息部分中对指定 crid 字段的限制。这类函数的一个用途是将额外信息放入在呈现广告时从服务器提取的网址的参数中。这样,您就可以将与展示相关的任意数据传回自己的服务器。

针对在出价响应中返回的 HTML 代码段的大多数政策与针对第三方广告的政策相同。如需了解详情,请参阅“已获授权的买方”计划准则第三方广告投放要求在广告中声明点击到达网址

指定宏

宏是嵌入到一些出价响应字段中的格式化文本,这些字段包含网址,这些网址会在广告投放时替换为相关值。例如,如果您的胜出出价在出价中包含的 HTML 代码段广告素材中包含 AUCTION_PRICE 宏,系统会将该宏替换为一个值,您可以对该值进行解密,以确定您在竞价中为该展示支付的金额。

您可以在以下字段中添加宏:

  • BidResponse.seatbid.bid.adm

    HTML 代码段、原生广告、视频网址和视频 VAST XML 格式支持宏。

  • BidResponse.seatbid.bid.adm_native.eventtrackers.url

  • BidResponse.seatbid.bid.adm_native.imptrackers

  • BidResponse.seatbid.bid.ext.amp_ad_url

    AMP 广告素材仅支持 Google 专用 WINNING_PRICEWINNING_PRICE_ESC 宏。

  • BidResponse.seatbid.bid.burl

  • BidResponse.seatbid.bid.ext.impression_tracking_url

    如果您需要多个结算网址,请使用此属性(而非 BidResponse.seatbid.bid.burl)。

例如,您可以通过在用于提取广告素材的网址中嵌入 ${MACRO},将宏作为 HTML 代码段的一部分包含在内,其中 MACROOpenRTB 规范中所述的受支持宏之一。

Google RTB 宏

除了 OpenRTB 规范中列出的宏之外,Google 还支持其他宏。这些宏的格式不同,如果嵌入到网址中,则会显示为 %%MACRO%%。下表介绍了这些宏:

说明
ADVERTISING_IDENTIFIER 允许买方在广告展示时接收 iOS IDFA 或 Android 的广告 ID。 如需了解详情,请参阅解密广告主标识符
CACHEBUSTER 随机无符号四字节整数的字符串表示法。
CLICK_URL_UNESC

广告的不转义点击后到达网址。在代码段中,第三方点击跟踪网址的转义版本应直接跟在宏后面。

例如,如果第三方点击跟踪网址为 http://my.adserver.com/some/path/handleclick?click=clk,则可以在宏调用后将以下代码与第三方点击跟踪网址的单重转义版本搭配使用:

<a href="%%CLICK_URL_UNESC%%http%3A%2F%2Fmy.adserver.com%2Fsome%2Fpath%2Fhandleclick%3Fclick%3Dclk"></a>

在广告投放时,此字段会展开为:

<a href="http://google-click-url?...&ad_url=http%3A%2F%2Fmy.adserver.com%2Fsome%2Fpath%2Fhandleclick%3Fclick%3Dclk"></a>

该网址会先向 Google 注册点击,然后重定向到第三方点击跟踪网址。

CLICK_URL_ESC

广告的转义点击后到达网址。如果您需要先将值传递到另一个随后会返回重定向的服务器,请使用此宏而非 CLICK_URL_UNESC

例如,您可以在 HTML 代码段中使用以下代码:

<a href="http://my.adserver.com/click?google_click_url=%%CLICK_URL_ESC%%"></a>

在广告投放时,此字段会展开为:

<a href="http://my.adserver.com/click?google_click_url=http://google-click- url%3F...%26ad_url%3D"></a>

这会向 my.adserver.com 注册点击,然后 my.adserver.com 将负责重定向到 google_click_url 参数中传递的网址。这假定 my.adserver.com 会对 google_click_url 参数进行转义。

您可以在 %%CLICK_URL_ESC%% 后面附加经过两次转义的网址。my.adserver.com 完成转义后,系统会将网址的单转义版本附加到 google_click_url。提取 google_click_url 后,它会再次转义,然后重定向。

CLICK_URL_ESC_ESC

广告的双重转义网址。如果您需要先将值传递到另一个随后会返回重定向的服务器,请使用此宏而非 CLICK_URL_UNESC

例如,您可以在 HTML 代码段中使用以下代码:

<a href="http://my.adserver.com/click?google_click_url=%%CLICK_URL_ESC_ESC%%"></a>

在广告投放时,此字段会展开为:

<a href="http://my.otheradserver.com/click?google_click_url=http%3A%2F%2Fmy.adserver.com%2Fclick%3Fgoogle_click_url%3Dhttp%3A%2F%2Fgoogle-click-%20url%253F...%2526ad_url%253D"></a>
SCHEME 如果出价请求不需要 SSL,则扩展为 http:;如果出价请求需要 SSL,则扩展为 https:
SITE 内容网址的域名,经过了网址转义;对于匿名广告资源,则为匿名 ID。
SITE_URL 已弃用。已被 SITE 宏取代,后者提供相同的功能。
TZ_OFFSET 时区偏移量。
VERIFICATION

在生产环境中和在验证流水线中扫描广告素材时,值不同。格式为:%%?VERIFICATION:true-val:false-val%%,其中 true-valfalse-val 可以使用宏以外的任何值,包括空字符串。对于公开出价,我们建议广告交易平台使用此宏;广告交易平台使用此宏后,需求方平台无需进行任何更改。

例如,如果广告素材包含 %%?VERIFICATION:-1:5000%%,则在投放时文本替换项将为 5000,在验证流水线中将为 -1。这是为了区分这两组 ping。

WINNING_PRICE

编码格式的展示费用(即 CPI,而不是每千次展示费用),以账号币种的百万分之一表示。例如,以 5 美元赢得的每千次展示费用出价相当于 5 百万个每千次展示费用出价宏,或者 5000 个 CPI 宏。在这种情况下,WINNING_PRICE 的解码值将为 5,000。胜出价格是以 CPI 指定的。

如需解析此宏,您需要实现一个用于解密价格确认的应用。如需了解详情,请参阅解密价格确认页面。

WINNING_PRICE_ESC 经过网址转义的 WINNING_PRICE

Google 要求您在第三方投放的广告的广告素材中使用 CLICK_URL_UNESCCLICK_URL_ESC 宏。Google 使用 CLICK_URL 宏进行点击跟踪。

宏中的网址转义使用以下方案:

  • 空格字符会被加号 (+) 替换。
  • 字母数字字符(0-9、a-z、A-Z)和集合 !()*,-./:_~ 中的字符保持不变。
  • 所有其他字符均替换为 %XX,其中 XX 是表示相应字符的十六进制数字。

发布商限制和要求

出价请求包含有关发布商在竞价中对广告素材施加的限制和要求的类型的信息。

  • BidRequest.bcat
    • 您可以将此字段指定的屏蔽类别与使用实时出价 API 的 detectedCategories 字段为您提交的广告素材检测到的类别进行比较。
  • BidRequest.imp.ext.allowed_vendor_type
  • BidRequest.imp.secure
    • 在实践中,此值始终会设为 true,因为 Google 要求所有广告素材都支持 SSL。
  • BidRequest.imp.{audio/banner/native/video}
  • BidRequest.imp.{audio/banner/native/video}.api
  • BidRequest.imp.{audio/banner/native/video}.battr
  • BidRequest.imp.{audio/banner/video}.mimes

切勿出价投放包含受限功能的广告。对于允许的功能(例如供应商类型),仅当广告的供应商类型在 BidRequest 中的 allowed_vendor_type 列表中时,才返回相应广告。只有通过填充 BidRequest.imp.banner 等字段在出价请求中指定的广告格式才应包含在出价中。如需了解详情,请参阅 BidRequest 协议缓冲区定义中对这些字段的注释。

如果 BidResponse 中返回了广告,您必须在 BidResponse 中准确设置 BidResponse.seatbid.bid.attrBidResponse.seatbid.bid.cat 以及 BidResponse.seatbid.bid.adomainBidResponse.seatbid.bid.adm_native.link.url 字段。如果广告对这些字段有多个适用值,则必须包含所有值。如需了解详情,请参阅 BidResponse 协议缓冲区定义中对这些字段的注释。系统会舍弃未设置这些字段的响应。

Open Measurement

借助 Open Measurement,您可以指定为投放到移动应用环境的广告提供独立衡量和验证服务的第三方供应商。

支持的广告格式包括视频广告、横幅广告和插页式广告。如需详细了解如何在包含这些格式的出价响应中使用 Open Measurement,请参阅 Open Measurement SDK 帮助中心文章。

出价响应示例

以下部分显示了不同广告类型的出价响应示例。

应用横幅广告

序列化响应
id: "8L85Di7e9374c3jriwo2W0"
seatbid {
  bid {
    id: "0L7hx7783rjD1hT81FH"
    impid: "1"
    price: 0.4000000059604645
    adm: "<iframe marginwidth=0 marginheight=0 height=600 frameborder=0 width=160 scrolling=no src=\"https://test.com/ads?id=123456&curl=%%CLICK_URL_ESC%%&wprice=%%WINNING_PRICE_ESC%%\"></iframe>"
    adomain: "google.com"
    crid: "test_creative_id_192654"
    w: 300
    h: 50
    burl: "https://test.com/imp?id=123456"
    [com.google.doubleclick.bid] {
      impression_tracking_url: "https://test.com/impression?id=123456"
      billing_id: 70614819650
      skadn {
        version: "3.0"
        network: "Y8HK1z22"
        campaign: "72382716"
        itunesitem: "953637916"
        sourceapp: "com.google.testapp"
        fidelities {
          fidelity: VIEW_THROUGH_ADS
          nonce: "bf105d9a-6df9-4d49-a10d-44e21a539415"
          timestamp: "1730359683568"
          signature: "589Vb2BJlF955D6kUj197D84U8UWWtngYQ73o1SVMEcAk6ju348j0454AOxpR74j95BF13RLC119Qo73nyq2qgp4IJENP6yE"
        }
        fidelities {
          fidelity: STOREKIT_RENDERED_ADS
          nonce: "bf105d9a-6df9-4d49-a10d-44e21a539415"
          timestamp: "1730359683568"
          signature: "3Av39t8684YefY03NT715Z2dTtXQ39pQH7C9aq6Wuh4WzbS044734J7FAlw7690Nm7743G7Z4P6hX8K7H607886b7FBHTCYY"
        }
        skadn_opts {
          always_open_appstore: true
        }
      }
      app_promotion_type: INSTALLS
    }
  }
  seat: "4095:5416:758587"
}
cur: "USD"
[com.google.doubleclick.bid_response] {
  processing_time_ms: 16
}
{
  "id": "8L85Di7e9374c3jriwo2W0",
  "seatbid": [
    {
      "bid": [
        {
          "id": "0L7hx7783rjD1hT81FH",
          "impid": "1",
          "price": 0.4000000059604645,
          "adm": "<iframe marginwidth=0 marginheight=0 height=600 frameborder=0 width=160 scrolling=no src=\"https://test.com/ads?id=123456&curl=%%CLICK_URL_ESC%%&wprice=%%WINNING_PRICE_ESC%%\"></iframe>",
          "adomain": [
            "google.com"
          ],
          "crid": "test_creative_id_192654",
          "w": 300,
          "h": 50,
          "burl": "https://test.com/imp?id=123456",
          "ext": {
            "impression_tracking_url": [
              "https://test.com/impression?id=123456"
            ],
            "billing_id": "70614819650",
            "skadn": {
              "version": "3.0",
              "network": "Y8HK1z22",
              "campaign": "72382716",
              "itunesitem": "953637916",
              "sourceapp": "com.google.testapp",
              "fidelities": [
                {
                  "fidelity": 0,
                  "nonce": "bf105d9a-6df9-4d49-a10d-44e21a539415",
                  "timestamp": "1730359683568",
                  "signature": "589Vb2BJlF955D6kUj197D84U8UWWtngYQ73o1SVMEcAk6ju348j0454AOxpR74j95BF13RLC119Qo73nyq2qgp4IJENP6yE"
                },
                {
                  "fidelity": 1,
                  "nonce": "bf105d9a-6df9-4d49-a10d-44e21a539415",
                  "timestamp": "1730359683568",
                  "signature": "3Av39t8684YefY03NT715Z2dTtXQ39pQH7C9aq6Wuh4WzbS044734J7FAlw7690Nm7743G7Z4P6hX8K7H607886b7FBHTCYY"
                }
              ],
              "skadn_opts": {
                "always_open_appstore": 1
              }
            },
            "app_promotion_type": 1
          }
        }
      ],
      "seat": "4095:5416:758587"
    }
  ],
  "cur": "USD",
  "ext": {
    "processing_time_ms": 16
  }
}
序列化响应
ad {
  html_snippet: "<iframe marginwidth=0 marginheight=0 height=600 frameborder=0 width=160 scrolling=no src=\"https://test.com/ads?id=123456&curl=%%CLICK_URL_ESC%%&wprice=%%WINNING_PRICE_ESC%%\"></iframe>"
  adslot {
    id: 1
    max_cpm_micros: 44095
    billing_id: 99718422589
  }
  click_through_url: "google.com"
  attribute: 47
  attribute: 50
  category: 7
  buyer_creative_id: "test_creative_id_997551"
  advertiser_name: "Google"
  width: 300
  height: 250
  impression_tracking_url: "https://test.com/imp?id=123456"
  skadn {
    version: "4.0"
    network: "DofiF4X5"
    itunesitem: "448730563"
    sourceapp: "195751234"
    fidelities {
      fidelity_type: VIEW_THROUGH_ADS
      nonce: "a869c155-3566-475c-8cb9-d0a75159e0c5"
      timestamp: 1728803273481
      signature: "0KXE97ri9xnW9M10NDg64r014MsN7SO5R11N29oe8h8Cuao3K477i9dFH61bKny28iA6337A6EK6T3fgR9p9EJK12qvaY96E"
    }
    fidelities {
      fidelity_type: STOREKIT_RENDERED_ADS
      nonce: "a869c155-3566-475c-8cb9-d0a75159e0c5"
      timestamp: 1728803273481
      signature: "EF1Vj82st371O79029Q9067AL00972U3NqNG9u295r8B4681c12Se2jk34XSR8404681c9WGa9a69779CQ87o9T81Y85198C"
    }
    source_identifier: 1
  }
  advertised_app_id: "APP_ID_OMITTED"
  app_promotion_type: INSTALLS
}
processing_time_ms: 13

应用插页式广告

序列化响应
id: "6700Z3L2o0zSw9g8IqmiQ5"
seatbid {
  bid {
    id: "0UBHDN63xQ8hj1F8184"
    impid: "1"
    price: 0.016728
    adid: "test_creative_id_179418"
    adm: "<iframe marginwidth=0 marginheight=0 height=600 frameborder=0 width=160 scrolling=no src=\"https://test.com/ads?id=123456&curl=%%CLICK_URL_ESC%%&wprice=%%WINNING_PRICE_ESC%%\"></iframe>"
    adomain: "google.com"
    crid: "test_creative_id_179418"
    cat: "IAB13-7"
    w: 300
    h: 600
    burl: "https://test.com/imp?id=123456"
    [com.google.doubleclick.bid] {
      billing_id: 14443955188
      dsa {
        behalf: "TEST_ADVERTISER"
        paid: "TEST_PAYING_ENTITY"
        adrender: false
      }
    }
  }
  seat: "2054:4176:757161"
  group: false
}
bidid: "TI590379-wi3Z9CU8-6j8V-Uj0l1I102h2q"
cur: "USD"
{
  "id": "6700Z3L2o0zSw9g8IqmiQ5",
  "seatbid": [
    {
      "bid": [
        {
          "id": "0UBHDN63xQ8hj1F8184",
          "impid": "1",
          "price": 0.016728,
          "adid": "test_creative_id_179418",
          "adm": "<iframe marginwidth=0 marginheight=0 height=600 frameborder=0 width=160 scrolling=no src=\"https://test.com/ads?id=123456&curl=%%CLICK_URL_ESC%%&wprice=%%WINNING_PRICE_ESC%%\"></iframe>",
          "adomain": [
            "google.com"
          ],
          "crid": "test_creative_id_179418",
          "cat": [
            "IAB13-7"
          ],
          "w": 300,
          "h": 600,
          "burl": "https://test.com/imp?id=123456",
          "ext": {
            "billing_id": "14443955188",
            "dsa": {
              "behalf": "TEST_ADVERTISER",
              "paid": "TEST_PAYING_ENTITY",
              "adrender": 0
            }
          }
        }
      ],
      "seat": "2054:4176:757161",
      "group": 0
    }
  ],
  "bidid": "TI590379-wi3Z9CU8-6j8V-Uj0l1I102h2q",
  "cur": "USD"
}
序列化响应
ad {
  html_snippet: "<iframe marginwidth=0 marginheight=0 height=600 frameborder=0 width=160 scrolling=no src=\"https://test.com/ads?id=123456&curl=%%CLICK_URL_ESC%%&wprice=%%WINNING_PRICE_ESC%%\"></iframe>"
  adslot {
    id: 1
    max_cpm_micros: 80117
    min_cpm_micros: 0
    billing_id: 12608068331
    deal_id: 0
  }
  click_through_url: "google.com"
  attribute: 47
  buyer_creative_id: "test_creative_id_266407"
  advertiser_name: "Google"
  width: 756
  height: 384
  impression_tracking_url: "https://test.com/imp?id=123456"
  event_notification_token: "token"
  dsa_transparency {
    buyer_render: true
  }
}
processing_time_ms: 11

应用插页式视频广告

序列化响应
id: "79N7F1708654i75q3k69j1"
seatbid {
  bid {
    id: "1gR655162hOsH9q3X6R"
    impid: "1"
    price: 2.3833
    adid: "test_creative_id_648299"
    adm: "https://video.test.com/ads?id=123456&wprice=%%WINNING_PRICE%%"
    adomain: "google.com"
    crid: "test_creative_id_648299"
    attr: VIDEO_IN_BANNER_AUTO_PLAY
    w: 1920
    h: 1080
    [com.google.doubleclick.bid] {
      event_notification_token {
        payload: "token"
      }
      billing_id: 11004606416
      skadn {
        version: "4.0"
        network: "O5O88B57"
        itunesitem: "509167749"
        nonce: ""
        sourceapp: "com.google.testapp"
        timestamp: "OMITTED"
        signature: "OMITTED"
        fidelities {
          fidelity: VIEW_THROUGH_ADS
          nonce: "d3be52b1-8ef6-4277-8922-54450b07fd5b"
          timestamp: "1730409097616"
          signature: "8d52E359K158Dj1u89EpLP3544Qz7B10CV0a92YZJ6JXX8d9uXi72N43ZxjRl96Ph7v8R5u1k5y9Aoy3jZcN3C5dxRU390qc"
        }
        fidelities {
          fidelity: STOREKIT_RENDERED_ADS
          nonce: "d3be52b1-8ef6-4277-8922-54450b07fd5b"
          timestamp: "1730409097616"
          signature: "43C2b79X4nPY913Qs3jJLLhCjUNZg39cK022pCE2wH731Ie7q4584b5UGG137Jh12I2R6a0e35LJbvQJbn5o564roQ7G1Mtd"
        }
        sourceidentifier: "1"
      }
      app_promotion_type: INSTALLS
    }
  }
  seat: "1061:9160:833989"
}
bidid: "m7V3rjn0-aF599ZZ6-37hA-b9o7DU8CLrtp"
cur: "USD"
{
  "id": "79N7F1708654i75q3k69j1",
  "seatbid": [
    {
      "bid": [
        {
          "id": "1gR655162hOsH9q3X6R",
          "impid": "1",
          "price": 2.3833,
          "adid": "test_creative_id_648299",
          "adm": "https://video.test.com/ads?id=123456&wprice=%%WINNING_PRICE%%",
          "adomain": [
            "google.com"
          ],
          "crid": "test_creative_id_648299",
          "attr": [
            6
          ],
          "w": 1920,
          "h": 1080,
          "ext": {
            "event_notification_token": {
              "payload": "token"
            },
            "billing_id": "11004606416",
            "skadn": {
              "version": "4.0",
              "network": "O5O88B57",
              "itunesitem": "509167749",
              "nonce": "",
              "sourceapp": "com.google.testapp",
              "timestamp": "OMITTED",
              "signature": "OMITTED",
              "fidelities": [
                {
                  "fidelity": 0,
                  "nonce": "d3be52b1-8ef6-4277-8922-54450b07fd5b",
                  "timestamp": "1730409097616",
                  "signature": "8d52E359K158Dj1u89EpLP3544Qz7B10CV0a92YZJ6JXX8d9uXi72N43ZxjRl96Ph7v8R5u1k5y9Aoy3jZcN3C5dxRU390qc"
                },
                {
                  "fidelity": 1,
                  "nonce": "d3be52b1-8ef6-4277-8922-54450b07fd5b",
                  "timestamp": "1730409097616",
                  "signature": "43C2b79X4nPY913Qs3jJLLhCjUNZg39cK022pCE2wH731Ie7q4584b5UGG137Jh12I2R6a0e35LJbvQJbn5o564roQ7G1Mtd"
                }
              ],
              "sourceidentifier": "1"
            },
            "app_promotion_type": 1
          }
        }
      ],
      "seat": "1061:9160:833989"
    }
  ],
  "bidid": "m7V3rjn0-aF599ZZ6-37hA-b9o7DU8CLrtp",
  "cur": "USD"
}
序列化响应
ad {
  adslot {
    id: 1
    max_cpm_micros: 2454000
    billing_id: 95400492935
    deal_id: 1
  }
  click_through_url: "google.com"
  attribute: 22
  attribute: 105
  buyer_creative_id: "test_creative_id_716344"
  width: 0
  height: 0
  video_vast_xml: "OMITTED_VAST_XML"
  event_notification_token: "token"
  skadn {
    version: "4.0"
    network: "113tdmXM"
    itunesitem: "460184775"
    sourceapp: "751592940"
    fidelities {
      fidelity_type: STOREKIT_RENDERED_ADS
      nonce: "1c3ed154-33f5-4cb7-960a-3e571cb9c3b9"
      timestamp: 1728932156118
      signature: "7m3PDLV778PZ741T2I3561kkCW3UjIp5p63989cP311iiZ2445v20HP5ymfD8ThYO7437h22075h4h9O21S8A08U1kw3qis2"
    }
    fidelities {
      fidelity_type: VIEW_THROUGH_ADS
      nonce: "1c3ed154-33f5-4cb7-960a-3e571cb9c3b9"
      timestamp: 1728932156118
      signature: "28X90AX01Z762a3W92186a40Eb4J8ekACsYFo55J8vD445f5pcA80MH45753Iy887596gK8ax0s55ndC23eg0V7P862yS240"
    }
    source_identifier: 1
  }
  advertised_app_id: "APP_ID_OMITTED"
  app_promotion_type: INSTALLS
}
processing_time_ms: 51

原生应用

序列化响应
id: "96Z599PGNvp7Mr99138Fm0"
seatbid {
  bid {
    id: "NQb32Ge7Rtt84wFn2p8"
    impid: "1"
    price: 0.153584
    adid: "test_creative_id_272596"
    adomain: "google.com"
    crid: "test_creative_id_272596"
    cat: "IAB13-7"
    burl: "https://test.com/imp?id=123456"
    adm_native {
      ver: "1.2"
      assets {
        id: 1
        required: true
        title {
          text: "Luxury Mars Cruises"
        }
      }
      assets {
        id: 2
        required: true
        data {
          value: "Visit the planet in a luxury spaceship."
        }
      }
      assets {
        id: 3
        required: false
        data {
          value: "Book today"
        }
      }
      assets {
        id: 4
        required: true
        data {
          value: "Galactic Luxury Cruises"
        }
      }
      assets {
        id: 5
        required: true
        img {
          url: "https://native.test.com/image?id=123456"
          w: 1200
          h: 627
        }
      }
      link {
        url: "https://www.google.com"
      }
      eventtrackers {
        event: IMPRESSION
        method: IMG
        url: "https://test.com/event?id=123456"
      }
      privacy: "https://adssettings.google.com/whythisad?source=display&reasons=OMITTED"
    }
    [com.google.doubleclick.bid] {
      ad_choices_destination_url: "https://test.com/preferences"
      billing_id: 29846056590
      dsa {
        behalf: "TEST_ADVERTISER"
        paid: "TEST_PAYING_ENTITY"
        adrender: false
      }
    }
  }
  bid {
    id: "4vwb23qm6iqU6w6G978"
    impid: "1"
    price: 0.153584
    adid: "test_creative_id_272596"
    adomain: "google.com"
    crid: "test_creative_id_272596"
    cat: "IAB21"
    burl: "https://test.com/imp?id=123456"
    adm_native {
      ver: "1.2"
      assets {
        id: 1
        required: true
        title {
          text: "Luxury Mars Cruises"
        }
      }
      assets {
        id: 2
        required: true
        data {
          value: "Visit the planet in a luxury spaceship."
        }
      }
      assets {
        id: 3
        required: false
        data {
          value: "Book today"
        }
      }
      assets {
        id: 4
        required: true
        data {
          value: "Galactic Luxury Cruises"
        }
      }
      assets {
        id: 5
        required: true
        img {
          url: "https://native.test.com/image?id=123456"
          w: 1200
          h: 627
        }
      }
      link {
        url: "https://www.google.com"
      }
      eventtrackers {
        event: IMPRESSION
        method: IMG
        url: "https://test.com/event?id=123456"
      }
      privacy: "https://adssettings.google.com/whythisad?source=display&reasons=OMITTED"
    }
    [com.google.doubleclick.bid] {
      ad_choices_destination_url: "https://test.com/preferences"
      dsa {
        behalf: "TEST_ADVERTISER"
        paid: "TEST_PAYING_ENTITY"
        adrender: false
      }
    }
  }
  seat: "4528:1161:591635"
  group: false
}
bidid: "hgu4ev7j-ZK929XM0-79f7-0A23O0VN2CFC"
cur: "USD"
{
  "id": "96Z599PGNvp7Mr99138Fm0",
  "seatbid": [
    {
      "bid": [
        {
          "id": "NQb32Ge7Rtt84wFn2p8",
          "impid": "1",
          "price": 0.153584,
          "adid": "test_creative_id_272596",
          "adomain": [
            "google.com"
          ],
          "crid": "test_creative_id_272596",
          "cat": [
            "IAB13-7"
          ],
          "burl": "https://test.com/imp?id=123456",
          "ext": {
            "ad_choices_destination_url": "https://test.com/preferences",
            "billing_id": "29846056590",
            "dsa": {
              "behalf": "TEST_ADVERTISER",
              "paid": "TEST_PAYING_ENTITY",
              "adrender": 0
            }
          },
          "adm": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"text\":\"Luxury Mars Cruises\"}},{\"id\":2,\"required\":1,\"data\":{\"value\":\"Visit the planet in a luxury spaceship.\"}},{\"id\":3,\"required\":0,\"data\":{\"value\":\"Book today\"}},{\"id\":4,\"required\":1,\"data\":{\"value\":\"Galactic Luxury Cruises\"}},{\"id\":5,\"required\":1,\"img\":{\"url\":\"https://native.test.com/image?id=123456\",\"w\":1200,\"h\":627}}],\"link\":{\"url\":\"https://www.google.com\"},\"eventtrackers\":[{\"event\":1,\"method\":1,\"url\":\"https://test.com/event?id=123456\"}],\"privacy\":\"https://adssettings.google.com/whythisad?source=display&reasons=OMITTED\"}"
        },
        {
          "id": "4vwb23qm6iqU6w6G978",
          "impid": "1",
          "price": 0.153584,
          "adid": "test_creative_id_272596",
          "adomain": [
            "google.com"
          ],
          "crid": "test_creative_id_272596",
          "cat": [
            "IAB21"
          ],
          "burl": "https://test.com/imp?id=123456",
          "ext": {
            "ad_choices_destination_url": "https://test.com/preferences",
            "dsa": {
              "behalf": "TEST_ADVERTISER",
              "paid": "TEST_PAYING_ENTITY",
              "adrender": 0
            }
          },
          "adm": "{\"ver\":\"1.2\",\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"text\":\"Luxury Mars Cruises\"}},{\"id\":2,\"required\":1,\"data\":{\"value\":\"Visit the planet in a luxury spaceship.\"}},{\"id\":3,\"required\":0,\"data\":{\"value\":\"Book today\"}},{\"id\":4,\"required\":1,\"data\":{\"value\":\"Galactic Luxury Cruises\"}},{\"id\":5,\"required\":1,\"img\":{\"url\":\"https://native.test.com/image?id=123456\",\"w\":1200,\"h\":627}}],\"link\":{\"url\":\"https://www.google.com\"},\"eventtrackers\":[{\"event\":1,\"method\":1,\"url\":\"https://test.com/event?id=123456\"}],\"privacy\":\"https://adssettings.google.com/whythisad?source=display&reasons=OMITTED\"}"
        }
      ],
      "seat": "4528:1161:591635",
      "group": 0
    }
  ],
  "bidid": "hgu4ev7j-ZK929XM0-79f7-0A23O0VN2CFC",
  "cur": "USD"
}
序列化响应
ad {
  adslot {
    id: 1
    max_cpm_micros: 158000
    billing_id: 41106584355
    deal_id: 1
  }
  click_through_url: "google.com"
  attribute: 70
  buyer_creative_id: "test_creative_id_251451"
  advertiser_name: "Google"
  native_ad {
    headline: "Luxury Mars Cruises"
    body: "Visit the planet in a luxury spaceship."
    call_to_action: "Book today"
    advertiser: "Galactic Luxury Cruises"
    image {
      url: "https://native.test.com/image?id=123456"
      width: 1200
      height: 222
    }
    app_icon {
      url: "https://native.test.com/icon?id=123456"
      width: 512
      height: 512
    }
    star_rating: 4.300000190734863
    click_link_url: "https://www.google.com"
  }
  impression_tracking_url: "https://test.com/imp?id=123456"
  impression_tracking_url: "https://test.com/imp?id=123456"
  event_notification_token: "token"
  skadn {
    version: "4.0"
    network: "l6x39K4z"
    itunesitem: "731305960"
    sourceapp: "627009739"
    fidelities {
      fidelity_type: STOREKIT_RENDERED_ADS
      nonce: "9216faff-74a9-4b35-badc-66878c35f67c"
      timestamp: 1728975919221
      signature: "b0USXkmg02Q3v6p301kYOHG36CCOWWdEo52RHRttB9t8PTNi79qL17E4D6h7UeUSuq479oTK13G2Ev34MJlU86C5vY1SMVw2"
    }
    fidelities {
      fidelity_type: VIEW_THROUGH_ADS
      nonce: "9216faff-74a9-4b35-badc-66878c35f67c"
      timestamp: 1728975919221
      signature: "4Cf4NH6239z9f3wa8j6420Z7H0UISYxyxN5720444dkq6457I5FY0Jg8bk1xge2P8YgiDp74l2738136v2g1A8D50331IRm0"
    }
    source_identifier: 1
  }
  click_tracking_urls: "https://google.com/rtb/click?imp_id=55d2112c-4947-4da5-bc37-b79ebf4577dd"
  advertised_app_id: "APP_ID_OMITTED"
  app_promotion_type: INSTALLS
}
processing_time_ms: 63

网络视频

序列化响应
id: "b2F6m05a9d83V7I35iw415"
seatbid {
  bid {
    id: "Ob7259K5679O36pMt00"
    impid: "1"
    price: 1.52
    adid: "test_creative_id_262797"
    adm: "https://video.test.com/ads?id=123456&wprice=%%WINNING_PRICE%%"
    adomain: "google.com"
    crid: "test_creative_id_262797"
    exp: 3600
    [com.google.doubleclick.bid] {
      event_notification_token {
        payload: "token"
      }
      billing_id: 47460168025
    }
  }
  bid {
    id: "0890di791A75n9R13jM"
    impid: "1"
    price: 1.2
    adid: "test_creative_id_262797"
    adm: "https://video.test.com/ads?id=123456&wprice=%%WINNING_PRICE%%"
    adomain: "google.com"
    crid: "test_creative_id_262797"
    exp: 3600
    [com.google.doubleclick.bid] {
      event_notification_token {
        payload: "token"
      }
    }
  }
  seat: "2121:7826:598388"
}
cur: "USD"
{
  "id": "b2F6m05a9d83V7I35iw415",
  "seatbid": [
    {
      "bid": [
        {
          "id": "Ob7259K5679O36pMt00",
          "impid": "1",
          "price": 1.52,
          "adid": "test_creative_id_262797",
          "adm": "https://video.test.com/ads?id=123456&wprice=%%WINNING_PRICE%%",
          "adomain": [
            "google.com"
          ],
          "crid": "test_creative_id_262797",
          "exp": 3600,
          "ext": {
            "event_notification_token": {
              "payload": "token"
            },
            "billing_id": "47460168025"
          }
        },
        {
          "id": "0890di791A75n9R13jM",
          "impid": "1",
          "price": 1.2,
          "adid": "test_creative_id_262797",
          "adm": "https://video.test.com/ads?id=123456&wprice=%%WINNING_PRICE%%",
          "adomain": [
            "google.com"
          ],
          "crid": "test_creative_id_262797",
          "exp": 3600,
          "ext": {
            "event_notification_token": {
              "payload": "token"
            }
          }
        }
      ],
      "seat": "2121:7826:598388"
    }
  ],
  "cur": "USD"
}
序列化响应
fad {
  adslot {
    id: 1
    max_cpm_micros: 68340760
    min_cpm_micros: 0
    billing_id: 75752641104
    deal_id: 0
  }
  click_through_url: "google.com"
  vendor_type: 145
  attribute: 47
  attribute: 8
  video_url: "https://video.test.com/ads?id=123456&wprice=%%WINNING_PRICE%%"
  buyer_creative_id: "test_creative_id_877383"
  advertiser_name: "Google"
  event_notification_token: "token"
  dsa_transparency {
    buyer_render: true
  }
}
processing_time_ms: 17

适用于广告交易平台出价方的移动网站横幅广告

序列化响应
id: "l30Zu42070Man1Z5u751yG"
seatbid {
  bid {
    id: "4X6uu65F9J3m467C571"
    impid: "1"
    price: 0.17
    adm: "<iframe marginwidth=0 marginheight=0 height=600 frameborder=0 width=160 scrolling=no src=\"https://test.com/ads?id=123456&curl=%%CLICK_URL_ESC%%&wprice=%%WINNING_PRICE_ESC%%\"></iframe>"
    adomain: "google.com"
    crid: "test_creative_id_941528"
    w: 320
    h: 50
    [com.google.doubleclick.bid] {
      impression_tracking_url: "https://test.com/impression?id=123456"
      impression_tracking_url: "https://test.com/impression?id=123456"
      event_notification_token {
        payload: "token"
      }
      billing_id: 50962964480
    }
  }
  seat: "7632:7504:809671"
}
bidid: "II638Xkf-6432F06d-VGu8-27B4407D136w"
[com.google.doubleclick.bid_response] {
  processing_time_ms: 70
}
{
  "id": "l30Zu42070Man1Z5u751yG",
  "seatbid": [
    {
      "bid": [
        {
          "id": "4X6uu65F9J3m467C571",
          "impid": "1",
          "price": 0.17,
          "adm": "<iframe marginwidth=0 marginheight=0 height=600 frameborder=0 width=160 scrolling=no src=\"https://test.com/ads?id=123456&curl=%%CLICK_URL_ESC%%&wprice=%%WINNING_PRICE_ESC%%\"></iframe>",
          "adomain": [
            "google.com"
          ],
          "crid": "test_creative_id_941528",
          "w": 320,
          "h": 50,
          "ext": {
            "impression_tracking_url": [
              "https://test.com/impression?id=123456",
              "https://test.com/impression?id=123456"
            ],
            "event_notification_token": {
              "payload": "token"
            },
            "billing_id": "50962964480"
          }
        }
      ],
      "seat": "7632:7504:809671"
    }
  ],
  "bidid": "II638Xkf-6432F06d-VGu8-27B4407D136w",
  "ext": {
    "processing_time_ms": 70
  }
}