canonical: https://jentic.com/apis/onemap.gov.sg/onemap

# OneMap Singapore API

The OneMap Singapore API geocodes and routes locations within Singapore using the national base map maintained by the Singapore Land Authority. Its search endpoint turns an address, postal code, or building name into coordinates with address details, and reverse geocoding turns coordinates back into the nearest addresses. Routing returns directions between two points, coordinate conversion moves between WGS84, SVY21, and Web Mercator systems, and theme services expose curated map layers. Developers building Singapore-focused apps use it as an authoritative local alternative to global geocoders, with data tuned to Singapore's addresses and street network.

## For AI agents

Geocode and reverse geocode Singapore addresses, get routes between points, convert coordinate systems, and read map themes from OneMap.

## Scope

Covers Singapore locations only and does not provide global geocoding or live traffic. Use it for Singapore geocoding, reverse geocoding, routing, coordinate conversion, and map themes only.

## Capabilities

- Search an address, postal code, or place name for coordinates and address details
- Reverse geocode a coordinate to the nearest Singapore addresses
- Get a route and directions between two points
- Convert coordinates between WGS84, SVY21, and Web Mercator systems
- Retrieve available map themes and their features
- Obtain a session token for authenticated requests

## Use cases

### Singapore Address Geocoding

An agent turns a user-supplied address or postal code into coordinates by calling GET `/api/common/elastic/search` with the `searchVal` and geometry flags. Because the data is the national base map, matches for Singapore addresses are more reliable than a global geocoder.

Example prompt: Geocode a Singapore postal code and return its latitude and longitude with address details

### Reverse Geocoding for Nearby Addresses

Given a coordinate from a device or map click, an agent calls GET `/api/public/revgeocode` to find the nearest buildings and addresses. This labels a map pin or resolves a GPS fix into a human-readable Singapore address.

Example prompt: Reverse geocode a latitude and longitude and return the nearest Singapore address

### Point-to-Point Routing

For trip planning, an agent calls GET `/api/public/routingsvc/route` to get a route and directions between an origin and destination. This powers navigation and travel-time estimates using Singapore's street network.

Example prompt: Get a walking route between two Singapore coordinates and return the distance and steps

### Coordinate System Conversion

When integrating with local GIS data, an agent converts between global and Singapore coordinate systems using GET `/api/common/convert/4326to3857` and its siblings. This keeps map layers aligned when combining WGS84 inputs with SVY21 datasets.

Example prompt: Convert a WGS84 coordinate to Web Mercator for a mapping layer

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/api/common/elastic/search` | Geocode an address, postal code, or place name |
| GET | `/api/public/revgeocode` | Reverse geocode a coordinate to nearby addresses |
| GET | `/api/public/routingsvc/route` | Get a route between two points |
| GET | `/api/common/convert/4326to3857` | Convert WGS84 coordinates to Web Mercator |
| POST | `/api/auth/post/getToken` | Obtain an access token for authenticated requests |

## Key resources

- **Search** — Address, postal code, and place-name geocoding
- **Reverse Geocode** — Nearest addresses for a given coordinate
- **Routing** — Routes and directions between two points
- **Coordinate Conversion** — Conversion between WGS84, SVY21, and Web Mercator

## Why Jentic

- **Setup:** Using the OneMap Singapore API by hand means posting for a bearer token, refreshing it before it expires, and formatting each geocoding or routing call yourself. Through Jentic you install once, import the API from the API Directory, store the credential once, and your agent geocodes, reverse geocodes, and routes.
- **Permission scoping:** OneMap exposes distinct operations for search, reverse geocode, routing, conversion, and themes, so scope by operation: allow an agent the lookups it needs and leave routing or theme services out of the allowed set until you add them.
- **Credential handling:** Your OneMap credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'geocode a Singapore address' or 'reverse geocode a coordinate', and Jentic returns the matching OneMap operation with its input schema so the agent calls the right endpoint.

## Related APIs

- **Mapbox API** — Mapbox geocodes and routes worldwide; OneMap is the authoritative source inside Singapore.
- **OpenCage Geocoder** — OpenCage offers global forward and reverse geocoding; OneMap specializes in Singapore addresses.
- **Geoapify API** — Geoapify adds places and isolines; OneMap supplies authoritative Singapore geocoding and routing.

## FAQ

### What does the OneMap Singapore API do?

It geocodes and routes locations within Singapore on the national base map. You can search an address or postal code for coordinates, reverse geocode a coordinate to nearby addresses, get routes between points, convert coordinate systems, and read curated map themes.

### What authentication does the OneMap Singapore API use?

Most endpoints expect a bearer token in the Authorization header, which you obtain by posting your account email and password to the token endpoint. The spec notes a token stays valid for 3 days. Through Jentic the credential is held by your own instance and supplied at execution time.

### How do I geocode a Singapore address?

Call GET `/api/common/elastic/search` with `searchVal` set to the address or postal code and the geometry flags you need. It returns matching results with coordinates and address details drawn from the national base map.

### Can I convert between coordinate systems?

Yes. GET `/api/common/convert/4326to3857` and its sibling endpoints convert between WGS84, SVY21, and Web Mercator, which keeps global inputs aligned with Singapore GIS datasets.

### What are the rate limits for the OneMap Singapore API?

The OpenAPI specification does not declare rate limits. Cache repeated geocoding lookups and back off on error responses; confirm current limits in the OneMap developer documentation.

### Do I need an MCP server to use the OneMap Singapore API with an agent?

You do not. Jentic connects the API to your agent directly from the API Directory: import it, store your credential once, and the agent calls the geocoding and routing operations without a separate server to run.

### Can I limit what my agent is allowed to do with the OneMap Singapore API?

Yes. Because you run Jentic One yourself, you decide the allowed operations: an agent can be permitted to search and reverse geocode while routing and theme services stay excluded, and the token stays with your instance and is applied at call time.
