Google Business Performance API 的
NEW API 方法可擷取單一 API 要求中的多個「DailyMetrics」。
請詳閱
淘汰時間表和從 v4 reportInsights API 方法遷移至 Google Business Profile Performance API 的操作說明。
BasicMetricsRequest
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
欄位 |
metricRequests[] |
object (MetricRequest )
一組用於傳回值的指標,包括資料傳回方式的選項。
|
timeRange |
object (TimeRange )
要收集指標的範圍。從申請日期起算,最長可達 18 個月。在某些情況下,要求日期到來之前的資料可能還是缺少資料。缺少的資料會在回應的 metricValues 中指定。
|
MetricRequest
此要求會傳回一項指標值,以及應如何傳回這些值的選項。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003e\u003ccode\u003eBasicMetricsRequest\u003c/code\u003e allows retrieval of basic metric insights for a specified time range, up to 18 months.\u003c/p\u003e\n"],["\u003cp\u003eThe request specifies desired metrics and data return options using \u003ccode\u003eMetricRequest\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003eEach \u003ccode\u003eMetricRequest\u003c/code\u003e defines the specific metric and how the values should be presented in the response.\u003c/p\u003e\n"],["\u003cp\u003eData for days near the request date might be unavailable and is indicated within the \u003ccode\u003emetricValues\u003c/code\u003e field of the response.\u003c/p\u003e\n"]]],[],null,["# BasicMetricsRequest\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [MetricRequest](#MetricRequest)\n - [JSON representation](#MetricRequest.SCHEMA_REPRESENTATION)\n\nA request for basic metric insights.\n\n| JSON representation ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"metricRequests\": [ { object (/my-business/reference/rest/v4/BasicMetricsRequest#MetricRequest) } ], \"timeRange\": { object (/my-business/reference/rest/v4/TimeRange) } } ``` |\n\n| Fields ||\n|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `metricRequests[]` | `object (`[MetricRequest](/my-business/reference/rest/v4/BasicMetricsRequest#MetricRequest)`)` A collection of metrics to return values for including the options for how the data should be returned. |\n| `timeRange` | `object (`[TimeRange](/my-business/reference/rest/v4/TimeRange)`)` The range to gather metrics for. The maximum range is 18 months from the request date. In some cases, the data may still be missing for days close to the request date. Missing data will be specified in the `metricValues` in the response. |\n\nMetricRequest\n-------------\n\nA request to return values for one metric and the options for how those values should be returned.\n\n| JSON representation ||\n|---------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"metric\": enum (/my-business/reference/rest/v4/Metric), \"options\": [ enum (/my-business/reference/rest/v4/MetricOption) ] } ``` |\n\n| Fields ||\n|-------------|--------------------------------------------------------------------------------------------------------------------|\n| `metric` | `enum (`[Metric](/my-business/reference/rest/v4/Metric)`)` The requested metric. |\n| `options[]` | `enum (`[MetricOption](/my-business/reference/rest/v4/MetricOption)`)` How the values should appear when returned. |"]]