Search and routing for India

Find places, turn coordinates into addresses, and get directions for cars, two-wheelers, cycles and walking. Built on OpenStreetMap and served from India.

Authentication

Every request needs an API key. Pass it as ?key=, or in the X-API-Key header from a backend.

Each key lists the websites allowed to use it. Requests from other websites are refused. Keys with server access also work from backends, which send no browser origin, so keep those keys secret.

curl "https://maps-api.apps.syncws.com/v1/search?q=Rankala&key=YOUR_KEY"

Search

GET/v1/search

Find places, landmarks and addresses. Fast enough to call on every keystroke. /v1/autocomplete is the same endpoint.

ParameterMeaning
qWhat to look for, e.g. Panhala fort. Required.
lat, lonRank results near this point, usually the map centre.
limitNumber of results, up to 20. Default 15.
bboxOnly results inside minLon,minLat,maxLon,maxLat.
osm_tagFilter by type, e.g. amenity:hospital or place:city.
layerOnly city, street, house, district, state and so on.
GET /v1/search?q=mahalaxmi+temple&lat=16.70&lon=74.24&limit=5&key=YOUR_KEY

Returns GeoJSON features with name, street, city, state, postcode and extent.

GET/v1/reverse

Turn a position into the nearest address or place.

GET /v1/reverse?lat=16.6913&lon=74.2449&key=YOUR_KEY

Routing

GET/v1/route

Directions between two or more points, with turn-by-turn instructions.

ParameterMeaning
from, toStart and end as lat,lon. Required.
viaStops on the way, separated by ;.
modecar (default), motorcycle, scooter, bicycle, walk, truck, bus or taxi.
alternativesUp to 3 other routes.
langInstruction language, e.g. en-US or hi-IN.
geometrygeojson adds the route line as GeoJSON in trip.geometry.
GET /v1/route?from=16.705,74.243&to=16.811,74.108&mode=motorcycle&geometry=geojson&key=YOUR_KEY

For every option, POST a full Valhalla route request to the same URL.

GET/v1/isochrone

The area you can reach within a number of minutes.

GET /v1/isochrone?lat=16.705&lon=74.243&minutes=10,20,30&mode=car&key=YOUR_KEY

POST/v1/matrix

Travel times and distances between many origins and destinations, as a Valhalla matrix request.

POST /v1/matrix?key=YOUR_KEY
{"sources":[{"lat":16.705,"lon":74.243}],"targets":[{"lat":16.811,"lon":74.108},{"lat":16.85,"lon":74.58}],"costing":"auto"}

POST/v1/trace

Snap a GPS track to roads, as a Valhalla map-matching request.

Errors and limits

Errors come back as {"error":{"code":"…","message":"…"}}. You'll see 401 for a missing or unknown key, 403 when the website isn't allowed, and 429 when the key's per-minute limit or daily quota is used up.

Coverage: India. Data © OpenStreetMap contributors, ODbL. Search by Photon, routing by Valhalla.