What is the Route Optimization API

Route Optimization is a Google Maps Platform API that generates optimized route plans for single or multiple vehicles and their shipments.

Why use the Route Optimization API

Use the Route Optimization API to improve the operational efficiency of your transportation needs.

By using objectives and constraints unique to your business, you can create route plans that adjust for cost, time constraints, and customer needs. For example:

A screenshot of a map with three routes highlighted in different colors

  • A logistics company uses Route Optimization to optimize the assignments of all next-day shipments, optimized for time efficiency, cost saving, on-time delivery, and driver and end customer satisfaction.
  • An on-demand food delivery company uses Route Optimization in their dispatch process to choose the best active driver to pick up new orders and to insert them in their existing routes.
  • A field service provider uses Route Optimization to assign providers to appointments and find the optimal stop sequence for more than one appointment, all while re-optimizing routes when challenges come up, improving their efficiency and customer satisfaction.

What you can do with the Route Optimization API

Use Route Optimization API to optimize your fleet's routes and tasks assignments based on your own objectives and constraints.

  • Objectives: Your business goals.
  • Constraints: The limitations of your physical assets.
Objectives Constraints
Travel efficiency Optimize basic travel routes using parameters like distance and time-to-destination. Drivers work hours Assign routes to drivers based on their work hours and breaks.
On-time arrival Prioritize a pickup, delivery, or service to arrive before a specific time. Vehicle capacity Assign a vehicle to a task based on the amount of load it can carry.
Vehicle use cost Minimize the number of vehicles required to perform a task. Time windows Have a shipment or task arrive in a specific time slot.
Load balancing Fairly distribute tasks across a fleet of vehicles and personnel. Dependencies and compatibility Optimize your fleet routes based on your types of vehicle, task sequence, or shipment conditions.

How the Route Optimization API works

The Route Optimization API can be accessed using REST, gRPC, and client libraries.

Request body

The request body accepts information about your shipments and the vehicles available to deliver them. This includes details such as:

  • Pickup and delivery locations
  • Time windows
  • Shipment size and weight
  • Vehicle capacity

Response body

The response body provides a detailed route plan which includes:

  • Sequence of stops
  • Assigned shipments
  • Overall metrics

Read more details about constructing a request in Construct a Request Message and interpreting a response in Interpret the Response.

Resources

The following table summarizes the resources available through the Route Optimization API along with the data it returns.

Data resources Description and data returned Return format
optimizeTours This method returns an optimized route, with details of the visits and metrics. JSON or gRPC proto
batchOptimizeTours This method returns the resource name of a Long Running Operation, which indicates when processing is complete. JSON or gRPC proto

How to use the Route Optimization API

1 Get set up Start with Set up your Google Cloud project and complete the setup instructions that follow.
2 Run a basic request and receive a response After setup, start with sending a basic request and get the response, following Construct a Request and Interpret the Response.
3 Try a more advanced scenario and start creating your own request Explore example scenarios starting with Pickup and Delivery Stop Order Optimization and start building requests that match your use cases.

Available client libraries

For a list of the available client libraries for Route Optimization API, see Client Libraries.

What's next