Boundary Lookup API
GlobalFind which country, state, city and district a coordinate falls in — with the boundary polygon on request.
Overview
The Boundary Lookup API tells you which administrative areas a coordinate falls in — country, state, county, city and district — from self-hosted OSM data. Optionally return the containing boundary as GeoJSON to draw it on a map. Perfect for regional pricing, compliance, territory assignment and analytics.
API reference
GET
/api/1/boundary| Parameter | Type | Status |
|---|---|---|
| point | string | Required |
| polygon | boolean | Optional |
| lang | string | Optional |
Example request
Credit cost: 1 creditcurl "https://osrmroute.com/api/1/boundary?point=40.4093,49.8671&key=YOUR_KEY"
Other services
Routing APIRoute Optimization APIGeocoding APIPlaces APIMatrix APIIsochrones APIMap Matching APINearest APITrip API (TSP)Location ClusteringDirections APIAlternative Routes APISnap to Road APIAutocomplete APIBatch Geocoding APITimezone APIElevation APIGeofencing APIElevation Profile APISolar APIGeometry Utilities APICoordinate Conversion APICountry Info API