osrmroute
Products
Navigation

OSRM Nearest API

Snap any coordinate to the closest point on the real road network. Essential for cleaning GPS input before routing.

Illustrative example
GET/api/v1/osrm/nearest/v1/{profile}/{coordinates}

Current plan limits

Free includes Routing, Route Optimization, Geocoding (including reverse lookup and autocomplete) and Matrix APIs within plan limits. Map Matching, Isochrone, Truck Routing, Fuel Estimate and other separate APIs require a paid plan, including PAYG. API access follows the account’s effective plan; a positive balance alone does not override Free restrictions. Road Data and AI retain their separate Business requirements.

Replace YOUR_KEY with your own API key. Paid API requests consume credits; copying this example does not send a request.

Current plans and pricing

Overview

The Nearest API snaps any coordinate to the closest point on the real road network and returns the matched location. It is the building block for cleaning user input before routing, validating pickup/drop-off points, and finding which road a coordinate belongs to. Fast and precise, it underpins reliable routing pipelines.

API reference

GET/api/v1/osrm/nearest/v1/{profile}/{coordinates}
ParameterTypeStatus
profilestringRequired
coordinatesstringRequired
numberintegerOptional

Example request

Credit cost: 1 credit
curl "https://osrmroute.com/api/v1/osrm/nearest/v1/driving/49.8516,40.3777?number=3" -H "Authorization: Bearer YOUR_KEY"

Other services

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.