OneMap Singapore - Search

FREE
By kyroskoh
Updated 4 months ago
-/10
Popularity Score
-
Latency
-
Success Rate

OneMap Singapore - Search API Documentation

New OneMap is the authoritative national map of Singapore with the most detailed and timely updated information developed by the Singapore Land Authority. There are also many useful day-to-day information and services contributed by government agencies. 'OneMap Singapore - Search' is your most accurate search on Building names, Postal Code, MRTs, etc.

View API Details
GETSearch
GETSearch

Search

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
searchtextSTRING
REQUIRED
getaddrdetailsSTRING
REQUIREDY/N
returngeomSTRING
REQUIREDY/N
pagenumberNUMBER
REQUIRED
Code Snippet
unirest.get("https://kyroskoh-onemap-singapore-search-v1.p.rapidapi.com/?searchVal=psa%20building&returnGeom=Y&getAddrDetails=Y&pageNum=1")
.header("X-RapidAPI-Host", "kyroskoh-onemap-singapore-search-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://kyroskoh-onemap-singapore-search-v1.p.rapidapi.com/?searchVal={searchtext}&returnGeom={returngeom}&getAddrDetails={getaddrdetails}&pageNum={pagenumber}
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://kyroskoh-onemap-singapore-search-v1.p.rapidapi.com/?searchVal=psa%20building&returnGeom=Y&getAddrDetails=Y&pageNum=1")
.header("X-RapidAPI-Host", "kyroskoh-onemap-singapore-search-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication