GraphHopper Distance Matrix: API & OSM Hosting Guide Answer-first: GraphHopper distance matrix is a high-performance open-source routing engine endpoint that calculates travel times and road distances for N×M origin-destination coordinate pairs using OpenStreetMap data. By utilizing Contraction Hierarchies and memory-mapped graphs, self-hosted GraphHopper evaluates a 100×100 matrix in under 52ms, providing 99.7% cost savings over commercial APIs with runtime vehicle customization.
How to Call the GraphHopper Matrix API (/matrix Endpoint) Running GraphHopper distance matrix in production requires configuring Docker deployment, the /matrix API endpoint, Custom Models for vehicle-specific routing (truck/motorcycle), H3-based Redis caching, and evaluating performance tradeoffs against OSRM, Valhalla, and Google Maps (for an in-depth analysis of routing engine selection, see our OSRM vs GraphHopper Architecture Comparison).
...