Google Business Performance API has a
NEW API method that allows fetching multiple `DailyMetrics` in a single API request. Review the
deprecation schedule and instructions to migrate over from v4 reportInsights API method to Google Business Profile Performance API.
Method: locations.getDailyMetricsTimeSeries
Stay organized with collections
Save and categorize content based on your preferences.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-16 UTC.
[null,null,["Last updated 2024-10-16 UTC."],[[["\u003cp\u003eRetrieves daily time series data for a specified location and metric within a given date range.\u003c/p\u003e\n"],["\u003cp\u003eRequires specifying the location ID, daily metric, and start and end dates as parameters.\u003c/p\u003e\n"],["\u003cp\u003eOptionally allows filtering by sub-entity type and ID for supported metrics.\u003c/p\u003e\n"],["\u003cp\u003eReturns a JSON response containing a time series object with daily values for the requested metric.\u003c/p\u003e\n"],["\u003cp\u003eNeeds authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/business.manage\u003c/code\u003e scope.\u003c/p\u003e\n"]]],[],null,["# Method: locations.getDailyMetricsTimeSeries\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.GetDailyMetricsTimeSeriesResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n\nReturns the values for each date from a given time range that are associated with the specific daily metric.\n\nExample request: `GET\nhttps://businessprofileperformance.googleapis.com/v1/locations/12345:getDailyMetricsTimeSeries?dailyMetric=WEBSITE_CLICKS&dailyRange.start_date.year=2022&dailyRange.start_date.month=1&dailyRange.start_date.day=1&dailyRange.end_date.year=2022&dailyRange.end_date.month=3&dailyRange.end_date.day=31`\n\n### HTTP request\n\n`GET https://businessprofileperformance.googleapis.com/v1/{name=locations/*}:getDailyMetricsTimeSeries`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The location for which the time series should be fetched. Format: locations/{locationId} where locationId is an unobfuscated listing id. |\n\n### Query parameters\n\n| Parameters ||\n|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `dailyMetric` | `enum (`[DailyMetric](/my-business/reference/performance/rest/v1/DailyMetric)`)` Required. The metric to retrieve time series. |\n| `dailyRange` | `object (`[DailyRange](/my-business/reference/performance/rest/v1/DailyRange)`)` Required. The timerange for which the time series will be fetched. |\n| `dailySubEntityType` | `object (`[DailySubEntityType](/my-business/reference/performance/rest/v1/DailySubEntityType)`)` Optional. The Sub-entity type and id that the time series relates to. Currently supported DailyMetrics = NONE. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nRepresents the response for locations.getDailyMetricsTimeSeries.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------|\n| ``` { \"timeSeries\": { object (/my-business/reference/performance/rest/v1/TimeSeries) } } ``` |\n\n| Fields ||\n|--------------|---------------------------------------------------------------------------------------------------------|\n| `timeSeries` | `object (`[TimeSeries](/my-business/reference/performance/rest/v1/TimeSeries)`)` The daily time series. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/business.manage`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]