My Business
5K members online now
5K members online now
For developers who are using the Google My Business API to manage locations
Guide Me
star_border
Reply

GMB Driving Directions for a Specific Location Not Coming Through

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi Google My Business Team,

 
We are trying to pull data for a specific location through the API but are unable to and were hoping you could help direct us on the best way to do this. 
 
Example of what we are trying to do:
1. We get a result of 1 "clicks to driving directions" for main level data when making a specific call
2. When we try to get the list of the Driving Directions, we get 1 results but without the details needed to show the driving directions. 
 
Below are the calls we are making. If you could help direct us in the best way to solve this I would appreciate it. 
 

API URL:
https://developers.google.com/my-business/content/insight-data

Request:

POST https://mybusiness.googleapis.com/v3/accounts/107451012673004983343/locations:reportInsights
{
  "locationNames": [
    "accounts/107451012673004983343/locations/5304386605711823985"
  ],
  "drivingDirectionsRequest": {
    "numDays": "THIRTY"
  }
}

Response:

{
  "locationDrivingDirectionMetrics": [
    {
      "locationName": "accounts/107451012673004983343/locations/5304386605711823985",
      "timeZone": "America/Denver"
    }
  ]
}

Expected Response (sample from google search):

{
  "locationDrivingDirectionMetrics": [
    {
      "locationName": "accounts/110714876951578713336/locations/
                       14372810722634034850",
      "topDirectionSources": [
        {
          "dayCount": 90,
          "regionCounts": [
            {
              "latlng": {
                "latitude": 37.789,
                "longitude": -121.392
              },
              "label": "94105",
              "count": "2980",
            },
            {
              "latlng": {
                "latitude": 37.779,
                "longitude": -122.421
              },
              "label": "94102",
              "count": "887",
            },
            {
              "latlng": {
                "latitude": 37.773,
                "longitude": -122.410
              },
              "label": "94103",
              "count": "886",
            }
          ]
        }
      ],
          "timeZone": "America/Los_Angeles"
    }
  ]
}

 
1 Expert replyverified_user

Re: GMB Driving Directions for a Specific Location Not Coming Through

Google Employee
# 2
Google Employee

Hi @Kathryn T,

 

The source code you provided in your post looks fine to me. Please confirm us if you are able to see driving directions Insights through the Google My Business UI, and the location in question is verified?

 

Thanks,

Shalini, The Google My Business API team