osrmroute
Products
Data

Location Clustering

Group large sets of locations into balanced clusters by proximity — perfect for splitting deliveries across drivers or defining service zones.

Illustrative example
POST/api/1/cluster

Current plan limits

Free includes Routing, Route Optimization, Geocoding (including reverse lookup and autocomplete) and Matrix APIs within plan limits. Map Matching, Isochrone, Truck Routing, Fuel Estimate and other separate APIs require a paid plan, including PAYG. API access follows the account’s effective plan; a positive balance alone does not override Free restrictions. Road Data and AI retain their separate Business requirements.

Replace YOUR_KEY with your own API key. Paid API requests consume credits; copying this example does not send a request.

Current plans and pricing

Overview

The Location Clustering API groups large sets of locations into balanced clusters by proximity. Give it hundreds of points and a target number of groups, and it partitions them into compact, well-separated clusters — perfect for splitting deliveries across drivers, defining service territories or pre-grouping stops before optimisation.

API reference

POST/api/1/cluster
ParameterTypeStatus
customersarrayRequired

Example request

Credit cost: 3 credits
curl -X POST "https://osrmroute.com/api/1/cluster" \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"customers":[[49.85,40.37],[49.86,40.40],[49.83,40.39]],"clusters":2}'

Other services

OSRMRoute Support

Talk directly to our team

HERE TO HELP

How can we help?

Send a message. Ticket replies are also sent to your verified email.

Your chats

Your chats will appear here.