Skip to main content
GET
Snap a single coordinate to the nearest routable segments

Authorizations

Authorization
string
header
required

API key created in the JustRouting dashboard.

Path Parameters

profile
enum<string>
required
Available options:
driving,
motorcycle
coordinates
string
required

A single {lng},{lat} pair.

Query Parameters

number
integer
default:1

Number of nearest segments to return.

Required range: x >= 1
bearings
string

{bearing},{range};... per coordinate, e.g. 0,20 = north ±20°.

radiuses
string

Snapping radius in meters per coordinate, or unlimited.

hints
string

Base64 hints from a previous response to speed up snapping.

approaches
string

Restrict the road direction at each waypoint: curb / opposite / unrestricted (default), e.g. curb;opposite.

exclude
string

Road classes to avoid (additive list), e.g. motorway.

snapping
enum<string>
default:default

default avoids edges that cannot be used as start/end points; any snaps to any edge in the graph.

Available options:
default,
any
generate_hints
boolean
default:true

Add a hint to response waypoints for reuse in later requests.

skip_waypoints
boolean
default:false

Remove waypoints from the response (still calculated, not serialized).

Response

Snapped segments

code
enum<string>
Available options:
Ok
waypoints
object[]