One Map, Singapore API

Geocoding / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

OneMap Singapore is the official mapping API provided by the Singapore Land Authority for Singapore addresses and geographic data. You can search for addresses, convert postal codes to coordinates, and calculate routes within Singapore. It uses real, authoritative government data so results are highly accurate for Singapore locations.

💡

Beginner Tip

You need a free account at onemap.gov.sg to get an API token. The token is short-lived (3 hours), so build token refresh logic into your app or re-authenticate as needed.

Available Data

book title and author
ISBN and publisher
cover image URL
page count
publication date

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from One Map, Singapore",
    "description": "Singapore Land Authority REST API services for Singapore addresses",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

results Array of address records matching the search query
results[].SEARCHVAL The address string as indexed in the database
results[].BLK_NO Block or building number of the address
results[].ROAD_NAME Name of the road for the address
results[].POSTAL 6-digit Singapore postal code
results[].LATITUDE Latitude coordinate of the address

Implementation Example

// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://www.onemap.gov.sg/docs/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized JWT token is missing, expired, or malformed
Re-authenticate by posting your credentials to the /api/auth/post/getToken endpoint to get a fresh token
No results for postal code The postal code may be new or not yet in the system
Use a 6-digit Singapore postal code; check the official SingPost website to confirm the code is valid
Route calculation fails Origin or destination coordinates are outside Singapore
OneMap only covers Singapore; verify your coordinates are within Singapore bounds (lat 1.1-1.5, lon 103.5-104.1)

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Geocoding
Difficulty Intermediate
Verified: 2026-04-07

Similar APIs

View All →