Overview

GraphHopper offers a set of APIs for integrating advanced geospatial functionalities into web and mobile applications. Its primary focus is on efficient routing and navigation, building upon OpenStreetMap data for global coverage. The platform is designed for developers and technical buyers who require precise route calculations, real-time traffic integration, and tools for optimizing complex logistics operations. Core products include the GraphHopper Routing API, which computes optimal paths between points, considering various parameters like vehicle type, road access restrictions, and real-time traffic conditions. This API is critical for applications requiring turn-by-turn navigation or predictive travel times.

Beyond basic routing, GraphHopper provides a Matrix API to calculate travel times and distances between multiple origins and destinations. This feature is fundamental for logistics planning, allowing businesses to determine the most efficient sequence of stops for a fleet of vehicles. The Geocoding API enables the conversion of addresses into geographic coordinates and vice-versa, a common requirement for location-based services and data entry validation. For applications dealing with raw GPS data, the Map Matching API cleans and snaps imprecise GPS traces to the actual road network, offering a more accurate representation of travel paths.

Logistics and delivery optimization are further supported by the Route Optimization API, which addresses complex problems like the Traveling Salesperson Problem (TSP) and Vehicle Routing Problem (VRP). This API helps minimize operational costs by finding the most efficient routes for multiple vehicles and stops, considering factors such as time windows, capacities, and driver breaks. GraphHopper's architecture is built to handle large datasets and high request volumes, making it suitable for enterprise-scale applications in sectors such as ride-sharing, food delivery, field service management, and public transportation. Developers can access client libraries for Java and JavaScript, alongside examples in Python and cURL, facilitating integration into diverse development environments. The platform's commitment to using OpenStreetMap data provides a flexible and cost-effective alternative to proprietary mapping solutions, while its GDPR compliance addresses data privacy considerations for European operations.

Key features

  • Routing API: Calculates optimal routes between two or more points, supporting various transportation modes (car, bike, foot) and customizable parameters like shortest path or fastest path. The API can account for real-time and historical traffic data to provide accurate estimated travel times and directions.
  • Matrix API: Computes travel times and distances for many-to-many relationships, generating a comprehensive distance matrix between a set of origins and destinations. This is essential for network analysis and optimizing complex logistics.
  • Geocoding API: Converts human-readable addresses into geographic coordinates (forward geocoding) and converts coordinates back into addresses (reverse geocoding). This supports location search and display functionality in applications.
  • Map Matching API: Aligns raw GPS traces to the underlying road network, correcting for GPS inaccuracies and filling in gaps. This provides a clean and accurate representation of actual travel paths for analysis or display.
  • Route Optimization API: Solves complex vehicle routing problems (VRP) by optimizing sequences of stops for multiple vehicles, considering constraints such as time windows, vehicle capacities, and driver availability. This feature is particularly valuable for delivery and field service management.
  • OpenStreetMap Integration: Utilizes OpenStreetMap data for global coverage, providing a detailed and continuously updated map base for all routing and geocoding services. This allows for community-driven map improvements and flexibility in data usage, as detailed by the OpenStreetMap Foundation.
  • Customizable Profiles: Allows users to define custom routing profiles, adapting the routing logic to specific vehicle types or application needs beyond standard car, bike, or pedestrian profiles.
  • Traffic Integration: Incorporates real-time and historical traffic data to deliver more accurate estimated times of arrival (ETAs), enhancing the reliability of navigation and delivery schedules.

Pricing

GraphHopper offers a tiered pricing model, including a free starter tier and various paid plans based on request volume, with custom options for enterprise needs. Pricing is current as of May 28, 2026.

Plan Monthly Cost Requests Included (Monthly) Daily Request Limit Features
Starter Free 10,000 2,500 Routing, Geocoding, Map Matching, Matrix API
Basic $19 100,000 Unlimited All Starter features + Route Optimization
Premium $79 500,000 Unlimited All Basic features + higher rate limits, priority support
Enterprise Custom Custom Custom Dedicated infrastructure, custom SLA, advanced features, traffic data subscription

For detailed pricing information and current offers, refer to the GraphHopper pricing page.

Common integrations

  • OpenStreetMap: GraphHopper is built on OpenStreetMap data, providing a natural integration for applications that also use OSM for map display or data layers.
  • JavaScript Mapping Libraries (e.g., Leaflet, OpenLayers): Developers commonly integrate GraphHopper's routing and geocoding services with front-end mapping libraries to visualize routes and search results on interactive maps.
  • Fleet Management Systems: The Route Optimization API is integrated into fleet management software to optimize delivery schedules and vehicle assignments, improving operational efficiency.
  • Logistics Platforms: Companies use GraphHopper's Matrix and Optimization APIs within their logistics platforms for real-time dispatch, delivery planning, and inventory management.
  • Data Visualization Tools: Geospatial analysis applications can integrate GraphHopper to generate routes or perform map matching before visualizing data with tools like QGIS or ArcGIS.
  • Content Management Systems (CMS): For location-based content, GraphHopper's Geocoding API can be integrated to automatically convert addresses entered into a CMS into displayable map points.

Alternatives

  • OpenStreetMap: A collaborative project to create a free editable map of the world, offering raw geospatial data that can be used to build custom routing solutions.
  • Mapbox: Provides a suite of mapping and location APIs, including routing, geocoding, and map display, often used for custom map experiences and applications requiring real-time data.
  • HERE Technologies: Offers comprehensive mapping, routing, and location services with a strong focus on automotive and enterprise solutions, including high-definition maps and advanced traffic data.
  • Google Maps Platform: Provides a variety of APIs for maps, routes, and places, widely used for web and mobile applications requiring extensive mapping features and global coverage.
  • Esri ArcGIS Platform: Offers robust geospatial analysis, mapping, and routing capabilities for complex enterprise GIS applications, with extensive data management and visualization tools.

Getting started

To begin using the GraphHopper Routing API, you typically send an HTTP GET request to its endpoint with your desired start and end points and an API key. This example demonstrates how to fetch a route between Berlin and Hamburg using JavaScript.


const apiKey = 'YOUR_GRAPHHOPPER_API_KEY'; // Replace with your actual API key
const point1 = '52.520008,13.404954'; // Berlin coordinates (latitude, longitude)
const point2 = '53.551086,9.993682';  // Hamburg coordinates

const url = `https://graphhopper.com/api/1/route?point=${point1}&point=${point2}&vehicle=car&locale=en&calc_points=true&key=${apiKey}`;

fetch(url)
  .then(response => {
    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }
    return response.json();
  })
  .then(data => {
    if (data.paths && data.paths.length > 0) {
      const routePath = data.paths[0];
      console.log('Distance (meters):', routePath.distance);
      console.log('Time (milliseconds):', routePath.time);
      console.log('Route instructions:', routePath.instructions.map(inst => inst.text));
      // Additional processing for route geometry (routePath.points) can be done here
    } else {
      console.log('No route found.');
    }
  })
  .catch(error => {
    console.error('Error fetching route:', error);
  });

This JavaScript code snippet constructs a URL for the GraphHopper Routing API, specifying two points, the vehicle type ('car'), locale, and requesting that the route geometry ('calc_points=true') be returned. It then uses the fetch API to send the request and processes the JSON response. The success callback logs the distance, travel time, and turn-by-turn instructions of the primary route found. You can find more detailed examples and API parameters in the GraphHopper Routing API reference documentation.