Power Query – get GPS info for places, using Google API
This tutorial describes, how to get GPS coordinates for places (addresses, cities, countries...) in Power Query.
It works in Power Query in Excel as well as in Power Query in Power BI.
Get the API key
You need a key from Google (or similar provider). Let´s see this:
https://developers.google.com/maps/documentation/javascript/get-api-key
It´s free in reasonable numbers of addresses.
Power Query
You need table with info about place. Then add this custom column with syntax like this:
- Json.Document(Web.Contents("https://maps.googleapis.com/maps/api/geocode/json?key=YOUR_KEY_IS_HERE&address=" & [Place]))
Then drill it to lowest level:
If you go to the end, and possibly remove unnecessities, you have a result like this: