Reverse Geocode Locations in Google My Maps (Custom Map Locations to Street Addesses)

184 Views Asked by At

I have a custom map in Google's "My Maps" with a list of locations. What is the easiest way to reverse geocode these to the street addresses? i.e. I would like to export the data as a list of locations + the associated addresses. The CSV export built in just exports the location names.

1

There are 1 best solutions below

0
Alex Rothberg On

From the map page's HTML (URL looks like: https://www.google.com/maps/d/u/0/edit?mid=.....https://www.google.com/maps/d/u/0/viewer?mid=XXXX), you can first pull the var _pageData = .... JSON object (accessible on window._pageData).

From that you can pull the list of places with the associated place_id. These can then be resolved to the location info using the https://maps.googleapis.com/maps/api/place/details/json API.