Try it! You can test this by entering the URL into your web browser
(be sure to replace YOUR_API_KEY with your actual API key).
The response includes the distance and duration between the specified origins
and destinations.

Authentication, quotas, and policies

Activate the API and get an API key

To use the Google Maps Distance Matrix API, you must first activate the API in the
Google API Console and obtain the proper authentication credentials. You need to
provide an API key in each request (or a
client ID if you have a
Premium Plan).