Method: geoTargetConstants.suggest

按位置名称或资源名称返回 GeoTargetConstant 建议。

抛出的错误列表:AuthenticationError AuthorizationError GeoTargetConstantSuggestionError HeaderError InternalError QuotaError RequestError

HTTP 请求

POST https://googleads.googleapis.com/v14/geoTargetConstants:suggest

网址采用 gRPC 转码语法。

请求正文

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

JSON 表示法
{
  "locale": string,
  "countryCode": string,

  // Union field query can be only one of the following:
  "locationNames": {
    object (LocationNames)
  },
  "geoTargets": {
    object (GeoTargets)
  }
  // End of list of possible types for union field query.
}
字段
locale

string

如果可能,返回的地理位置定位条件将使用此语言区域进行翻译。如果不包含,则默认使用 en。这也可用作返回的地理位置定位目标的提示。

countryCode

string

返回的地理位置定位目标仅限于此国家/地区代码。

联合字段 query。必需。地理位置定位常量的选择器。query 只能是下列其中一项:
locationNames

object (LocationNames)

要搜索的地理位置名称。最多可以设置 25 个名称。

geoTargets

object (GeoTargets)

要作为过滤依据的地理位置定位常量资源名称。

响应正文

GeoTargetConstantService.SuggestGeoTargetConstants 的响应消息。

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

JSON 表示法
{
  "geoTargetConstantSuggestions": [
    {
      object (GeoTargetConstantSuggestion)
    }
  ]
}
字段
geoTargetConstantSuggestions[]

object (GeoTargetConstantSuggestion)

地理位置定位常量建议。

授权范围

需要以下 OAuth 作用域:

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

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

LocationNames

地理位置名称列表。

JSON 表示法
{
  "names": [
    string
  ]
}
字段
names[]

string

地理位置名称列表。

GeoTargets

地理位置定位常量资源名称列表。

JSON 表示法
{
  "geoTargetConstants": [
    string
  ]
}
字段
geoTargetConstants[]

string

地理位置定位常量资源名称列表。

GeoTargetConstantSuggestion

地理位置定位常量建议。

JSON 表示法
{
  "geoTargetConstant": {
    object (GeoTargetConstant)
  },
  "geoTargetConstantParents": [
    {
      object (GeoTargetConstant)
    }
  ],
  "locale": string,
  "reach": string,
  "searchTerm": string
}
字段
geoTargetConstant

object (GeoTargetConstant)

GeoTargetConstant 结果。

geoTargetConstantParents[]

object (GeoTargetConstant)

地理位置定位目标常量的父项列表。

locale

string

该 GeoTargetConstantSuggestion 目前翻译成的语言。它会影响地理位置定位字段的名称。例如,如果 locale=en,则 name=Spain。如果 locale=es,则 name=España。如果请求中不存在相应语言区域的翻译,则返回默认语言区域。

reach

string (int64 format)

要定位的用户群体的大概人数(四舍五入到最接近的 100)。

searchTerm

string

如果请求按地理位置名称搜索,这就是与地理位置定位匹配的地理位置名称。