OSRM computes routes, tables, map matching, and related tasks on OpenStreetMap data. Access services via HTTP, C++, Node.js, or Python bindings after preprocessing extracts.
Overview
The Open Source Routing Machine (OSRM) is a C++ routing engine designed for OpenStreetMap road networks. After you preprocess an OSM extract into routable files, osrm-routed exposes a fast HTTP API used by apps, logistics tools, and demos.
Available services include snapping coordinates to the network, fastest-path routing between points, duration or distance tables across many coordinates, map matching for GPS traces, traveling-salesman style trip ordering, and vector tiles with routing metadata. Pipelines use either Contraction Hierarchies or Multi-Level Dijkstra preprocessing; MLD is the default recommendation for general routing.
Docker images on Debian streamline extract, partition, customize, and serve steps on a chosen port. Images are also listed in a container registry with release and debug variants. Node.js and Python packages offer read-only in-process access for applications that embed the engine instead of calling HTTP.
Community documentation covers the HTTP API, binding usage, and demo server policies. The project encourages contributions alongside optional financial support.
Key features
- Route, table, nearest, and match APIs
- Trip and vector tile endpoints
- CH and MLD preprocessing pipelines
- Docker-based extract and server workflow
- Node.js and Python bindings
- HTTP API on osrm-routed
- OpenStreetMap extract preprocessing
- Optional osrm-frontend map UI
Use cases
- Self-hosted turn-by-turn routing API
- Distance matrices for logistics planning
- GPS trace map matching on OSM roads
- Embedding routing in Node or Python apps
- Regional routing from custom OSM extracts