osrmroute
Sign in
Open Source Routing Machine

OSRM API — Overview

Hosted OSRM (Open Source Routing Machine) — a production API without self-hosting.

cURL · New York
curl --fail-with-body "https://osrmroute.com/api/v1/osrm/route/v1/driving/-73.9855,40.7580;-73.9712,40.7831?overview=full&geometries=geojson" \
  -H "Authorization: Bearer YOUR_API_KEY"
Open API playground →

Core OSRM services

Route, Table, Match, Trip and Nearest are the standard OSRM operations. Use the hosted endpoints with your OSRMRoute API key; plans, credits and input limits apply.

OSRM Route ServiceCalculate a road route through the points in the supplied order for driving, cycling or walking. Request instructions with steps=true and select GeoJSON with geometries=geojson.OSRM Table ServiceCalculate road-network travel times and distances between the coordinates in a request. Request limits and processing time depend on your plan and matrix size.OSRM Match ServiceMatch noisy GPS samples to candidate road segments. Review the returned geometry and confidence information before using it in an operational record.OSRM Trip ServiceOrder the stops for one vehicle using road travel times. Get the visit order, route, distance and estimated duration for driving, walking or cycling.OSRM Nearest ServiceFind nearby road candidates for one coordinate. Choose driving, walking or cycling, set a search radius and heading, and retrieve road names, matched positions and offsets.

Additional OSRMRoute APIs

Isochrones, fleet optimization and geocoding are separate OSRMRoute capabilities with their own request formats, coverage and credit rules. They are not core OSRM operations.

Isochrone APICalculate reachable areas from one origin by travel time or road distance for driving, walking and cycling. Get up to four GeoJSON polygon or line contours.Route Optimization APIAssign stops and order visits using vehicle capacity, time windows, driver skills and vehicle constraints supplied with the request.Geocoding APISearch for an address or place and return coordinates, or look up the nearest address for a coordinate. Validate the results against your workflow.

OSRM API — Answers for building with OSRMRoute

What is OSRMRoute?

Routing, maps and address search for your application.

How do I get an API key?

Verify your email, then create a project and API key in the dashboard. Use Authorization: Bearer YOUR_KEY where documented. Keep server credentials private; browser or mobile integrations need the documented restrictions or short-lived Mobile Access credentials.

Is there a free tier?

The Free plan supports selected APIs and limited trials for non-commercial tests and personal projects. It does not unlock every paid API. Check Pricing for the current allowance and service limits. Public demos have their own limits.

How many credits do Route, Directions and Truck Routing use?

Successful requests cost one credit per 10 input points, rounded up, including origin and destination. A 2-point request costs 1 credit; 11 points cost 2. Returned geometry vertices do not count. Directions alternatives are included in the same request. Plan limits still apply.

Are unsuccessful API requests charged?

A processed Route, Directions or Truck request with no suitable nearby road or connected route costs 0.5 credit once. Invalid input, access/plan rejection, unsupported graph coverage and server/upstream failures are not charged. The full successful price is reserved first; any unused reservation is released.

What are the rate limits and quotas?

The account’s credit and per-minute request limits are shared by all API keys. A key can have a lower limit; creating another key does not increase the account limit. The dashboard shows usage and remaining allowance.

OSRMRoute Support

Talk directly to our team

HERE TO HELP

How can we help?

Send a message. Ticket replies are also sent to your verified email.

Your chats

Your chats will appear here.