
Route Matrix API - distance matrix for many places
Distance and travel time for up to 1000 source or target locations at once
- Use the distance matrix as an input for route optimization algorithms
- "Drive", "Truck", "Bicycle", "Walk" travel modes
- Separate Source and Target locations
Try it now with our Playground! Or Start Now for Free with our Freemium pricing model!
Getting started
Works via HTTP and have simple data formats
Step 1. Register and get an API Key
You will require an API Key to use the API. Register on MyProject Geoapify and get an API key.
Step 2. Generate and call HTTP Post request
Generate an HTTP Post request with input data and make the call. Use our Playground and Documentation learn about Route Matrix API request/response structure.
Here is an example of generating an API request:
- HTTP POST call
- Request object example
- Response object example
const data = {
mode: 'drive', // or 'truck' or 'walk' or 'bicycle'
sources: sources,
targets: targets
}
fetch('https://api.geoapify.com/v1/routematrix?apiKey=YOUR_API_KEY', {
method: 'post',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
}).then(res=>res.json())
.then(result => console.log(result));
Create a new solution or use the existing one
Save time, resources, and money by choosing existing solutions
The Route Matrix underlies Geoapify optimization and analytics APIs. It could happen that some of them already solves your problem! Try them in the Playground!

Route Planner API
The Route Planner API solves route optimization and route planning problems (VRP and its variants). This lets you find optimal delivery and pickup routes, generate schedules for agents, plan usage of shared resources.

Isolines API
The Isoline API calculates isochrones and isodistances that can be used for travel time optimization, reachability analysis, discovering potentially promising and underestimated locations.
FAQ
How is the Route Matrix API billed?
The Route Matrix requests belong to the "Routing" requests group. The cost of the call depends on a number of elements of the matrix. However, we have special conditions for big amounts. Learn more about the API pricing on the API Documentation page.
How many locations can I send to the Matrix API in one request?
The API allows calculating 1000 matrix elements at once. For example, this can be a matrix of 1000x1, 20x50 or 31x32 dimensions.
How can I calculate a distance matrix of a bigger dimension?
The elements of the distance matrix are independent, so you can split a bigger matrix into multiple.
Can we offer to our customers a Route Optimizer that utilizes the Geoapify Matrix API inside? Do you have restrictions for competitive APIs?
Sure! We do not have restrictions for competitive APIs.
Can you provide custom conditions for high volumes?
Yes! Contact us and we will find conditions beneficial for both sides!

Get time-distance data for multiple places!
Solve optimization problems with Route Matrix API!
Contact us in case of any questions and we will be happy to answer them!