Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Google Maps Driving Distance and Duration API with Alteryx

6 - Meteoroid

Hi All,


I've been trying to get actual driving distances and duration by wrapping in my personal API key.


I've been following this amazing guide:


This is exactly what I need but I keep getting errors when inputting the API key URL in the Formula tool.


Also, do I need to use the Distance tool (since I only have the general license it doesn't come with TomTom capabilities) at any point or can I just add the results onto the data I already have? (I used the Append Tool to get multiple addresses listed)?



ACE Emeritus
ACE Emeritus

Glad you liked the post.


Have stuck together a quick workflow loading a route into the Google drive time and distance API. should be a reasonable starting point for you.



6 - Meteoroid

Hi James,


I'm not quite sure what I'm doing wrong but I've attached what I just did (with some of your help on a different issue!).

I think I need to add another join in order for the original results to query Google services in just the way I want it.


What do you think?

ACE Emeritus
ACE Emeritus

could you drop some sample data so I can try running it through?


I put together a guess of what you are trying to do based on what you posted.


You will need to enter an API key in the Text Input in the Yellow container

6 - Meteoroid

Sorry James!


Sample data should be attached.

6 - Meteoroid



When replacing your data with mine I get the accurate results I want. You're amazing :)


Thank you so much for your help! (My thesis will go a bit better now!)



ACE Emeritus
ACE Emeritus

Always happy to help 

5 - Atom

Nearly a year later this really helped me - thank you! 

7 - Meteor

Hi, I've tried running this and it works great so far in short bursts!


However, I'm running into the issue where I have 10 origin points and thousands of destination points and when I simply list all points as equal, I get multiple millions of records trying to go through the API. Is there a way to specifically set which points are origin points and which ones are destination points to be able to scale the workflow?

Alteryx Alumni (Retired)

Hi @robshiffer - I use the Google API a bit and this is how I do it.


I keep the Origin and Destination lat/lons as separate fields in my data stream and then I make a callout to the Google Distance Matrix API like this:[Origin Lat/Lon]&destinations=[Destination Lat/Lon]&units=[Unit Type]&key=[key]