- First go here:
https://developers.google.com/maps/documentation/distance-matrix/start
You need to: Create or select a project, Enable the API and Get an API key
Just click on the "Get a Key" and assuming you have a Gmail account you can get everything going (alternatively go to console.developer.google.com after logging in to your gmail account, and create an app, and enable the API, and get the API key there).
- Now go to https://developers.google.com/maps/documentation/distance-matrix/intro and follow the details. A couple things to note: use these:
&mode=driving&departure_time=now&traffic_model=pessimistic if you want current traffic to influence your drive time. I also used &units=imperial
The duration in traffic is returned only if all of the following are true:
The request includes a departure_time parameter.
The request includes a valid API key, or a valid Google Maps APIs Premium Plan client ID and signature.
Traffic conditions are available for the requested route.
The mode parameter is set to driving.
As of at least May 2019, you are now allowed display the drive time with or without a map.
You can display Distance Matrix API results on a Google Map, or without a map. If you want to display Distance Matrix API results on a map, then these results must be displayed on a Google Map. It is prohibited to use Distance Matrix API data on a map that is not a Google map.
Source: Distance Matrix usage limits, also checkout Google Maps Terms & Conditions
Note that Mapquest doesn't show drive times based on actual traffic.