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

GMB API - batchGet Results Missing LatLong Values

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

We are using the batchGet process to pull locations from our accounts, prior to patch. We receive all locations that are included in our account in the response (no issue there), but the "latlong" field for a majority of our locations are missing.

 

Why would this data be missing if the locations are in fact appearing in the GMB UI with a published status and we can find the "latlong" manually through the Google Maps listings? Is there something we need to include in the batchGet to insure the latlong data is returned?

 

Thanks!

 

1 Expert replyverified_user

Re: GMB API - batchGet Results Missing LatLong Values

Google Employee
# 2
Google Employee

Hi @Amanda S,

 

The latlng field for the user-provided latitude and longitude is read-only and cannot be updated upon creation of a new location. This field is ignored if the provided address geocodes successfully when creating a location. This field is only present if the user-provided latlng field value in a LatLng object was accepted when creating a new location via the Google My Business API, or the latlng field value was updated by dropping a pin for a business location through the Google My Business UI. The absence of the latlng field for a specified location has nothing to do with the POST request and any request message components you send to the :batchGet endpoint for retrieving all specified locations in the given account. You should get the same result if you send a GET request to list all locations for the specified account.

 

Thanks,

Terry