Get Travel Time and Distance in Excel Using Google Maps Routes API

A few years ago, I made a tutorial on this website and also published to YouTube showing you how to create a function to calculate travel time and distance using the Google Maps API. That remains the most popular tutorial on this website. Google is in the process of retiring its Directions API, which is replaced with a new API called the Routes API. The new API is very similar, and we can use it to get travel time and distance in Excel just as we could with the previous API. This time, rather than using VBA, I’m going to show you how to do this with PowerQuery. I think PowerQuery is a bit more friendly for the average user, although in this case we are still going to need to do a bit of coding which you can simply copy and paste.

Continue reading “Get Travel Time and Distance in Excel Using Google Maps Routes API”