Google Business Performance API 的
NEW API 方法可擷取單一 API 要求中的多個「DailyMetrics」。
請詳閱
淘汰時間表和從 v4 reportInsights API 方法遷移至 Google Business Profile Performance API 的操作說明。
Method: googleLocations.search
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
HTTP 要求
POST https://mybusiness.googleapis.com/v4/googleLocations:search
這個網址使用 gRPC 轉碼語法。
要求主體
要求主體的資料會採用以下結構:
JSON 表示法 |
{
"resultCount": integer,
// Union field search_query can be only one of the following:
"location": {
object (Location )
},
"query": string
// End of list of possible types for union field search_query .
} |
欄位 |
resultCount |
integer
要傳回的相符項目數量。預設值為 3,最大值為 10。請注意,如果您提出要求,延遲時間可能會增加。沒有分頁。
|
聯集欄位 search_query 。搜尋查詢。能以位置物件或字串查詢的形式提供。search_query 只能是下列其中一項: |
location |
object (Location )
要搜尋的位置。如有提供,系統會根據提供的地點詳細資料找出相符的地點。
|
query |
string
要搜尋的文字查詢。相較於提供確切位置,查詢字串的搜尋結果會較不準確,但可以提供較不完全比對的比對結果。
|
回應主體
如果成功,回應主體會含有以下結構的資料:
GoogleLocations.SearchGoogleLocations 的回應訊息。
欄位 |
googleLocations[] |
object (GoogleLocation )
一組可能符合指定要求的 GoogleLocation 位置,按準確率由高到低列出。
|
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
詳情請參閱 OAuth 2.0 總覽。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-10-14 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-10-14 (世界標準時間)。"],[[["Search for Google Locations using either a specific location or a text-based query."],["Specify the desired number of search results, with a maximum of 10."],["Results are returned in order of accuracy, with the most accurate matches appearing first."],["Requires specific authorization scopes for access."]]],["The core content describes searching for Google locations via a `POST` request to `https://mybusiness.googleapis.com/v4/googleLocations:search`. The request body can include either a `location` object or a string `query` within the `search_query` field, plus an integer `resultCount`. The response body contains an array of `googleLocations`, representing potential matches ranked by accuracy. Authorization requires either `plus.business.manage` or `business.manage` OAuth scopes.\n"]]