Method: customers.googleAds.searchStream

返回与搜索流查询匹配的所有行。

抛出的错误列表:AuthenticationError AuthorizationError ChangeEventError ChangeStatusError ClickViewError HeaderError InternalError QueryError QuotaError RequestError

HTTP 请求

POST https://googleads.googleapis.com/v15/customers/{customerId}/googleAds:searchStream

网址采用 gRPC 转码语法。

路径参数

参数
customerId

string

必需。要查询的客户的 ID。

请求正文

请求正文中包含结构如下的数据:

JSON 表示法
{
  "query": string,
  "summaryRowSetting": enum (SummaryRowSetting)
}
字段
query

string

必需。查询字符串。

summaryRowSetting

enum (SummaryRowSetting)

确定是否返回摘要行。默认情况下,系统不会返回摘要行。如果已请求,则在返回所有其他查询结果后,将在响应中单独发送摘要行。

响应正文

GoogleAdsService.SearchStream 的响应消息。

如果成功,响应正文将包含结构如下的数据:

JSON 表示法
{
  "results": [
    {
      object (GoogleAdsRow)
    }
  ],
  "fieldMask": string,
  "summaryRow": {
    object (GoogleAdsRow)
  },
  "requestId": string,
  "queryResourceConsumption": string
}
字段
results[]

object (GoogleAdsRow)

与查询匹配的行的列表。

fieldMask

string (FieldMask format)

表示用户请求哪些字段的 FieldMask。

这是以英文逗号分隔的完全限定字段名称列表。示例:"user.displayName,photo"

summaryRow

object (GoogleAdsRow)

包含结果中指标摘要的摘要行。指标汇总是指所有结果的指标汇总,此处的汇总可以是总和、平均值、费率等。

requestId

string

用于调试的请求的唯一 ID。

queryResourceConsumption

string (int64 format)

执行查询所消耗的资源量。摘要行和非摘要响应的 queryResourceConsumption 会在各自的行中单独返回。非摘要响应的 queryResourceConsumption 出现在最后一批结果中。

授权范围

需要以下 OAuth 作用域:

  • https://www.googleapis.com/auth/adwords

有关详情,请参阅 OAuth 2.0 概览