Try the next generation of Distance Matrix features with the Routes API, now available in Preview.
Stay organized with collections Save and categorize content based on your preferences.

Get Started

Start building with the Distance Matrix API.
Create an account, generate an API key, and start building.
Get the travel distance and journey duration for a matrix of origins and destinations.
Use Java, Python, Go, or Node.js client libraries to work with Google Maps Services on your server.
Get the OpenAPI specification for the Distance Matrix API, also available as a Postman collection.

Features

Learn about core features of the Distance Matrix API.
Make a distance matrix request that calculates travel time based on current traffic conditions.
Specify whether a calculated route should pass through a particular side of the road.

Example app

Run live code samples on your local machine and favorite code playgrounds with the Maps JavaScript API.
Use the DistanceMatrixService object to fetch the distances between a set of locations.

Help & support

Get help. Give help. Join the community.

Get help. Give Help. Build Maps karma.

Report a bug or open a feature request.

Find out about platform incidents and outages.

Get help from the Google Maps Platform team.