Method: googleLocations.search

搜索与指定请求匹配的所有可能位置。

HTTP 请求

POST https://mybusinessbusinessinformation.googleapis.com/v1/googleLocations:search

网址采用 gRPC 转码语法。

请求正文

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

JSON 表示法
{
  "pageSize": integer,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "location": {
    object (Location)
  },
  "query": string
  // End of mutually exclusive fields.
}
字段
pageSize

integer

要返回的匹配项数量。默认值为 3,最大值为 10。请注意,如果请求的数量较多,延迟时间可能会增加。没有分页。

搜索查询。此参数可以作为位置对象或字符串查询提供。以下是互斥字段的列表。在响应中,最多只能设置其中一个字段:
location

object (Location)

要搜索的位置。如果提供,将查找与所提供的位置详细信息(必须包含标题值)匹配的位置。

query

string

要搜索的文本查询。与提供确切位置相比,查询字符串的搜索结果不太准确,但可以提供更多不精确的匹配项。

互斥字段结束。

响应正文

GoogleLocations.SearchGoogleLocations 的响应消息。

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

JSON 表示法
{
  "googleLocations": [
    {
      object (GoogleLocation)
    }
  ]
}
字段
googleLocations[]

object (GoogleLocation)

与指定请求可能匹配的 GoogleLocations 集合,按准确度从高到低的顺序列出。

授权范围

需要以下 OAuth 范围:

  • https://www.googleapis.com/auth/business.manage

如需了解详情,请参阅 OAuth 2.0 Overview。