google-maps/compute-route-matrix
Compute Route Matrix is a method in the Routes API service that accepts an HTTPS request and returns distances and travel times for a matrix of routes between different origin and destination locations. Calculate travel times and distances for multiple destinations for up to 625 route elements.
With Compute Route Matrix you can...
Determine the most efficient routes for dispatch scheduling, such as:
How best to assign a set of workers to pick up a series of packages
Determine the best warehouse from which to ship packages to their final destination
Get a matrix of possible routes between many start and end locations. You can specify multiple origins and destinations per server-side request with the number of origins times the number of destinations up to 625. You can stream elements of the response before the entire matrix has been calculated, lowering response latency.
Request these kinds of route data to determine the most efficient way to route passengers, shipments, or workers between multiple origins and destinations:
Distance in kilometers or miles for a selected travel mode
Estimated travel time in traffic
reference: https://developers.google.com/maps/documentation/routes/compute-route-matrix-over provided by Google ©2025