OSRM
Geospatial app component · Free + paid
A high-performance C++ routing engine based on OpenStreetMap: HTTP APIs for routes, nearest points, and distance matrices in your own geospatial apps.
What you can use for free
The open source component used locally or self-hosted for the stated workflow, within its license terms.
Paid features and costs
Your own server, external APIs, and compute; managed cloud hosting, support, and additional commercial features if selected.
Access and limitations
Code licensing and hosting costs are separate matters. Check the conditions for the specific version and edition.
Use cases
- Retrieve routes and distance matrices
- Prepare the graph and perform route and table requests for several coordinates
Example workflow
A possible workflow; this is not a report of hands-on testing.
Retrieve routes and distance matrices
Before you start
- OSM data for the required region and a travel profile.
- A test project and completion criteria for the task: Retrieve routes and distance matrices.
Steps
- Set up OSRM to test: OSM data for the required region and a travel profile.
- Prepare the graph and perform route and table requests for several coordinates.
- Integrate the checked version into your project; document its configuration, limitations, and recovery method.
Check your result
- Coordinates belong to the chosen graph; check the matrix and route with reference pairs.
- Check the result against a reference example; separately confirm the terms of any assets and external services used.
Choosing OSRM
Retrieve routes and distance matrices
Choose this when
- Retrieve routes and distance matrices
- Prepare the graph and perform route and table requests for several coordinates
Requirements
- The Docker quickstart requires OSM data and preprocessing: extract → partition → customize for MLD; CH uses contract and the corresponding routed algorithm.
Things to consider
- Costs and limits of free use: Your own server, external APIs, and computing resources; managed cloud hosting, support, and additional commercial features if selected.
- Terms of use: BSD-2-Clause
- Trip uses a greedy traveling-salesperson heuristic. Node/Python bindings provide read-only access to the routing engine.
Frequently asked questions
What can you use for free in OSRM?
The openly available portion, used locally or self-hosted for the stated use case within its license terms.
What additional costs might arise with OSRM?
Your own server, external APIs, and computing resources; managed cloud hosting, support, and additional commercial features if selected.
What terms of use matter for OSRM?
BSD-2-Clause
How do you get started with OSRM?
Set up OSRM to test: OSM data for the required region and a travel profile. Prepare the graph and perform route and table requests for several coordinates. Integrate the checked version into your project; document its configuration, limitations, and recovery method.
What does OSRM handle besides a single route?
The HTTP API, C++ interface, and Node bindings provide Nearest for snapping coordinates to the street network, Route for the fastest route, Table for time/distance matrices, Match for GPS traces, Trip for visit order, and Tile for routing metadata. For a self-hosted server, an OSM extract is first processed with a profile, then prepared through the chosen pipeline.
License
BSD-2-Clause
BSD2-Clause — free use with notices
Use, modification, and distribution of source code and binaries are permitted. Retain the copyright, conditions, and warranty disclaimer in source code; reproduce them in documentation or accompanying materials for a binary release. This license does not determine a separate service's pricing or support.
License termsTechnologies and topics
- OSRM
- Geospatial application component