- HTTP 请求
- 请求正文
- 响应正文
- 授权范围
- LocationNames
<ph type="x-smartling-placeholder">
- </ph>
- JSON 表示法
- GeoTargets
<ph type="x-smartling-placeholder">
- </ph>
- JSON 表示法
- GeoTargetConstantSuggestion
<ph type="x-smartling-placeholder">
- </ph>
- JSON 表示法
- 试试看!
按地理位置名称或资源名称返回 GeoTargetConstant 建议。
抛出的错误的列表:AuthenticationError AuthorizationError GeoTargetConstantSuggestionError HeaderError InternalError QuotaError RequestError
HTTP 请求
POST https://googleads.googleapis.com/v17/geoTargetConstants:suggest
网址采用 gRPC 转码语法。
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
---|
{ "locale": string, "countryCode": string, // Union field |
字段 | |
---|---|
locale |
如果可以,返回的地理位置定位将采用此语言区域。否则,系统会默认使用 en。此字符串也可用作返回的地理位置定位提示。 |
countryCode |
返回的地理位置定位范围限制在此国家/地区代码内。 |
联合字段 query 。必需。地理位置定位常量的选择器。query 只能是下列其中一项: |
|
locationNames |
要搜索的地理位置名称。最多可以设置 25 个名称。 |
geoTargets |
要用作过滤条件的地理位置定位常量资源名称。 |
响应正文
GeoTargetConstantService.SuggestGeoTargetConstants
的响应消息。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
---|
{
"geoTargetConstantSuggestions": [
{
object ( |
字段 | |
---|---|
geoTargetConstantSuggestions[] |
地理位置定位常量建议。 |
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/adwords
如需了解详情,请参阅 OAuth 2.0 概览。
LocationNames
地理位置名称列表。
JSON 表示法 |
---|
{ "names": [ string ] } |
字段 | |
---|---|
names[] |
地理位置名称列表。 |
GeoTargets
地理位置定位常量资源名称列表。
JSON 表示法 |
---|
{ "geoTargetConstants": [ string ] } |
字段 | |
---|---|
geoTargetConstants[] |
地理位置定位常量资源名称列表。 |
GeoTargetConstantSuggestion
地理位置定位常量建议。
JSON 表示法 |
---|
{ "geoTargetConstant": { object ( |
字段 | |
---|---|
geoTargetConstant |
GeoTargetConstant 结果。 |
geoTargetConstantParents[] |
地理位置定位常量的父项列表。 |
locale |
此 GeoTargetConstantSuggestion 目前翻译成的语言。它会影响目标地理区域字段的名称。例如,如果 locale=en,则 name=Spain 。如果 locale=es,则 name=España。如果请求中不存在相应语言区域的翻译,系统将返回默认语言区域。 |
reach |
要定位的大致用户数,四舍五入到最接近的 100 人。 |
searchTerm |
如果请求搜索的是地理位置名称,则此参数为与目标地理位置匹配的地理位置名称。 |