osrmroute-com Routing API
The Routing API API from osrmroute-com — 1 operation(s) for routing api.
The Routing API API from osrmroute-com — 1 operation(s) for routing api.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/osrmroute-com:osrmroute-com-routing-api-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: OSRMRoute Routing API
version: 1.1.0
description: 'OSRMRoute — Maps, Routing, Truck Routing, Search, Road Data, Studio and integration APIs. Use `Authorization: Bearer ` unless an operation documents another flow. Legacy APIs also accept the key query parameter; New geospatial APIs, MCP and private map delivery require Bearer authentication. Mobile challenge/token endpoints use device attestation instead. Coordinates and units are documented per operation: GeoJSON uses longitude,latitude; some legacy and background-job inputs use latitude,longitude. Examples are illustrative, not guaranteed current results. Guides · Mobile Access · MCP · Postman collection.'
contact:
name: OSRMRoute Support
url: https://osrmroute.com/contact
email: support@osrmroute.com
termsOfService: https://osrmroute.com/terms
servers:
- url: https://osrmroute.com
security:
- bearerAuth: []
- apiKeyQuery: []
tags:
- name: Routing API
paths:
/api/v1/osrm/route/v1/{profile}/{coordinates}:
get:
tags:
- Routing API
summary: Routing API
description: The Routing API calculates routes on the road network between two or more points and returns geometry, distance, estimated duration and optional instructions. Driving coverage is global; walking and cycling use regional graphs. Response time depends on region, graph cache and request complexity. Test representative journeys for your application.
operationId: get_routing
parameters:
- name: profile
in: path
required: true
description: 'Transport mode profile. Supported values: driving (car), cycling (bike), walking (pedestrian).'
schema:
type: string
example: driving
- name: coordinates
in: path
required: true
description: 'Coordinates of the points. Format: lon,lat;lon,lat;lon,lat... (at least 2 points).'
schema:
type: string
example: 49.8516,40.3755;49.8378,40.3892
- name: overview
in: query
required: false
description: 'Detail level of the returned route geometry: simplified, full (full geometry), false (no geometry).'
schema:
type: string
example: full
- name: geometries
in: query
required: false
description: 'Geometry format: geojson (GeoJSON object), polyline (encoded string).'
schema:
type: string
example: geojson
- name: steps
in: query
required: false
description: Whether step-by-step instructions are returned for each turn.
schema:
type: boolean
example: true
responses:
'200':
description: Successful response
content:
application/json:
examples:
success:
summary: Illustrative abbreviated response; values vary with input and map data.
value:
code: Ok
routes:
- distance: 3200
duration: 420
geometry:
type: LineString
coordinates:
- - 49.8516
- 40.3777
- - 49.86
- 40.4
legs:
- distance: 3200
duration: 420
steps: []
waypoints:
- name: Example road
location:
- 49.8516
- 40.3777
distance: 4.2
'400':
description: Error Codes (HTTP 400)
content:
application/json:
examples:
InvalidQuery:
value:
code: InvalidQuery
error: Coordinates must be finite longitude,latitude pairs.
'401':
description: Error Codes (HTTP 401)
content:
application/json:
examples:
auth:
value:
error: Invalid API Key
'402':
description: Error Codes (HTTP 402)
content:
application/json:
examples:
balance:
value:
error: 'Insufficient balance: this request costs 1 credit and your balance is 0 credits. Top up your account to continue.'
'403':
description: Error Codes (HTTP 403)
content:
application/json:
examples:
plan:
value:
error: This API Key is disabled
'422':
description: Error Codes (HTTP 422)
content:
application/json:
examples:
ProfileNotAvailable:
value:
code: ProfileNotAvailable
error: This travel profile is not available at one or more coordinates. No driving fallback was used.
NoNearbyRoad:
value:
code: NoNearbyRoad
error: No connected route within 2000 metres of the requested coordinates.
'429':
description: Error Codes (HTTP 429)
content:
application/json:
examples:
rate:
value:
error: 'Rate limit exceeded: more than 60 requests per minute. Please slow down.'
'500':
description: Error Codes (HTTP 500)
content:
application/json:
examples:
upstream:
value:
error: Internal Server Error
x-credit-cost: 1 credit
x-request-limits:
- points ≥ 2; points ≤ plan.maxRoutePoints
- snap_distance_m ≤ 2000
components:
securitySchemes:
apiKeyQuery:
type: apiKey
in: query
name: key
bearerAuth:
type: http
scheme: bearer