GET/api/v4/locations/{locationId}/google-analytics

Get Google analytics for a location

Returns daily Google Business Profile interaction metrics for a location over a date range.

Requires an API key. See Authentication for header format and key rotation.

Parameters

Path

NameTypeRequiredDescription
locationIdstringrequiredBase64-encoded location ID (Relay id, e.g. TG9jYXRpb246MTgwMDI4OQ==). The raw numeric id is not accepted here.

Query

NameTypeRequiredDescriptionDefault
fromDatestringoptionalStart of the range (YYYY-MM-DD). Defaults to a recent window when omitted.
toDatestringoptionalEnd of the range (YYYY-MM-DD).

Responses

200Daily Google interaction metrics. Each metric is a time-series array; a metric is `null` when no data exists for the range or the profile is not connected.
{
  "data": {
    "googleInsights": {
      "total": [
        { "startTime": "2025-06-01T00:00:00+00:00", "value": 412 },
        { "startTime": "2025-06-02T00:00:00+00:00", "value": 388 }
      ],
      "search": [
        { "startTime": "2025-06-01T00:00:00+00:00", "value": 300 }
      ],
      "maps": [
        { "startTime": "2025-06-01T00:00:00+00:00", "value": 112 }
      ],
      "directionsAction": [
        { "startTime": "2025-06-01T00:00:00+00:00", "value": 24 }
      ],
      "phoneAction": [
        { "startTime": "2025-06-01T00:00:00+00:00", "value": 8 }
      ],
      "websiteAction": [
        { "startTime": "2025-06-01T00:00:00+00:00", "value": 41 }
      ],
      "businessBookings": [
        { "startTime": "2025-06-01T00:00:00+00:00", "value": 0 }
      ],
      "businessFoodOrders": [
        { "startTime": "2025-06-01T00:00:00+00:00", "value": 0 }
      ],
      "businessFoodMenuClicks": [
        { "startTime": "2025-06-01T00:00:00+00:00", "value": 0 }
      ]
    }
  }
}
401Unauthenticated — missing or invalid API key.

Returns daily Google Business Profile interaction data for a location. Each metric is an array of time-series points, where each point has a startTime (the day the count is bucketed under) and a value.

Available metrics:

  • total — sum of all interactions across the profile
  • search — appearances in Google Search results
  • maps — appearances in Google Maps results
  • directionsAction — direction requests to the location
  • phoneAction — clicks on the call button
  • websiteAction — clicks through to the website
  • businessBookings — bookings started from the profile
  • businessFoodOrders — food orders placed from the profile
  • businessFoodMenuClicks — clicks on the food-menu link

Path id must be the Base64 Relay id

This endpoint keys off the Base64-encoded location id, not the raw numeric database id. Encode the numeric id first — 1800289 becomes TG9jYXRpb246MTgwMDI4OQ== (Location:1800289 base64-encoded). Passing the bare integer returns a 200 whose body is {"data":{"googleInsights":null},"errors":[...]}, which is easy to mistake for a server fault.

curl -s 'https://listingsapi.com/api/v4/locations/TG9jYXRpb246MTgwMDI4OQ==/google-analytics?fromDate=2025-06-01&toDate=2025-06-30' \
  -H "Authorization: API $LISTINGSAPI_KEY"

Reporting the impact of a data update

A common use is a before/after visibility report: after pushing hours or category changes to a location, poll google-analytics for the weeks on either side of the change and chart search + maps to show the lift. Individual metrics come back null (rather than an empty array) when the location has no Google data for the requested window or its Google profile is not connected — handle null and [] the same way in your aggregation. Pair with Facebook and Bing analytics for a cross-publisher view.

curl -X GET 'https://listingsapi.com/api/v4/locations/<locationId>/google-analytics' \
  -H "Authorization: API $LISTINGSAPI_KEY"