Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Google Maps Driving Distance and Duration API with Alteryx

marlop
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: https://jdunkerley.co.uk/2016/07/21/geocoding-and-finding-nearest-station-with-google-web-services/

 

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)?

 

Thanks!

19 REPLIES 19
robshiffer
7 - Meteor

Thanks for the help! I'm not too experienced with the Google API so this is hugely helpful

Chris88
5 - Atom

Hi Travis, this is exactly what I want to do. Would you be able to share a workflow?

MAAbdullahAlMubarah
8 - Asteroid

@jdunkerley79 It Gives an error on the auto-field say "At least one field must be selected" 

Means no data come, how can we re-check it? I put My API key and it accepts it (the key)

At Least One field selected.JPG

 

 

MAAbdullahAlMubarah
8 - Asteroid

Ok @jdunkerley79 I understand, The destination field after parsing gives null, How do we can handle it?

At Least One field selected -1.JPGls the setting is Ok in Google console?
API Key.JPG


MAAbdullahAlMubarah
8 - Asteroid

When I checked the Records it gives the following error: This API project is not authorized to use this API., Why this happened? 

TravisR
Alteryx Alumni (Retired)

Hey @MAAbdullahAlMubarah

 

I haven't used the Google DistanceMatrix API in a while - but I know back in June they made some significant changes to their API. My guess is that that is the root of your issue. I would recommend reading through their API documentation and trying to build out your own API call.

 

https://developers.google.com/maps/documentation/distance-matrix/start

MAAbdullahAlMubarah
8 - Asteroid

Thank You so much @jdunkerley79 Very great resource 

vshekharrc
7 - Meteor

Hi James,

 

I was trying to use the work flow that you have provided here. Instead of considering inputs in terms of spatial points, I would want to consider the combination of city, state, zip code and country because I do not have lat long info. In this case can I still use the concatenations that you have used?. If not, could you please let me know how can I input the below origin and destination details in the formula area and get the distance? For instance I have the following origin and destination detail and I would like to find the API distance in miles between them.

 

Origin details: DECATUR 62525 IL USA

destination details: LEWISBURG 37091 TN USA

 

Please find attached the excel file which has the origin and destination details . I have kept only 3 records here for simplicity.

 

Regards

Varun Shekhar

 

 

 

 

karol1
5 - Atom

Hello, thanks so much for this! I just had a few questions: how do I know whether this calculates the drivetime in peak times or quiet times? or e.g. the time of day it pulls the drivetime data from? thanks, karol 

Labels