OneMap Routing
Governmentby Singapore Land Authority (SLA)
Turn-by-turn routing within Singapore for drive, walk, cycle and public transport modes, including bus and train legs with fares for the pt mode. Free alternative to commercial routing for SG-only apps.
How to authenticate
- 1Register a free account at onemap.gov.sg.
- 2POST email and password to https://www.onemap.gov.sg/api/auth/post/getToken to get a 3-day access_token.
- 3Send the token in the Authorization header on every routing call.
Example request
curl -H 'Authorization: YOUR_TOKEN' 'https://www.onemap.gov.sg/api/public/routingsvc/route?start=1.320981,103.844150&end=1.326762,103.8559&routeType=drive'Example response
{"status_message":"Found route between points","route_geometry":"encoded_polyline...","route_summary":{"total_time":420,"total_distance":3600}}Notes for AI agents
routeType=pt needs extra params (date, time, mode=TRANSIT, maxWalkDistance). Geometry is an encoded polyline; decode with any polyline library.
Machine-readable version: /api/apis/onemap-routing
Related APIs
OneMap Reverse Geocode
Singapore Land Authority (SLA)
Convert WGS84 or SVY21 coordinates into the nearest Singapore buildings, block numbers, road names and postal codes within a chosen buffer. Companion endpoints expose themes and planning-area population queries.
OneMap Search (Geocoding)
Singapore Land Authority (SLA)
Authoritative Singapore address and place search: postal codes, building names and roads to coordinates in both WGS84 and SVY21. The standard way to geocode SG addresses.