With the GraphHopper Directions API you can integrate A-to-B route planning, turn-by-turn navigation, route optimization, isochrone calculations and other tools in your application.
The GraphHopper Directions API consists of the following RESTful web services:
Each API part has its own documentation. Jump to the desired API part and learn about the API through the given examples and tutorials.
In addition, for each API there are specific sample requests that you can send via Insomnia or Postman to see what the requests and responses look like.
To explore our APIs with Insomnia, follow these steps:
"api_key": your API key
To explore our APIs with Postman, follow these steps:
"api_key": your API key
To speed up development and make coding easier, we offer the following client libraries:
If you create your own client, make sure it supports http/2 and gzipped responses for best speed.
If you use the Matrix, the Route Optimization API or the Cluster API and want to solve large problems, we recommend you to reduce bandwidth
by compressing your POST request
and specifying the header as follows: Content-Encoding: gzip
. This will also avoid the HTTP 413 error “Request Entity Too Large”.
If you have problems or questions, please read the following information:
To stay informed about the latest developments, you can
Select the channel you like the most.
Currently, our main data source is OpenStreetMap. We also integrated other network data providers. This chapter gives an overview about the options you have.
OpenStreetMap covers the whole world. If you want to see for yourself if we can provide data suitable for your region, please visit GraphHopper Maps. You can edit and modify OpenStreetMap data if you find that important information is missing, e.g. a weight limit for a bridge. Here is a beginner’s guide that shows how to add data. If you have edited data, we usually consider your data after 1 week at the latest.
The Routing, Matrix and Route Optimization APIs support the following vehicle profiles:
Name | Description | Restrictions | Icon |
---|---|---|---|
car | Car mode | car access | |
small_truck | Small truck like a Mercedes Sprinter, Ford Transit or Iveco Daily | height=2.7m, width=2+0.4m, length=5.5m, weight=2080+1400 kg | |
truck | Truck like a MAN or Mercedes-Benz Actros | height=3.7m, width=2.6+0.5m, length=12m, weight=13000 + 13000 kg, hgv=yes, 3 Axes | |
scooter | Moped mode | Fast inner city, often used for food delivery, is able to ignore certain bollards, maximum speed of roughly 50km/h | |
foot | Pedestrian or walking without dangerous SAC-scales | foot access | |
hike | Pedestrian or walking with priority for more beautiful hiking tours and potentially a bit longer than foot . Walking duration is influenced by elevation differences. | foot access | |
bike | Trekking bike avoiding hills | bike access | |
mtb | Mountainbike | bike access | |
racingbike | Bike preferring roads | bike access |
Please note:
car
, small_truck
, truck
and scooter
) support turn restrictions via turn_costs=true
car
, bike
or foot
motorcycle
profile is available up on request. It is powered by the Kurviger Routing API and favors curves and slopes while avoiding cities and highways.If you want to include traffic, you can purchase the TomTom Add-on. This Add-on only uses TomTom’s road network and historical traffic information. Live traffic is not yet considered. If you are interested to learn how we consider traffic information, we recommend that you read this article.
Please note the following:
Contact us for more details.
We offer
Name | Description | Restrictions | Icon |
---|---|---|---|
car | Car mode | car access | |
small_truck | Small truck like a Mercedes Sprinter, Ford Transit or Iveco Daily | height=2.7m, width=2+0.4m, length=5.5m, weight=2080+1400 kg |
Use this page to mock GraphHopper Directions API in your testing and development.
Run our mock API sample using the open source WireMock library, or in the free edition of WireMock Cloud. You'll have a working API server simulating the behavior of GraphHopper Directions API, which will allow you to keep building and testing even if the actual API you isn't currently available.