Delivery route optimization task example

Route Planner API

Easily solve even complex route optimization tasks

  • Our Route Planner API is powerful and flexible enough to solve your vehicle routing and schedule optimization problems.
  • Use our API to create routing, logistics, and delivery solutions for your business. Or use it to build a platform for your customers.
  • Get started with free route optimization!

Visit our Documentation page to learn more about features, or try our free route planner now in our Playground!

Try Our Route Planner API

Try our live demo and see our route planning API in action. Select an area on the map, choose a vehicle route optimization task, and see how to solve it. It's easy:

1. Select a task from the list

The simulator will search for locations that fit the task description and display them on the map. You can look at vehicle starting positions, residences and buildings, warehouses etc. We use Places API to search locations on the map.

2. Press Optimize to calculate routes

The Route Planner API will find the best route for vehicles or agents. You can see the results on the map and displayed as a timeline.

3. Select a new map view to regenerate the task

Move the map around to choose a different view. Press “regenerate the task” to get new locations for the Route Planner API and see matching solutions.

Use Cases

Optimal route planning is key to success for any business focused on logistics, delivery, or building routes for people. Our Route Planner API helps you build the solutions you need to solve routing tasks, or to create route planner solutions for your customers.

Solve your most important routing tasks

Use our Route Planner API to solve your business routing tasks. Our route optimization API is flexible and customizable, so you can use it to solve your tasks in the most efficient and affordable way.

Whatever your exact requirements, our route planning API helps you develop a route planning solution. Once your solution is built, you'll get the results in the format you need.

Our interface gives you transparent changes for route calculation, and we don't charge extra for additional drivers, users or displays.

Use Route Planner API to build and sell solutions

Our paid plans allow white labeling, so you can build route organizer solutions and sell them under your own brand. Our white labeling doesn't incur extra costs, restrictions or limitations. You pay for the route calculations only.

Features and capabilities

Our flexible API takes into account constraints, time windows, and priorities

Solve route optimization problems

Route Planner API is flexible so you can develop solutions for the most well-known route optimization problems:

  • Building routes for multiple vehicles or agents
  • Building the optimal route for pickups and deliveries
  • Scheduling and route planning for professional services

Consider constraints

Build solutions that take into account constraints such as:

  • Vehicle / agent capacity
  • Vehicle / agent capabilities such as vehicle features or agent tools and skills
  • Specific job requirements

Set time frames

Create solutions that let you or you customers set time windows for vehicles, agents and jobs:

  • Set service times
  • Set working and opening hours
  • Set lunch breaks

Set different travel modes

  • Optimize routes for different travel modes
  • Build a solution that returns the best route for cars, trucks, motorcycles, bicycles, or walking.
  • Go here to see the full list (search for “travel modes”)

Avoid specific parts of routes

  • Create solutions that allow adding barriers around some locations to avoid them
  • Avoid tolls
  • Avoid specific parts of routes such as countries or cities

You can find the complete list of Route Planner API features on the API documentation page.

Getting started

Get started quickly with API Documentation, Playground, and Code samples

1. Visit our Playground to explore Route Planner API features, input and output parameters

See examples of tasks you can solve with our route planning API in the API Playground. Choose a task that is similar to yours from the dropdown list, and check the API request object and result structure.

The input object describes the Route Planner task, and the returned object contains a GeoJSON.FeatureCollection object where each object represents an agent execution plan.

Here are examples of input and result objects:

      { "start_location":[ -3.6705633, 40.5172291 ], "time_windows":[ [ 0, 10800 ] ] },
      { "start_location":[ -3.651263064675685, 40.51553235 ], "time_windows": [ [ 0, 10800 ] ] },
      { "start_location":[ -3.660241470310801, 40.5176717 ], "time_windows":[ [ 0, 10800 ] ] }
      { "id": "order_1", "pickup": { "location_index": 0, "duration": 120 }, "delivery": { "location":[ -3.67715033613878, 40.509209439673135 ], "duration":240 } },
      { "id": "order_2", "pickup": { "location_index": 0, "duration": 120 }, "delivery": { "location":[ -3.67715033613878, 40.509209439673135 ], "duration":120 } },
      { "id": "order_6", "delivery": { "location_index": 0, "duration":120 }, "pickup":{ "location":[ -3.6779564485281186, 40.5109186 ], "duration":120 } },
      { "id":"warehouse-0", "location": [-3.6716357, 40.513842 ]}

The documentation page has detailed information about the API specification, billing details, and code samples.

2. Get your Geoapify API key

You'll need an API Key to use the API. Register on MyProject Geoapify to get yours.

3. Generate HTTP Post request

Generate an HTTP post request with input data and make the call. You can use request objects from the API Playground as examples of how you could use our route optimization API for your business. Here are examples of calling Route Planner API:

fetch('', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    body: JSON.stringify(routePlannerInput)
.then(res => res.json())
.then(res => console.log(res));
4. Process and visualize results

The API returns a FeatureCollection GeoJSON object as a result. As most map client libraries (MapLibre GL, Mapbox GL, Leaflet, OpenLayers, etc.) natively support GeoJSON, the result can be easily visualized on a map. Check out code samples of Route Planner API data processing and GeoJSON visualization on Geoapify APIDocs.

NPM Libraries[coming soon]

Check out our NPM libraries @geoapify/route-planner

This is a helper library that shows you how to use the route planning API with a developer-friendly interface.

It has dedicated methods to create specific route optimization tasks like pickup/delivery, food delivery, transport routes optimization, etc.

With the library you can easily define tasks and calculate routes, as well as modify existing routes. For example, you can reorder the results manually if you need to.

You can send synchronous and asynchronous requests which allows you to send large and time-consuming tasks.

How Much Does It Cost?

We've kept our costs straightforward, and you can get started for free with our free route planner. Start developing your application today, and then extend depending on your needs.

The cost of a request depends on the number of locations you specify. Locations include:

  • agent start and end locations
  • shipment pickup, delivery
  • and job locations.

Then the API request cost is calculated as follows:

  • For requests with less than 10 locations, REQUEST_COST = NUMBER_OF_LOCATIONS * NUMBER_OF_LOCATIONS
  • For requests with more than 10 locations, REQUEST_COST = NUMBER_OF_LOCATIONS * 10

So, for example, if you have 7 agents with start and end locations set + 30 jobs, ( 7*2 + 30 = 44 location in total) will cost 44 * 10 = 440 credits.

We have a Freemium pricing model that includes 3000 free credits per day. When you have big volumes, we offer unmetered tariffs from 700€ / month.

Check our Pricing Plans to learn more, and use our credits calculator to figure out which Pricing Plan is most appropriate for you.

Not sure which pricing plan you'll need? Get in touch and we'll help you figure out the best plan for your business.


Is the Route Planner API GDPR compliant?

We are a German company and provide GDPR-compliant services. Our default API endpoints use only European data centers. Dedicated endpoints can utilize other server locations, even located in your intranet.

Which variants of VRP can be solved by Geoapify Route Planner API?

Use our route optimization API to solve many variations of VRP including the Travelling salesman problem (TSP), Capacitated Vehicle Optimization Problem (CVRP), Vehicle Routing Problem with Time Windows (VRPTW), Multi-Depot Vehicle Routing Problem (MDVRP), and Pickup and Delivery Problem with Time Windows (PDPTW).

Can I combine Constraints and Time Windows in one task?

Sure! You can solve any mix of the supported VRP variants.

Can we integrate the Route Planner API into our ERP system and sell it to our customers?

Absolutely. You can develop your own Route Planner that uses the API and sell it.

We expect to have high volumes of API requests. Can we have custom conditions?

Yes! Contact us, and we will find conditions beneficial for both sides!

World map

Ready To Get Started?

Try out our demo on this page to see how Route Planner API can help your business.

Or visit our Playground to try out free route optimization.

Need help getting started? Get in touch and we'll be happy to help.