Method: googleLocations.search

搜尋所有可能符合指定要求的位置。

HTTP 要求

POST https://mybusinessbusinessinformation.googleapis.com/v1alpha/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)

可能符合指定要求的 Google 地點集合,依準確度由高至低排序。

授權範圍

需要下列 OAuth 範圍:

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

詳情請參閱OAuth 2.0 Overview。