Skip to content
SynupAPI
Get an API key
GETapi.synup.com/api/v4/locations/{locationId}/google-analytics

Get Google My Business Analytics

This API retrieves a specific location's profile analytics data from Google Business Profile (GBP).

Requires an API key. Send it as Authorization: API <your-key> — see Getting started.

Parameters

Path

NameTypeRequiredDescription
locationIdstringrequiredLocation ID

Query

NameTypeRequiredDescription
fromDatestringoptionalStart date of date range filter (YYYY-MM-DD)
toDatestringoptionalEnd date of date range filter (YYYY-MM-DD)

Request

Request
curl -X GET 'https://api.synup.com/api/v4/locations/:locationId/google-analytics?fromDate=&toDate=' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json'

Responses

StatusDescription
200Successful response
401Unauthorized
404Location not found
Example response (generated from the schema)
{
  "data": {
    "googleInsights": {
      "directionsAction": [
        {
          "startTime": "2018-11-13T00:00:00+00:00",
          "value": 20
        }
      ],
      "maps": [
        {
          "startTime": "2018-11-13T00:00:00+00:00",
          "value": 20
        }
      ],
      "phoneAction": [
        {
          "startTime": "2018-11-13T00:00:00+00:00",
          "value": 20
        }
      ],
      "search": [
        {
          "startTime": "2018-11-13T00:00:00+00:00",
          "value": 20
        }
      ],
      "websiteAction": [
        {
          "startTime": "2018-11-13T00:00:00+00:00",
          "value": 20
        }
      ],
      "total": [
        {
          "startTime": "2018-11-13T00:00:00+00:00",
          "value": 20
        }
      ]
    }
  }
}

Response body

NameTypeRequiredDescription
dataobjectoptional
data.googleInsightsobjectoptional
data.googleInsights.directionsActionarray of objectoptionalThe number of times directions for the particular location was requested
data.googleInsights.directionsAction[].startTimestringoptionalStart time of the analytics period
data.googleInsights.directionsAction[].valueintegeroptionalMetric value for the period
data.googleInsights.mapsarray of objectoptionalThe number of times the location showed up on Google Maps
data.googleInsights.maps[].startTimestringoptionalStart time of the analytics period
data.googleInsights.maps[].valueintegeroptionalMetric value for the period
data.googleInsights.phoneActionarray of objectoptionalThe number of times the call number for the location was requested
data.googleInsights.phoneAction[].startTimestringoptionalStart time of the analytics period
data.googleInsights.phoneAction[].valueintegeroptionalMetric value for the period
data.googleInsights.searcharray of objectoptionalThe number of times the location showed up on Google Search results
data.googleInsights.search[].startTimestringoptionalStart time of the analytics period
data.googleInsights.search[].valueintegeroptionalMetric value for the period
data.googleInsights.websiteActionarray of objectoptionalThe number of times the website URL for the location was requested
data.googleInsights.websiteAction[].startTimestringoptionalStart time of the analytics period
data.googleInsights.websiteAction[].valueintegeroptionalMetric value for the period
data.googleInsights.totalarray of objectoptionalThe total sum of all the above interactions
data.googleInsights.total[].startTimestringoptionalStart time of the analytics period
data.googleInsights.total[].valueintegeroptionalMetric value for the period