Route Optimization API

Find the fastest order to visit up to 50 stops

How it works

1

Send your stops

Pass 2 to 50 waypoints, with time windows and loads if you have them.

2

Plaza optimizes

Travel times on the road network, turn restrictions included.

3

Get optimal order

Stops in visiting order, with each leg's time, the running total and, with constraints, arrival and wait at each stop.

See it in action

An example request and its response, drawn on the map.

terminal
$

Who uses this

Teams building with Route Optimization API.

Last-mile delivery

Put each driver's drops in the fastest order.

Field service

Order a technician's visits around customers' appointment windows.

Food delivery

Batch and optimize multi-pickup restaurant orders.

50

Max stops

1

Vehicle per request

What you can build

Example apps powered by Route Optimization API.

Delivery Router

Optimize stop order for a fleet of delivery drivers.

Optimization Routing Geocoding

Field Service Scheduler

Put each technician's visits in the fastest order.

Optimization Distance Matrix

Sales Territory Planner

Optimize travel between client meetings across a region.

Optimization Routing Isochrone

Start building

curl -X POST "https://plaza.fyi/api/v1/optimize" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "auto",
"waypoints": [
{
"coordinates": [
-74.006,
40.7128
],
"type": "Point"
},
{
"coordinates": [
-73.9855,
40.758
],
"type": "Point"
},
{
"coordinates": [
-73.9857,
40.7484
],
"type": "Point"
}
]
}'
View endpoints
Method Path Description
POST /api/v1/optimize Order the stops, with optional time windows, service times and capacity
GET /api/v1/optimize/:job_id Poll async optimization job status

How it compares

Google: $10/1K requests (Routes Optimization)
Plaza: from $1.50/1K
Mapbox: $2/1K requests (Optimization v2)
Plaza: from $1.50/1K
Both: Separate service from routing
Plaza: Same API, same key, same bill

Common questions

What problem does it solve?

One vehicle visits every stop once. With just stops, that's the traveling salesman problem: the order with the least travel time. Add time windows, service times or a capacity and you get the order that finishes soonest while keeping all of them. Set roundtrip to false for a one-way trip.

How long do optimization requests take?

Up to 10 stops come back in the response. Larger jobs run in the background: the POST returns a job_id, and you poll /api/v1/optimize/:job_id for the result.

Can I set time windows or vehicle capacities?

Yes, for one vehicle. Give each stop a time window (seconds after departure, or clock times with depart_at), a service time and a demand, plus the vehicle's capacity. Negative demands are pickups. Each stop comes back with its arrival, wait and load. If no order fits the windows, you get a 422 that says which stop can't be reached in time. Loads that need a second vehicle or a second trip are refused too: there's no fleet routing yet.