Google Business Performance API 的
NEW API 方法可擷取單一 API 要求中的多個「DailyMetrics」。
請詳閱
淘汰時間表和從 v4 reportInsights API 方法遷移至 Google Business Profile Performance API 的操作說明。
擷取位置深入分析
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本教學課程說明如何擷取商家檔案中的地點指標。
Google My Business API 可讓您使用位置資訊
指標來擷取以下類型的資料:
事前準備
您必須先註冊應用程式,才能使用 Google My Business API
並取得 OAuth 2.0 憑證。如要進一步瞭解如何開始使用
Google My Business API,請參閱基本設定。
支援的深入分析資訊
如要查看支援的深入分析資訊,請參閱指標
參考頁面
基本分析
擷取指定地點清單的基本深入分析資料。使用 accounts.locations.reportInsights
,透過 API 傳回與某地點相關的深入分析資料。
如要傳回與某地區相關的基本洞察資料,請使用下列方式:
POST
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations:reportInsights
{
"locationNames": [
"accounts/{accountId}/locations/{locationId}"
],
"basicRequest": {
"metricRequests": [
{
"metric": "QUERIES_DIRECT"
},
{
"metric": "QUERIES_INDIRECT"
}
],
"timeRange": {
"startTime": "2016-10-12T01:01:23.045123456Z",
"endTime": "2017-01-10T23:59:59.045123456Z"
}
}
}
行車路線
擷取指定地點清單的行車路線指標。使用
accounts.locations.reportInsights
敬上
提供相關 API,用於傳回與地點相關聯的行車路線指標。
如要傳回行車路線指標,請使用下列指令:
POST
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations:reportInsights
{
"locationNames": [
"accounts/{accountId}/locations/{locationId}"
],
"drivingDirectionsRequest": {
"numDays": "NINETY"
}
}
除非另有註明,否則本頁面中的內容是採用創用 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 (世界標準時間)。"],[[["This tutorial demonstrates how to retrieve location metrics, such as basic insights and driving directions, using the Google My Business API."],["Before using the API, you'll need to register your application and obtain OAuth 2.0 credentials as outlined in the basic setup guide."],["You can retrieve basic insights like direct and indirect queries for specific locations within a defined timeframe using the `accounts.locations.reportInsights` API."],["Driving direction metrics, including data for the past 90 days, can also be retrieved using the `accounts.locations.reportInsights` API with a driving directions request."],["Refer to the Metric reference page for a comprehensive list of supported insights available through the Google My Business API."]]],[]]