GraphHopper Routing Web API

A fast and cost effective routing API with global coverage.

Web Routing API Details

Overview

At the core of our products is GraphHopper an efficient routing library and server based on OpenStreetMap data. You can easily start using it through our Routing Web API with world wide coverage and see that your business benefits from a reliable and fast service not standing in your way. You can use it for anything you imagine, from navigation app to outdoor planner. E.g. in the following video you can see how we use our API in GraphHopper Maps, a web based route planner.

GraphHopper

GraphHopper offers memory efficient algorithms in Java for routing on graphs. E.g. Dijkstra and A* but also optimized road routing algorithms like Contraction Hierarchies. It stands under the Apache License and is build on a large test suite.

License

We chose the Apache License to make it easy for you to embed GraphHopper in your products. We suggest to contribute back your changes (as GraphHopper will evolve fast) but of course this is not necessary.

OpenStreetMap Support

OpenStreetMap is directly supported from GraphHopper. Without the amazing data from OpenStreetMap GraphHopper wouldn't be possible at all. Other map data will need a custom import procedure.

Development

Development happens at GitHub. You can clone the project at GitHub.

Written in Java

GraphHopper is written in Java and runs on Linux, OS X, Windows, Raspberry Pi and Android. Other environments which supports at least Java 5 will work too.

Android

On Android we provide an integration with Mapsforge which makes offline navigation one step closer. Due to the usage of memory mapped files and Contraction Hierarchies we avoid allocating too much memory which makes it possible to run Germany-wide queries with only 32MB in a few seconds. We provide an Eclipse project as well as the Maven-Android integration to be used in other IDEs.

Web

With the web module we provide code to query GraphHopper over HTTP and decrease bandwidth usage as much as possible. For that we use the polyline encoding from Google, the Ramer–Douglas–Peucker algorithm and a simple GZIP servlet filter. On the client side we provide Java and JavaScript code (via Leaflet) to consume that service and visualize the routes.

Desktop

GraphHopper also works on the Desktop in a Java application without internet access. E.g. you could use the rough user interface called MiniGraphUI provided in the tools module. A fast map visualization can be easily implemented via mapsforge 0.4 as it supports the desktop via Swing/AWT. Or you have to use an older version of it. Ask on the mailing list for more up to date information.

Customizable API

We've build the GraphHopper class which makes simple things easy. Still you can use the low level API of GraphHopper and you'll see that it was created to allow fast and memory efficient use of the underlying datastructures and algorithms.

Features

  • Written in Java and runs under Linux, Windows, Android, ... and even offline in the Browser
  • Business friendly due to Apache License 2.0, commercial support and ... see below!
  • Based on many unit and integration tests
  • Memory efficient data structures, algorithms and also the API is tuned towards ease of use and efficiency.
  • Very fast. And via the speed-up technic called "Contraction Hierarchies" it can be even faster - CH is enabled by default.
  • Simple installation - just Java necessary! Simple setup for developers due to Maven.
  • Has algorithms ala A*, Dijkstra and the bidirected versions, plus one-to-many cases
  • Works out of the box with OpenStreetMap (osm and pbf) but can be adapted to use your own data
  • OpenStreetMap integration: Takes care of the road type, the surface, barriers, access restrictions, ferries, ...
  • Displays and takes into account elevation data
  • Uses only a few dependencies (trove4j and slf4j)
  • Scales from small indoor- to world-wide-sized graphs
  • Can be used on mobile devices with less than 32MB. For Android we additionally provide a demo with mapsforge.
  • Supports car, bicycle, pedestrian vehicles by default. But you can easily create your own or customize existing vehicles.
  • The web module provides GraphHopper routing as a service which can be accessed via Java or JavaScript.
  • The web module returns highly compressed paths via gzip and polyline encoding.

Community

Here you can find more about the Open Source routing library and server.

Download

0.3 release, 13-May-2014

Maven

Unstable 0.4

Routing Server zip, docs
Android apk, docs
Open Issues

0.2 release, 23-Nov-2013

Android (apk)
Solved Issues

0.1 release, 06-Aug-2013

Android (apk)
Solved Issues

Contact

Click to route


Email: email

Please ask questions on mailing list or if they are programming specific you can also use Stackoverflow

GraphHopper Enterprise

We offer different solutions to make routing simple and flexible. Routing problems occur in a wide range of applications: From outdoor planning to optimization in logistic software; from touristic apps to ridesharing websites - we can offer the right package for you!
Consulting
You have custom requirements? Read more
We provide training, support, development, hot fixes and more. Additionally we provide the GraphHopper Matrix Add-on.
Contact Us
  • We can help if you need fast one-time support or a support/maintenance contract
  • We train your developers
  • We can do the work if you don't want to host GraphHopper on your own
  • The GraphHopper Matrix Add-on provides distance matrix calculation with 10x speed up compared to the already fast GraphHopper core.
GraphHopper Web API
A hosted solution of GraphHopper which is fast, easy to use and reliable - see the endless possibilities of what you can build with it and the documentation for more details.
  • A fast routing solution based on OpenStreetMap
  • No limits: Use our routing API the way you want, for any application you want, including navigation!
  • Support for bicycle, walking and car [1] in all countries
  • Elevation data for every route and avoid hills (bike only)
  • Use the JSON, GPX or JSONP format for your desktop or mobile applications
  • With geocoding: address and POI search
Get Invitation

We are currently in closed alpha. If you wish to take part please email us and provide:

  • your company's name,
  • the requests per day of the production application and
  • your (approximative) use case of our API

Email: email

[1] Car routing is currently without turn restrictions.

How GraphHopper can help your business

GraphHopper proves useful for wide variety of applications. Just to mention some:
  • Point-to-point routing for routeplanning of cars, pedestrians or bicycles.
  • Special optimized routing for electric cars, motorbikes or emergency like police or ambulance
  • Outdoor or in-door routing
  • Routing optimized for many-to-many routes, useful in ridesharing, logistics or taxi applications
  • Routing in games or for urban planning and traffic simulation
GPSies, Outdoor
GPSies.com was our very first user. We worked closely with the founder Klaus together to reach the goal and replace the Google Maps API. GPSies lets the user share and create tracks for hiking and biking and is the biggest German provider of its kind serving over 150 000 requests per day in any part of the world. Now GPSies has the advantage of a cost effective and fast routing solution. Read more about the transition from Google Maps in German or in machine-translated English.
Optitool, Logistics
Dominik Giesa from OPTITOOL GmbH: "GraphHopper was the best choice to achieve our requirements for an OpenStreetMap routing engine. It's very fast, flexible and easily extendable. E.g. we do one-to-many search queries, custom weightings and even truck restrictions."
Komoot, Outdoor
We work closely together with Komoot GmbH to add features to GraphHopper important for Outdoor apps, e.g. displaying and taking into account the elevation so that hills can be avoided or favored depending on the profile. The result is a very fast route planning and route suggestion for touring, mountain and race bikers as well as for hikers. GraphHopper replaced an in-house engine and made routing 500 to 1000 times faster!
instantnavi
We do not limit your use case - you create just what you want with our GraphHopper Web API. instantnavi.com utilizes our Web API to offer an in-app navigation experience. Ie. it keeps your customers in your app where you have endless possibilities to inform the users along the route and at the destinations!
GraphHopper Maps
GraphHopper Maps started as our Demo but is now a fully fledged Maps application, with address suggestions and more. All driven by our Routing API providing world wide coverage of the routing for bicycles, pedestrians and cars. Try graphhopper.com/maps!
Wanderreitkarte, Outdoor
Wanderreitekarte.de "hiking and trail riding map" - uses a custom GraphHopper version named "Hoofmarker" to provide a navigation solution for traveling horsemen and hikers. It considers elevation differences as well as track surfaces and obstacles to find the most desirable off-road route. The dynamic routing can be guided by routing options and many waypoints. Elevation profiles help to judge the effort. Read more about it in German or machine translated English
Urban Planning and Games
The University of Clausthal uses GraphHopper in their lectures to let students play with traffic simulation and its results such as CO2 pollution. They will also play/animate the Scotland Yard game.
Education
A course at the University of Nottingham uses a modified version of GraphHopper to provide a personalized routing solution. Read more

Pricing - GraphHopper Web API

It will take you only a few minutes to get started with our Web API - pick a package and get started! There are no risks as you can try it free for 7 days.
Package
Price per month 1
Requests per day
Routing API
Geocoding API
Support 2
White-label 3
Standard
109 €
14,000 per day
V
V
V
No
Premium
249 €
40,000 per day
V
V
V
V
Custom
Custom
Custom
V
V
V
V
In 2014 you pay 20% less if paid annually, in 2015 and later we offer a 10% discount. We'll add more features as they come and you can use them for free. Servers will located in Germany or France. For more details read our complete terms.
  1. Prices do not include taxes.
  2. All packages include free online support, software and daily OpenStreetMap data updates. For the custom package a dedicated support contract can be bought.
  3. For packages with the white-label offer you do not need to display a prominent link to GraphHopper.com nearby the search results.

The GraphHopper Team says thanks to

  • OpenStreetMap - the best map data world wide!
  • NetBeans - for the best Java IDE!
  • YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications.
  • Xubuntu, Trove4J, Log4J, Guice, Maven and other Open Soure software.
  • Images and icons for our website via Wikipedia, and famfamfam icons!