NAV

Introduction


    ..#######..##....##.########.##.....##....###....########.
    .##.....##.###...##.##.......###...###...##.##...##.....##
    .##.....##.####..##.##.......####.####..##...##..##.....##
    .##.....##.##.##.##.######...##.###.##.##.....##.########.
    .##.....##.##..####.##.......##.....##.#########.##.......
    .##.....##.##...###.##.......##.....##.##.....##.##.......
    ..#######..##....##.########.##.....##.##.....##.##.......

Welcome to the OneMap 2.0 API Documentation. We are here to solve your needs in the area of geospatial development in Singapore.

Tap on our extensive set of APIs and let your imagination run wild.You could mashup your own data, search for addresses and do much more on our basemaps.

Keep watching this space, we would keep improving our API as we are moving ahead!

Basemap

A wide range of maps were designed and created by our UX designer and developers. Colour scheme can be changed easily as well as providing hassle-free in development process.

We are currently serving EPSG:3857 Coordinate System for all our maps where this Spherical Mercator projection is popularized by most map service providers.

All of our maps are responsive and catered to different mobile sizes including tablets.

You can view the demo and sample codes at our micro-site.


Authentication Service (POST)



/privateapi/auth/post/getToken

HTTPS Requests:

POST /privateapi/auth/post/getToken

Example Response:
{
   "access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjUsInVzZXJfaWQiOjUsImVtYWlsIjoiY2xvc2VkYXBpdXNlcjFAc2xhLmdvdi5zZyIsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC9kZi5zbWFydGdlby5zZzo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDYwNTM1NjAxLCJleHAiOjE0NjA1MzkyMDEsIm5iZiI6MTQ2MDUzNTYwMSwianRpIjoiZThjZGMxZmYxM2Y3MWVmZWU0MTQ1ZGEwNzVjYzE0Y2MifQ.gXhl_OUdufq0g_VJDrnY0kHJCU4aE8VoS3quWAqnV-w",
   "expiry_timestamp":"1460794801"
}
HTML Example:
    <!DOCTYPE html>
    <html>
      <body>
      <script
      src="https://code.jquery.com/jquery-3.2.1.min.js"
      integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
      crossorigin="anonymous"></script>  
      <script>
        //This is for html page (ajax)
        var form = new FormData();
        form.append("email", "youremail@onemap.sg");
        form.append("password", "yourpassword");

        var settings = {
          "async": true,
          "crossDomain": true,
          "url": "https://developers.onemap.sg/privateapi/auth/post/getToken",
          "method": "POST",
          "processData": false,
          "contentType": false,
          "mimeType": "multipart/form-data",
          "data": form
        }

        $.ajax(settings).done(function (response) {
          document.write(response);
        });
      </script>

      </body>
    </html>
NodeJS Example:
    var request = require("request");

    var options = { method: 'POST',
      url: 'https://developers.onemap.sg/privateapi/auth/post/getToken',
      headers: 
       { 'cache-control': 'no-cache',
         'content-type': 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' },
      formData: { email: 'youremail@onemap.sg', password: 'yourpassword' } };

    request(options, function (error, response, body) {
      if (error) throw new Error(error);

      console.log(body);
    });

This API authenticates the user credentials and the service returns response in JSON format.

Please note that token is not required for our Search and Coordinate Converters and Static Map services.

We have also provided a list of authentication modules for OneMap 2.0.

The parameters should be placed as Form Data inside your POST request body.

Parameters

Variables Description
email
Required
Registered email entered by the user during the registration.
password
Required
Registered password entered by the user during the registration.

OneMap REST APIs



/commonapi/search

Usage:

/commonapi/search?searchVal={SearchText}&returnGeom={Y/N}&getAddrDetails={Y/N}&pageNum={PageNumber}

Examples:

With optional variables:
https://developers.onemap.sg/commonapi/search?searchVal=revenue&returnGeom=Y&getAddrDetails=Y&pageNum=1

Sample Response(Only 2 Results):
{  
   "found":5,
   "totalNumPages":1,
   "pageNum":1,
   "results":[  
      {  
         "SEARCHVAL":"INLAND REVENUE AUTHORITY OF SINGAPORE (IRAS)",
         "BLK_NO":"55",
         "ROAD_NAME":"NEWTON ROAD",
         "BUILDING":"INLAND REVENUE AUTHORITY OF SINGAPORE (IRAS)",
         "ADDRESS":"55 NEWTON ROAD, SINGAPORE 307987",
         "POSTAL":"307987",
         "X":"28983.7537272647",
         "Y":"33554.4361084122",
         "LATITUDE":"1.31972890510723",
         "LONGITUDE":"103.842158118267",
         "LONGTITUDE":"103.842158118267"
      },
      {  
         "SEARCHVAL":"REVENUE HOUSE",
         "BLK_NO":"55",
         "ROAD_NAME":"NEWTON ROAD",
         "BUILDING":"REVENUE HOUSE",
         "ADDRESS":"55 NEWTON ROAD, SINGAPORE 307987",
         "POSTAL":"307987",
         "X":"28977.8507137401",
         "Y":"33547.5712691676",
         "LATITUDE":"1.31966682211667",
         "LONGITUDE":"103.842105076401",
         "LONGTITUDE":"103.842105076401"
      }
   ]
}
HTML Example:
<html>
    <head>
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.2.min.js"></script>
        <script>
        function Cloud(){
        $.ajax({
        url: 'https://developers.onemap.sg/commonapi/search?searchVal=revenue&returnGeom=Y&getAddrDetails=Y&pageNum=1',
        success: function(result){
            //Set result to a variable for writing
            var TrueResult = JSON.stringify(result);
            document.write(TrueResult);
            }});
        }

        Cloud();
      </script>
    </head>
</html>

This API provides searching of address data for a given search value. It will return search results with both latitude, longtitude and x, y coordinates of the searched location.

Parameters

Variables Description
searchVal
Required
Keywords entered by the user that is used to filter out the results.
returnGeom {Y/N}
Required
Check if user wants to return the geometry.
getAddrDetails {Y/N}
Required
Check if user wants to return address details to a point.
pageNum
Optional
Specify the page to retrieve your search results from.

Reverse Geocode(SVY21)



/privateapi/commonsvc/revgeocodexy

Usage:

/privateapi/commonsvc/revgeocodexy?location={x,y}&token={token}&buffer={buffer}&addressType={addressType}

Examples:

With optional variables:
https://developers.onemap.sg/privateapi/commonsvc/revgeocodexy?location=24291.97788882387,31373.0117224489&token=0v9hsciobp1ifa5bgpkin21cs3&revgeocodexy?&buffer=100&addressType=all

Without optional variables:
https://developers.onemap.sg/privateapi/commonsvc/revgeocodexy?location=24291.97788882387,31373.0117224489&token=0v9hsciobp1ifa5bgpkin21cs3

Example Response (Snippet):
{
   "GeocodeInfo":[
      {
         "BUILDINGNAME":"NEW TOWN PRIMARY SCHOOL",
         "BLOCK":"300",
         "ROAD":"TANGLIN HALT ROAD",
         "POSTALCODE":"148812",
         "XCOORD":"24303.327416",
         "YCOORD":"31333.331116",
         "LATITUDE":"1.2996418106402365",
         "LONGITUDE":"103.80011086725216",
         "LONGTITUDE":"103.80011086725216"
      },
      {
         "BUILDINGNAME":"TANGLIN GROVE",
         "BLOCK":"32",
         "ROAD":"TANGLIN HALT ROAD",
         "POSTALCODE":"142032",
         "XCOORD":"24223.6525182",
         "YCOORD":"31330.9784764",
         "LATITUDE":"1.2996205246185784",
         "LONGITUDE":"103.79939513682201",
         "LONGTITUDE":"103.79939513682201"
      },
      {
         "BUILDINGNAME":"TANGLIN GROVE",
         "BLOCK":"31",
         "ROAD":"TANGLIN HALT ROAD",
         "POSTALCODE":"141031",
         "XCOORD":"24233.1128068",
         "YCOORD":"31302.3827686",
         "LATITUDE":"1.2993619162948145",
         "LONGITUDE":"103.79948011985593",
         "LONGTITUDE":"103.79948011985593"
      }
   ]
}
HTML Example:
<html>
    <head>
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.2.min.js"></script>
        <script>
        function GeoXY(){
        $.ajax({
        url: 'https://developers.onemap.sg/privateapi/commonsvc/revgeocodexy?location=24291.97788882387,31373.0117224489&token=0v9hsciobp1ifa5bgpkin21cs3?revgeocodexy?&buffer=100&addressType=all',
        success: function(result){
            //Set result to a variable for writing
            var TrueResult = JSON.stringify(result);
            document.write(TrueResult);
            }});
        }

        GeoXY();
      </script>
    </head>
</html>

This API provides retrieval of a building address that lies within the defined buffer/radius of the specified x, y coordinates.

Road names are retuned within 20m for the specified coordinates. The response is in JSON format.

Parameters

Variables Description
location {x, y}
Required
X,Y Coordinates in SVY21 format.
token
Required
API token provided by the Authentication Service.
buffer
Optional
Default: 10
Values: 0-500 (in meters)
Like a compass, it will round up all buildings in a circumference from a point, and search building addresses within the buffer/radius range.
addressType
Optional
Default: All
Values: HDB, All
Provide user the selection of All or HDB properties within the buffer/radius. If HDB is chosen, this will filter to show all HDB-related building.
otherFeatures
Optional
Default:N
Values: Y, N
Enables users to retrieve information on reserviors, playgrounds, jetties and much more.

Reverse Geocode(WGS84)



/privateapi/commonsvc/revgeocode

Usage:

/privateapi/commonsvc/revgeocode?location={latitude,longitude}&token={token}&buffer={buffer}&addressType={addressType}

Examples:

With optional variables:
https://developers.onemap.sg/privateapi/commonsvc/revgeocode?location=1.3,103.8&token=0v9hsciobp1ifa5bgpkin21cs3&buffer=100&addressType=all

Without optional variables:
https://developers.onemap.sg/privateapi/commonsvc/revgeocode?location=1.3,103.8&token=0v9hsciobp1ifa5bgpkin21cs3

Example Response (Snippet):
{
   "GeocodeInfo":[
      {
         "BUILDINGNAME":"NEW TOWN PRIMARY SCHOOL",
         "BLOCK":"300",
         "ROAD":"TANGLIN HALT ROAD",
         "POSTALCODE":"148812",
         "XCOORD":"24303.327416",
         "YCOORD":"31333.331116",
         "LATITUDE":"1.2996418106402365",
         "LONGITUDE":"103.80011086725216",
         "LONGTITUDE":"103.80011086725216"
      },
      {
         "BUILDINGNAME":"TANGLIN GROVE",
         "BLOCK":"32",
         "ROAD":"TANGLIN HALT ROAD",
         "POSTALCODE":"142032",
         "XCOORD":"24223.6525182",
         "YCOORD":"31330.9784764",
         "LATITUDE":"1.2996205246185784",
         "LONGITUDE":"103.79939513682201",
         "LONGTITUDE":"103.79939513682201"
      },
      {
         "BUILDINGNAME":"TANGLIN GROVE",
         "BLOCK":"31",
         "ROAD":"TANGLIN HALT ROAD",
         "POSTALCODE":"141031",
         "XCOORD":"24233.1128068",
         "YCOORD":"31302.3827686",
         "LATITUDE":"1.2993619162948145",
         "LONGITUDE":"103.79948011985593",
         "LONGTITUDE":"103.79948011985593"
      }
   ]
}
HTML Example:
<html>
    <head>
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.2.min.js"></script>
        <script>
        function GeoLatLong(){
        $.ajax({
        url: 'https://developers.onemap.sg/privateapi/commonsvc/revgeocode?location=1.3,103.8&token=0v9hsciobp1ifa5bgpkin21cs3&buffer=100&addressType=all',
        success: function(result){
            //Set result to a variable for writing
            var TrueResult = JSON.stringify(result);
            document.write(TrueResult);
            }});
        }

        GeoLatLong();
      </script>
    </head>
</html>

This API provides retrieval of a building address that lies within the defined buffer/radius of the specified latitude, longitude coordinates. Road names are retuned within 20m for the specified coordinates. The response is in JSON format.

Parameters

Variables Description
location {latitude, longitude}
Required
Latitude and longitude Coordinates in WGS84 format.
token
Required
API token provided by the Authentication Service.
buffer
Optional
Default: 10
Values: 0-500 (in meters)
Like a compass, it will round up all buildings in a circumference from a point, and search building addresses within the buffer/radius range.
addressType
Optional
Default: All
Values: HDB, All
Provides user the selection of All or HDB properties within the buffer/radius. If HDB is chosen, this will filter to show all HDB-related building.
otherFeatures
Optional
Default:N
Values: Y, N
Enables users to retrieve information on reserviors, playgrounds, jetties and much more.

Coordinates Converters

This API provides 6 conversion functions between EPSG 3414 (SVY21), EPSG 3857 and EPSG 4326 (WGS84) formats.

4326(WGS84) to 3857



/commonapi/convert/4326to3857

Usage:

/commonapi/convert/4326to3857?latitude={latitude}&longitude={longitude}

Example:

https://developers.onemap.sg/commonapi/convert/4326to3857?latitude=1.319728905&longitude=103.8421581

Example Response:
{
   "Y":146924.54200324757,
   "X":11559656.16256661
}

Parameters

Variables Description
latitude
Required
Latitude Coordinates in WGS84 format.
longitude
Required
Longitude Coordinates in WGS84 format.

4326(WGS84) to 3414(SVY21)



/commonapi/convert/4326to3414

Usage:

/commonapi/convert/4326to3414?latitude={latitude}&longitude={longitude}

Example:

https://developers.onemap.sg/commonapi/convert/4326to3414?latitude=1.319728905&longitude=103.8421581

Example Response:
{
   "X":28983.788791079794,
   "Y":33554.5098132845
}

Parameters

Variables Description
latitude
Required
Latitude Coordinates in WGS84 format.
longitude
Required
Longitude Coordinates in WGS84 format.

3414(SVY21) to 3857



/commonapi/convert/3414to3857

Usage:

/commonapi/convert/3414to3857?X={X Coordinates}&Y={Y Coordinates}

Example:

https://developers.onemap.sg/commonapi/convert/3414to3857?X=28983.788791079794&Y=33554.5098132845

Example Response:
{
   "Y":146924.61623592745,
   "X":11559655.939078204
}

Parameters

Variables Description
X
Required
X Coordinates in SVY21 format.
Y
Required
Y Coordinates in SVY21 format.

3414(SVY21) to 4326(WGS84)



/commonapi/convert/3414to4326

Usage:

/commonapi/convert/3414to4326?X={X Coordinates}&Y={Y Coordinates}

Example:

https://developers.onemap.sg/commonapi/convert/3414to4326?X=28983.788791079794&Y=33554.5098132845

Example Response:
{
   "latitude":1.319729571666614,
   "longitude":103.84215609236949
}

Parameters

Variables Description
X
Required
X Coordinates in SVY21 format.
Y
Required
Y Coordinates in SVY21 format.

3857 to 3414(SVY21)



/commonapi/convert/3857to3414

Usage:

/commonapi/convert/3857to3414?X={X Coordinates}&Y={Y Coordinates}

Example:

https://developers.onemap.sg/commonapi/convert/3857to3414?Y=146924.54200324757&X=11559656.16256661

Example Response:
{
    "X":28983.788791079794,
    "Y":33554.50981328348
}

Parameters

Variables Description
X
Required
X Coordinates in SVY21 format.
Y
Required
Y Coordinates in SVY21 format.

3857 to 4326(WGS84)



/commonapi/convert/3857to4326

Usage:

/commonapi/convert/3857to4326?X={X Coordinates}&Y={Y Coordinates}

Example:

https://developers.onemap.sg/commonapi/convert/3857to4326?Y=146924.54200324757&X=11559656.16256661

Example Response:
{
    "latitude":1.319728904999991,
    "longitude":103.8421581
}

Parameters

Variables Description
X
Required
X Coordinates in SVY21 format.
Y
Required
Y Coordinates in SVY21 format.

Themes

In One Map 2.0, we have a wonderful compilation of Themes from different agencies. We hope to simplify your life with a simple REST call!

Check Theme Status



/privateapi/themesvc/checkThemeStatus

Usage:

/privateapi/themesvc/checkThemeStatus?queryName={queryName}&dateTime={dateTime}&token={token}

Example:

https://developers.onemap.sg/privateapi/themesvc/checkThemeStatus?queryName=dengue_cluster&dateTime=2015-02-10T16:00:00.000Z&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjUsInVzZXJfaWQiOjUsImVtYWlsIjoiY2xvc2VkYXBpdXNlcjFAc2xhLmdvdi5zZyIsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC9kZi5zbWFydGdlby5zZzo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDYwOTYxNTI2LCJleHAiOjE0NjA5ODEzMjYsIm5iZiI6MTQ2MDk2MTUyNiwianRpIjoiMzI2ZjFmNzVmMmQxZGYxODJiNDNmNjgyNWIwMWFmYjEifQ.g7BidyQPfPbS5XzkixvJ6oAk360DsRu0Sym7h2APQhU

Example Response: 
{
   "UpdatedFile":false
}

Check whether a theme is out of date.

Parameters

Variables Description
queryName
Required
The theme that you wish to query status on. Our Themes’ query name could be retrieved using Get All Themes Info service.
dateTime
Required
The date and time. Format YYYY-MM-DDTHH:MM:SS:FFFZ.
EG: 2015-02-10T16:00:00.000Z.
token
Required
API token provided by the Authentication Service.

Get Theme Info



/privateapi/themesvc/getThemeInfo

Usage:

/privateapi/themesvc/getThemeInfo?token={token}&queryName={queryName}

Example:

https://developers.onemap.sg/privateapi/themesvc/getThemeInfo?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjUsInVzZXJfaWQiOjUsImVtYWlsIjoiY2xvc2VkYXBpdXNlcjFAc2xhLmdvdi5zZyIsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC9kZi5zbWFydGdlby5zZzo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDYwOTYxNTI2LCJleHAiOjE0NjA5ODEzMjYsIm5iZiI6MTQ2MDk2MTUyNiwianRpIjoiMzI2ZjFmNzVmMmQxZGYxODJiNDNmNjgyNWIwMWFmYjEifQ.g7BidyQPfPbS5XzkixvJ6oAk360DsRu0Sym7h2APQhU&queryName=kindergartens

Example Response:
{  
   "Theme_Names":[  
      {  
         "THEMENAME":"Kindergartens",
         "QUERYNAME":"kindergartens"
      }
   ]
}
HTML Example:
<html>
    <head>
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.2.min.js"></script>
        <script>
        function ThemeNamesByQuery(){
        $.ajax({
        url: 'https://developers.onemap.sg/privateapi/themesvc/getThemeInfo?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjUsInVzZXJfaWQiOjUsImVtYWlsIjoiY2xvc2VkYXBpdXNlcjFAc2xhLmdvdi5zZyIsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC9kZi5zbWFydGdlby5zZzo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDYwOTYxNTI2LCJleHAiOjE0NjA5ODEzMjYsIm5iZiI6MTQ2MDk2MTUyNiwianRpIjoiMzI2ZjFmNzVmMmQxZGYxODJiNDNmNjgyNWIwMWFmYjEifQ.g7BidyQPfPbS5XzkixvJ6oAk360DsRu0Sym7h2APQhU&queryName=kindergartens',
        success: function(result){
            //Set result to a variable for writing
            var TrueResult = JSON.stringify(result);
            document.write(TrueResult);
            }});
        }

        ThemeNamesByQuery();
      </script>
    </head>
</html>

This API searches the theme via the queryName and returns the theme info.

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
queryName
Required
The particular theme that you wish to retrieve info on. Our Themes’ query name could be retrieved using Get All Themes Info service.

Get All Themes Info



/privateapi/themesvc/getAllThemesInfo

Usage:

/privateapi/themesvc/getAllThemesInfo?token={token}&moreInfo={Y/N}

Example:

With optional variables:
https://developers.onemap.sg/privateapi/themesvc/getAllThemesInfo?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjUsInVzZXJfaWQiOjUsImVtYWlsIjoiY2xvc2VkYXBpdXNlcjFAc2xhLmdvdi5zZyIsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC9kZi5zbWFydGdlby5zZzo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDYwOTYxNTI2LCJleHAiOjE0NjA5ODEzMjYsIm5iZiI6MTQ2MDk2MTUyNiwianRpIjoiMzI2ZjFmNzVmMmQxZGYxODJiNDNmNjgyNWIwMWFmYjEifQ.g7BidyQPfPbS5XzkixvJ6oAk360DsRu0Sym7h2APQhU&moreInfo=Y

Without optional Variables:
https://developers.onemap.sg/privateapi/themesvc/getAllThemesInfo?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjUsInVzZXJfaWQiOjUsImVtYWlsIjoiY2xvc2VkYXBpdXNlcjFAc2xhLmdvdi5zZyIsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC9kZi5zbWFydGdlby5zZzo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDYwOTYxNTI2LCJleHAiOjE0NjA5ODEzMjYsIm5iZiI6MTQ2MDk2MTUyNiwianRpIjoiMzI2ZjFmNzVmMmQxZGYxODJiNDNmNjgyNWIwMWFmYjEifQ.g7BidyQPfPbS5XzkixvJ6oAk360DsRu0Sym7h2APQhU

Example Response (Without optional variables; Snippet): 
{
   "Theme_Names":[
      {
         "THEMENAME":"PA Headquarters",
         "QUERYNAME":"paheadquarters"
      },
      {
         "THEMENAME":"After Death Facilities",
         "QUERYNAME":"afterdeathfacilities"
      },
      {
         "THEMENAME":"WaterActivities@SG",
         "QUERYNAME":"aquaticsg"
      },
      {
         "THEMENAME":"AXS Express Top Up",
         "QUERYNAME":"axs_express_topup"
      },
      {
         "THEMENAME":"Bloodbank locations",
         "QUERYNAME":"blood_bank"
      }
   ]
}
HTML Example:
<html>
    <head>
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.2.min.js"></script>
        <script>
        function Themes(){
        $.ajax({
        url: 'https://developers.onemap.sg/privateapi/themesvc/getAllThemesInfo?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjUsInVzZXJfaWQiOjUsImVtYWlsIjoiY2xvc2VkYXBpdXNlcjFAc2xhLmdvdi5zZyIsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC9kZi5zbWFydGdlby5zZzo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDYwOTYxNTI2LCJleHAiOjE0NjA5ODEzMjYsIm5iZiI6MTQ2MDk2MTUyNiwianRpIjoiMzI2ZjFmNzVmMmQxZGYxODJiNDNmNjgyNWIwMWFmYjEifQ.g7BidyQPfPbS5XzkixvJ6oAk360DsRu0Sym7h2APQhU',
        success: function(result){
            //Set result to a variable for writing
            var TrueResult = JSON.stringify(result);
            document.write(TrueResult);
            }});
        }

        Themes();
      </script>
    </head>
</html>

This API retrieves and returns a list of all available themes available.

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
moreInfo
Optional
Default: N
Values: Y, N
This will return more information of the themes if set as Y such as icon names, category names, and theme owners.

Retrieve Theme



/privateapi/themesvc/retrieveTheme

Usage:

/privateapi/themesvc/retrieveTheme?queryName={Query Name}&token={token}&extents={Set Location}

Examples:

With optional variables:
https://developers.onemap.sg/privateapi/themesvc/retrieveTheme?queryName=kindergartens&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjUsInVzZXJfaWQiOjUsImVtYWlsIjoiY2xvc2VkYXBpdXNlcjFAc2xhLmdvdi5zZyIsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC9kZi5zbWFydGdlby5zZzo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDYwOTYxNTI2LCJleHAiOjE0NjA5ODEzMjYsIm5iZiI6MTQ2MDk2MTUyNiwianRpIjoiMzI2ZjFmNzVmMmQxZGYxODJiNDNmNjgyNWIwMWFmYjEifQ.g7BidyQPfPbS5XzkixvJ6oAk360DsRu0Sym7h2APQhU&extents=1.291789,%20103.7796402,1.3290461,%20103.8726032

Without optional variables:
https://developers.onemap.sg/privateapi/themesvc/retrieveTheme?queryName=kindergartens&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjUsInVzZXJfaWQiOjUsImVtYWlsIjoiY2xvc2VkYXBpdXNlcjFAc2xhLmdvdi5zZyIsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC9kZi5zbWFydGdlby5zZzo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDYwOTYxNTI2LCJleHAiOjE0NjA5ODEzMjYsIm5iZiI6MTQ2MDk2MTUyNiwianRpIjoiMzI2ZjFmNzVmMmQxZGYxODJiNDNmNjgyNWIwMWFmYjEifQ.g7BidyQPfPbS5XzkixvJ6oAk360DsRu0Sym7h2APQhU

Example Response (Snippet):
{
   "SrchResults":[
      {
         "FeatCount":59,
         "Theme_Name":"Kindergartens",
         "Category":"Education",
         "Owner":"MINISTRY OF EDUCATION",
         "DateTime":{"date":"2017-03-08 23:00:04.254000","timezone_type":1,"timezone":"+00:00"}
      },
      {
         "NAME":"JHS Montessori Kindergarten",
         "DESCRIPTION":"Kindergartens",
         "ADDRESSPOSTALCODE":"248373",
         "ADDRESSSTREETNAME":"491B River Valley Road #02-01 Valley Point Tower",
         "LatLng":"1.29307225899878,103.827075942185",
         "ICON_NAME":"school.gif"
      },
      {
         "NAME":"Kim Keat Christian Church Kindergarten",
         "DESCRIPTION":"Kindergartens",
         "ADDRESSPOSTALCODE":"339843",
         "ADDRESSSTREETNAME":"11 Beng Wan Road",
         "LatLng":"1.32441878302634,103.865899487598",
         "ICON_NAME":"school.gif"
      }
   ]
}
HTML Example:
<html>
    <head>
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.2.min.js"></script>
        <script>
        function ThemeDetails(){
        $.ajax({
        url: 'https://developers.onemap.sg/privateapi/themesvc/retrieveTheme?queryName=kindergartens&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjUsInVzZXJfaWQiOjUsImVtYWlsIjoiY2xvc2VkYXBpdXNlcjFAc2xhLmdvdi5zZyIsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC9kZi5zbWFydGdlby5zZzo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDYwOTYxNTI2LCJleHAiOjE0NjA5ODEzMjYsIm5iZiI6MTQ2MDk2MTUyNiwianRpIjoiMzI2ZjFmNzVmMmQxZGYxODJiNDNmNjgyNWIwMWFmYjEifQ.g7BidyQPfPbS5XzkixvJ6oAk360DsRu0Sym7h2APQhU&extents=1.291789,%20103.7796402,1.3290461,%20103.8726032',
        success: function(result){
            //Set result to a variable for writing
            var TrueResult = JSON.stringify(result);
            document.write(TrueResult);
            }});
        }

        ThemeDetails();
      </script>
    </head>
</html>

This API search and returns specified list of themes that is filtered out via a search term.

Parameters

Variables Description
queryName
Required
The theme that you wish to query on. Our Themes’ query name could be retrieved using Get All Themes Info service.
token
Required
API token provided by the Authentication Service.
extents
Optional
Location provided by the user.




Planning Area (Beta)

These services provide data in relation to the planning area of Singapore.

Planning Area Polygons

This set of JSON response will empower you with our geographical information of Singapore’s planning area.



/privateapi/popapi/getAllPlanningarea

Usage:

/privateapi/popapi/getAllPlanningarea?token={token}

Example:

https://developers.onemap.sg/privateapi/popapi/getAllPlanningarea?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjExLCJ1c2VyX2lkIjoxMSwiZW1haWwiOiJrYWlrYWljb25nQGdtYWlsLmNvbSIsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC9kZi5zbWFydGdlby5zZzo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDY2NTYzNzAyLCJleHAiOjE0NjY5OTU3MDIsIm5iZiI6MTQ2NjU2MzcwMiwianRpIjoiMGU3NWE2YWRmZDk0YzRiNTk2ZGMyY2NhZjNmMGIzNzUifQ.aaCn4M-gNkreX4--gdLBfg3UWEGPjyIJwkme5mH5oEU

Sample Response:
  [
    {"pln_area_n":"SIMPANG","geojson":"{\"type\":\"MultiPolygon\",\"coordinates\":
    [[[[103.859314255112,1.43905653845967],[103.859555997694,1.43861048633809],[103.859717162003,1.43854290137258],[103.859878325326,1.43831311606076],
    [103.860079781027,1.43825904721717],[103.860348387871,1.43812387784192],
    [103.86054984252,1.4379076095267],[103.860872171382,1.43773188868334],
    [103.861181066913,1.43739396943393],[103.861323548112,1.43708314874515],[103.861335026738,1.43700621981347],[103.861503625812,1.43686109358725],[103.861705619734,1.4364533876568],[103.861879201218,1.43607173406952],[103.862223551115,1.4358574615477],[103.862448589649,1.4354774007516]...

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.

Names of Planning Area

This set of JSON response will retrieve the names of every planning area in Singapore.



/privateapi/popapi/getPlanningareaNames

Usage:

/privateapi/popapi/getPlanningareaNames?token={token}

Example:

https://developers.onemap.sg/privateapi/popapi/getPlanningareaNames?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NzE5MTUzODksImV4cCI6MTQ3MjM0NzM4OSwibmJmIjoxNDcxOTE1Mzg5LCJqdGkiOiI2ZDk5M2E2NDFiMDFiNWMzNDhkYWFhNDQyMTNjYmZiMiJ9.oPTmF2VJr9HHJ3lyrZ_cRqg-bGg0IU95UB8BPKKJ97g

Sample Response:
  [
    {"pln_area_n": "SIMPANG"},{"pln_area_n": "SOUTHERN ISLANDS"},{"pln_area_n": "SUNGEI KADUT"},{"pln_area_n": "TUAS"}...

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.

Planning Area Query

This set of JSON response will retrieve a single planning area based on your given latitude and longitude.



/privateapi/popapi/getPlanningarea

Usage:

/privateapi/popapi/getPlanningarea?token={token}&lat=1.3&lng=103.8

Example:

https://developers.onemap.sg/privateapi/popapi/getPlanningarea?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjczNjA0NjEsImV4cCI6MTQ2Nzc5MjQ2MSwibmJmIjoxNDY3MzYwNDYxLCJqdGkiOiJjNzkwZjBhYjQwOTcwNzFhMWE4MDQ1YTFjNjRlM2M5MSJ9.Pp6zos_p_jjiChWsi2F7O-k-yxgr173QlXqeGc-rpWw&lat=1.3&lng=103.8

Sample Response:
  [
    {"pln_area_n": "QUEENSTOWN","geojson": "{\"type\":\"MultiPolygon\",\"coordinates\":[[[[103.802283981872,1.30724221295973],[103.802425275872,1.30723324251248],[103.802425416944,1.30723323166185],
    [103.802458961548,1.3072307152304],[103.802652599571,1.30721836399803],[103.802696566049,1.3071728668585],[103.803189909937,1.30671929783162],[103.803283706296,1.30651729103507],
    [103.803508863524,1.30558818387374],[103.803555843427,1.30411268276738],[103.803574359692,1.30396638663125],[103.803622995749,1.30354546967306],[103.803856417354,1.30254212053914],
    [103.804124982262,1.30196506125208],[103.804803771942,1.3004823930227],[103.805123881249,1.30040789688888],[103.805105908234,1.3003555050315],[103.805889814255,1.30018357681829],
    [103.805905135703,1.30023369868607],[103.805908743234,1.30024549978044],[103.806263580325,1.30017300071634],[103.806326784411,1.30013228961175],[103.806422855741,1.30006613274865],
    [103.806498700633,1.30001778712831],[103.806579602452,1.29997707530201],[103.806680728717,1.2999363636879],[103.807065010095,1.29987020984425],[103.807156023758,1.2998651219351],
    [103.807277375759,1.29987275694056],[103.807436648869,1.29989820379476],[103.807679787396,1.29995077882159],[103.807699168777,1.29988470975123],[103.807731733404,1.29974967305778]...

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
lat
Required
This represents the Latitude position of your point.
lng
Required
This represents the Longitude position of your point.

Population Query (Beta)

This API provides population datasets for your analytical needs. This is being proudly sponsored by Department Of Statistics (Singapore) for One Map 2.0 to your convenience.

Economic Status Data

In this set of data, you will be able to retrieve data in relation to economic status of different planning area in Singapore.

/privateapi/popapi/getEconomicStatus

Usage:

/privateapi/popapi/getEconomicStatus?token={token}&planningArea={planningArea}&year={year}&gender={male/female}

Example:

https://developers.onemap.sg/privateapi/popapi/getEconomicStatus?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjExLCJ1c2VyX2lkIjoxMSwiZW1haWwiOiJrYWlrYWljb25nQGdtYWlsLmNvbSIsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC9kZi5zbWFydGdlby5zZzo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDY2NTYzNzAyLCJleHAiOjE0NjY5OTU3MDIsIm5iZiI6MTQ2NjU2MzcwMiwianRpIjoiMGU3NWE2YWRmZDk0YzRiNTk2ZGMyY2NhZjNmMGIzNzUifQ.aaCn4M-gNkreX4--gdLBfg3UWEGPjyIJwkme5mH5oEU&year=2010&planningArea=Bedok&gender=female

Example Response:
[  
   {  
      "planning_area":"Bedok",
      "employed":64100,
      "unemployed":2802,
      "inactive":59608,
      "year":2010,
      "gender":"Female"
   }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.
gender
Optional
The data based on different genders {male or female}. By default, it will return all results.

Education Status Data

In this set of data, you will be able to retrieve data in relation to educational status of different planning area in Singapore.

/privateapi/popapi/getEducationAttending

Usage:

/privateapi/popapi/getEconomicStatus?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getEducationAttending?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjczNjA0NjEsImV4cCI6MTQ2Nzc5MjQ2MSwibmJmIjoxNDY3MzYwNDYxLCJqdGkiOiJjNzkwZjBhYjQwOTcwNzFhMWE4MDQ1YTFjNjRlM2M5MSJ9.Pp6zos_p_jjiChWsi2F7O-k-yxgr173QlXqeGc-rpWw&planningArea=Bedok&year=2010

Example Response:
[  
   {  
      "planning_area":"Bedok",
      "pre_primary":4103,
      "primary":20171,
      "secondary":15944,
      "post_secondary":4364,
      "polytechnic":6343,
      "prof_qualification_diploma":1326,
      "university":5550,
      "year":2010
   }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Ethnic Distribution Data

In this set of data, you will be able to retrieve data in relation to ethnic distribution of different planning area in Singapore.

/privateapi/popapi/getEthnicGroup

Usage:

/privateapi/popapi/getEthnicGroup?token={token}&planningArea={planningArea}&year={year}&gender={male/female}

Example:

https://developers.onemap.sg/privateapi/popapi/getEthnicGroup?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjczNjA0NjEsImV4cCI6MTQ2Nzc5MjQ2MSwibmJmIjoxNDY3MzYwNDYxLCJqdGkiOiJjNzkwZjBhYjQwOTcwNzFhMWE4MDQ1YTFjNjRlM2M5MSJ9.Pp6zos_p_jjiChWsi2F7O-k-yxgr173QlXqeGc-rpWw&planningArea=Bedok&year=2010&gender=male

Example Response:
[
    {
     "planning_area": "Bedok",
     "chinese": 102310,
     "malays": 23178,
     "indian": 13028,
     "others": 5884,
     "year": 2010,
     "gender": "Male"
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.
gender
Optional
The data based on different genders {male or female}. By default, it will return all results.

Work Income For Household (Monthly)

In this set of data, you will be able to retrieve data in relation to monthly household work income of different planning area in Singapore.

/privateapi/popapi/getHouseholdMonthlyIncomeWork

Usage:

/privateapi/popapi/getHouseholdMonthlyIncomeWork?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getHouseholdMonthlyIncomeWork?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjczNjA0NjEsImV4cCI6MTQ2Nzc5MjQ2MSwibmJmIjoxNDY3MzYwNDYxLCJqdGkiOiJjNzkwZjBhYjQwOTcwNzFhMWE4MDQ1YTFjNjRlM2M5MSJ9.Pp6zos_p_jjiChWsi2F7O-k-yxgr173QlXqeGc-rpWw&planningArea=Bedok&year=2010

Example Response:
[
    {
    "planning_area": "Bedok",
    "total": 0,
    "no_working_person": 11143,
    "below_sgd_1000": 3965,
    "sgd_1000_to_1999": 7815,
    "sgd_2000_to_2999": 8461,
    "sgd_3000_to_3999": 8128,
    "sgd_4000_to_4999": 6733,
    "sgd_5000_to_5999": 6174,
    "sgd_6000_to_6999": 5291,
    "sgd_7000_to_7999": 4229,
    "sgd_8000_to_8999": 3712,
    "sgd_9000_to_9999": 2758,
    "sgd_10000_over": 22815,
    "year": 2010
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Household Size Data

In this set of data, you will be able to retrieve data in relation to household size of different planning area in Singapore.



/privateapi/popapi/getHouseholdSize

Usage:

/privateapi/popapi/getHouseholdSize?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getHouseholdSize?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjgyMjM5MTMsImV4cCI6MTQ2ODY1NTkxMywibmJmIjoxNDY4MjIzOTEzLCJqdGkiOiIxZGQxOGVmMDE4NDI5ZWM5Yjg0YWJlZmIyMmY5NmY1NyJ9.h78EmjUEjgskFg_JvstZYz4XWuPtYH9Pr2WMXg0ofuQ&planningArea=Bedok&year=2010

Example Response:
 [
    {
    "planning_area":"Bedok",
    "person1":12598,
    "person2":17613,
    "person3":18412,
    "person4":19446,
    "person5":12730,
    "person6":5989,
    "person7":2682,
    "person_more_8":1756,
    "year":2010
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Household Structure Data

In this set of data, you will be able to retrieve data in relation to household structure of different planning area in Singapore.



/privateapi/popapi/getHouseholdStructure

Usage:

/privateapi/popapi/getHouseholdStructure?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getHouseholdStructure?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjgyMjM5MTMsImV4cCI6MTQ2ODY1NTkxMywibmJmIjoxNDY4MjIzOTEzLCJqdGkiOiIxZGQxOGVmMDE4NDI5ZWM5Yjg0YWJlZmIyMmY5NmY1NyJ9.h78EmjUEjgskFg_JvstZYz4XWuPtYH9Pr2WMXg0ofuQ&planningArea=Bedok&year=2010

Example Response:
[
    {
        "planning_area":"Bedok",
        "no_family_nucleus":17526,
        "ofn_1_gen":11330,
        "ofn_2_gen":50450,
        "ofn_3_more_gen":5758,
        "tfn_1to2_gen":1435,
        "tfn_3_more_gen":4412,
        "three_more_fam_nucleus":313,
        "year":2010
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Income from Work Data

In this set of data, you will be able to retrieve data in relation to income from work of different planning area in Singapore.



/privateapi/popapi/getIncomeFromWork

Usage:

/privateapi/popapi/getIncomeFromWork?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getIncomeFromWork?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjgyMjM5MTMsImV4cCI6MTQ2ODY1NTkxMywibmJmIjoxNDY4MjIzOTEzLCJqdGkiOiIxZGQxOGVmMDE4NDI5ZWM5Yjg0YWJlZmIyMmY5NmY1NyJ9.h78EmjUEjgskFg_JvstZYz4XWuPtYH9Pr2WMXg0ofuQ&planningArea=Bedok&year=2010

Example Response:
[
    {
        "planning_area":"Bedok",
        "below_sgd_1000":18538,
        "sgd_1000_to_1499":14931,
        "sgd_1500_to_1999":15419,
        "sgd_2000_to_2499":14218,
        "sgd_2500_to_2999":11664,
        "sgd_3000_to_3999":18523,
        "sgd_4000_to_4999":12131,
        "sgd_5000_to_5999":9322,
        "sgd_6000_to_6999":6026,
        "sgd_7000_to_7999":4335,
        "sgd_8000_over":22561,
        "year":2010
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Industry of Population Data

In this set of data, you will be able to retrieve data in relation to industry of population of different planning area in Singapore.



/privateapi/popapi/getIndustry

Usage:

/privateapi/popapi/getIndustry?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getIndustry?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjgyMjM5MTMsImV4cCI6MTQ2ODY1NTkxMywibmJmIjoxNDY4MjIzOTEzLCJqdGkiOiIxZGQxOGVmMDE4NDI5ZWM5Yjg0YWJlZmIyMmY5NmY1NyJ9.h78EmjUEjgskFg_JvstZYz4XWuPtYH9Pr2WMXg0ofuQ&planningArea=Bedok&year=2010

Example Response:
[
    {
        "planning_area":"Bedok",
        "manufacturing":16075,
        "construction":6570,
        "wholesale_retail_trade":25387,
        "transportation_storage":15153,
        "accommodation_food_services":9265,
        "information_communications":7082,
        "financial_insurance_services":12394,
        "real_estate_services":3845,
        "professional_services":10380,
        "admin_support_services":7836,
        "public_admin_education":18516,
        "health_social_services":6052,
        "arts_entertainment_recreation":2551,
        "other_comm_social_personal":4846,
        "others":1716,
        "hotels_restaurants":0,
        "transport_communications":0,
        "business_services":0,
        "other_services_industries":0,
        "year":2010
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Language Literacy Data

In this set of data, you will be able to retrieve data in relation to language literacy of different planning area in Singapore.



/privateapi/popapi/getLanguageLiterate

Usage:

/privateapi/popapi/getLanguageLiterate?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getLanguageLiterate?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjgyMjM5MTMsImV4cCI6MTQ2ODY1NTkxMywibmJmIjoxNDY4MjIzOTEzLCJqdGkiOiIxZGQxOGVmMDE4NDI5ZWM5Yjg0YWJlZmIyMmY5NmY1NyJ9.h78EmjUEjgskFg_JvstZYz4XWuPtYH9Pr2WMXg0ofuQ&planningArea=Bedok&year=2010

Example Response:
[
    {
        "planning_area":"Bedok",
        "no_literate":10245,
        "l1_chi":36837,
        "l1_eng":31341,
        "l1_mal":4960,
        "l1_tam":545,
        "l1_non_off":503,
        "l2_eng_chi":95125,
        "l2_eng_mal":38815,
        "l2_eng_tam":4519,
        "l2_other_two":1181,
        "l3_eng_chi_mal":6862,
        "l3_eng_mal_tam":867,
        "l3_other_three":8283,
        "year":2010,
        "l2_eng_non_off":6937
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Marital Status Data

In this set of data, you will be able to retrieve data in relation to marital status of different planning area in Singapore.



/privateapi/popapi/getMaritalStatus

Usage:

/privateapi/popapi/getMaritalStatus?token={token}&planningArea={planningArea}&year={year}&gender={male/female}

Example:

https://developers.onemap.sg/privateapi/popapi/getMaritalStatus?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjgyMjM5MTMsImV4cCI6MTQ2ODY1NTkxMywibmJmIjoxNDY4MjIzOTEzLCJqdGkiOiIxZGQxOGVmMDE4NDI5ZWM5Yjg0YWJlZmIyMmY5NmY1NyJ9.h78EmjUEjgskFg_JvstZYz4XWuPtYH9Pr2WMXg0ofuQ&planningArea=Bedok&year=2010&gender=male

Example Response:
[
    {
        "planning_area":"Bedok",
        "single":43753,
        "married":71251,
        "widowed":2204,
        "divorced":3303,
        "year":2010,
        "gender":"Male"
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.
gender
Optional
The data based on different genders {male or female}. By default, it will return all results.

Mode of Transports to School Data

In this set of data, you will be able to retrieve data in relation to mode of transports to School of different planning area in Singapore.



/privateapi/popapi/getModeOfTransportSchool

Usage:

/privateapi/popapi/getModeOfTransportSchool?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getModeOfTransportSchool?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjgyMjM5MTMsImV4cCI6MTQ2ODY1NTkxMywibmJmIjoxNDY4MjIzOTEzLCJqdGkiOiIxZGQxOGVmMDE4NDI5ZWM5Yjg0YWJlZmIyMmY5NmY1NyJ9.h78EmjUEjgskFg_JvstZYz4XWuPtYH9Pr2WMXg0ofuQ&planningArea=Bedok&year=2010

Example Response:
[
    {
        "planning_area":"Bedok",
        "bus":16868,
        "mrt":2085,
        "mrt_bus":7934,
        "mrt_car":235,
        "mrt_other":60,
        "taxi":148,
        "car":8162,
        "pvt_chartered_bus":6387,
        "lorry_pickup":158,
        "motorcycle_scooter":334,
        "others":3354,
        "no_transport_required":11696,
        "year":2010
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Mode of Transport to Work Data

In this set of data, you will be able to retrieve data in relation to mode of transport to work of different planning area in Singapore.



/privateapi/popapi/getModeOfTransportWork

Usage:

/privateapi/popapi/getModeOfTransportWork?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getModeOfTransportWork?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjgyMjM5MTMsImV4cCI6MTQ2ODY1NTkxMywibmJmIjoxNDY4MjIzOTEzLCJqdGkiOiIxZGQxOGVmMDE4NDI5ZWM5Yjg0YWJlZmIyMmY5NmY1NyJ9.h78EmjUEjgskFg_JvstZYz4XWuPtYH9Pr2WMXg0ofuQ&planningArea=Bedok&year=2010

Example Response:
[
    {
        "planning_area":"Bedok",
        "bus":31472,
        "mrt":11280,
        "mrt_bus":25128,
        "mrt_car":1052,
        "mrt_other":916,
        "taxi":2473,
        "car":40895,
        "pvt_chartered_bus":3879,
        "lorry_pickup":2632,
        "motorcycle_scooter":5954,
        "others":9398,
        "no_transport_required":10986,
        "year":2010
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Occupation Data

In this set of data, you will be able to retrieve data in relation to occupation of different planning area in Singapore.



/privateapi/popapi/getOccupation

Usage:

/privateapi/popapi/getOccupation?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getOccupation?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjgyMjM5MTMsImV4cCI6MTQ2ODY1NTkxMywibmJmIjoxNDY4MjIzOTEzLCJqdGkiOiIxZGQxOGVmMDE4NDI5ZWM5Yjg0YWJlZmIyMmY5NmY1NyJ9.h78EmjUEjgskFg_JvstZYz4XWuPtYH9Pr2WMXg0ofuQ&planningArea=Bedok&year=2010

Example Response:
[
    {
        "planning_area":"Bedok",
        "senior_officials_managers":24211,
        "professionals":21520,
        "associate_professionals_tech":32095,
        "clerical":18003,
        "service_sales":18914,
        "agricultural_fishery":41,
        "production_craftsmen":7351,
        "plant_machine_operators":10273,
        "cleaners_labourers":10512,
        "workers_not_classified":4747,
        "year":2010
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Age Data

In this set of data, you will be able to retrieve data in relation to age of different planning area in Singapore.



/privateapi/popapi/getPopulationAgeGroup

Usage:

/privateapi/popapi/getPopulationAgeGroup?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getPopulationAgeGroup?&planningArea=Bedok&year=2014&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjMsInVzZXJfaWQiOjMsImVtYWlsIjoicHVibGljQXBpUm9sZUBzbGEuZ292LnNnIiwiZm9yZXZlciI6ZmFsc2UsImlzcyI6Imh0dHA6XC9cLzEwLjAuMy4xMTo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDgwMjQzNTAyLCJleHAiOjE0ODA2NzU1MDIsIm5iZiI6MTQ4MDI0MzUwMiwianRpIjoiOWNhMTY2NDZlYWJiNTcyNTFkNjI1NjI3MGNjMjUzOGUifQ.B0gSImYp8onJ9cj0uvNtukdtwJKUIOxjbYUyIQzR4V8

Example Response:
[
    {
        planning_area: "Bedok",
        age_0_4: 12180,
        age_5_9: 14020,
        age_10_14: 15420,
        age_15_19: 17550,
        age_20_24: 20010,
        age_25_29: 20020,
        age_30_34: 20370,
        age_35_39: 21370,
        age_40_44: 22550,
        age_45_49: 22160,
        age_50_54: 23950,
        age_55_59: 23320,
        age_60_64: 20360,
        age_65_69: 15010,
        age_70_74: 9620,
        age_75_79: 6980,
        age_80_84: 4510,
        age_85_over: 3720,
        total: 293110,
        gender: "Total",
        year: 2014
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Religion Data

In this set of data, you will be able to retrieve data in relation to religion of different planning area in Singapore.



/privateapi/popapi/getReligion

Usage:

/privateapi/popapi/getReligion?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getReligion?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjgyMjM5MTMsImV4cCI6MTQ2ODY1NTkxMywibmJmIjoxNDY4MjIzOTEzLCJqdGkiOiIxZGQxOGVmMDE4NDI5ZWM5Yjg0YWJlZmIyMmY5NmY1NyJ9.h78EmjUEjgskFg_JvstZYz4XWuPtYH9Pr2WMXg0ofuQ&planningArea=Bedok&year=2010

Example Response:
[
    {
        "planning_area":"Bedok",
        "no_religion":39471,
        "buddhism":74930,
        "taoism":24932,
        "islam":45965,
        "hinduism":9628,
        "sikhism":1095,
        "catholic_christian":20150,
        "other_christians":30011,
        "other_religions":839,
        "year":2010
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Spoken Language Data

In this set of data, you will be able to retrieve data in relation to spoken language of different planning area in Singapore.



/privateapi/popapi/getSpokenAtHome

Usage:

/privateapi/popapi/getSpokenAtHome?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getSpokenAtHome?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjgyMjM5MTMsImV4cCI6MTQ2ODY1NTkxMywibmJmIjoxNDY4MjIzOTEzLCJqdGkiOiIxZGQxOGVmMDE4NDI5ZWM5Yjg0YWJlZmIyMmY5NmY1NyJ9.h78EmjUEjgskFg_JvstZYz4XWuPtYH9Pr2WMXg0ofuQ&planningArea=Bedok&year=2010

Example Response:
[
    {
        "planning_area":"Bedok",
        "english":96675,
        "mandarin":80351,
        "chinese_dialects":37280,
        "malay":38903,
        "tamil":4953,
        "other_indian_languages":3575,
        "others":2372,
        "year":2010
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Tenancy Data

In this set of data, you will be able to retrieve data in relation to tenancy of different planning area in Singapore.



/privateapi/popapi/getTenancy

Usage:

/privateapi/popapi/getTenancy?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getTenancy?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjgyMjM5MTMsImV4cCI6MTQ2ODY1NTkxMywibmJmIjoxNDY4MjIzOTEzLCJqdGkiOiIxZGQxOGVmMDE4NDI5ZWM5Yjg0YWJlZmIyMmY5NmY1NyJ9.h78EmjUEjgskFg_JvstZYz4XWuPtYH9Pr2WMXg0ofuQ&planningArea=Bedok&year=2010

Example Response:
[
    {
        "planning_area":"Bedok",
        "owner":78754,
        "tenant":11087,
        "others":1383,
        "year":2010
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Dwelling Type Household Data

In this set of data, you will be able to retrieve data in relation to dwelling type household of different planning area in Singapore.



/privateapi/popapi/getTypeOfDwellingHousehold

Usage:

/privateapi/popapi/getTypeOfDwellingHousehold?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getTypeOfDwellingHousehold?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjgsInVzZXJfaWQiOjgsImVtYWlsIjoiY2xvc2Vkc3VwZXJhcGl1c2VyQHNsYS5nb3Yuc2ciLCJmb3JldmVyIjpmYWxzZSwiaXNzIjoiaHR0cDpcL1wvMTAuMC4zLjExOjgwODBcL2FwaVwvdjJcL3VzZXJcL3Nlc3Npb24iLCJpYXQiOjE0NjgyMjM5MTMsImV4cCI6MTQ2ODY1NTkxMywibmJmIjoxNDY4MjIzOTEzLCJqdGkiOiIxZGQxOGVmMDE4NDI5ZWM5Yjg0YWJlZmIyMmY5NmY1NyJ9.h78EmjUEjgskFg_JvstZYz4XWuPtYH9Pr2WMXg0ofuQ&planningArea=Bedok&year=2010

Example Response:
[
    {
        "planning_area":"Bedok",
        "hdb_1_2_room_flats":4233,
        "hdb_3_room_flats":23792,
        "hdb_4_room_flats":21673,
        "hdb_5_room_executive_flats":14003,
        "condominiums":15148,
        "landed_properties":11765,
        "others":611,
        "year":2010,
        "total_hdb":63701
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Dwelling Type Population Data

In this set of data, you will be able to retrieve data in relation to dwelling type population of different planning area in Singapore.



/privateapi/popapi/getTypeOfDwellingPop

Usage:

/privateapi/popapi/getTypeOfDwellingPop?token={token}&planningArea={planningArea}&year={year}

Example:

https://developers.onemap.sg/privateapi/popapi/getAllTypeOfDwellingPop?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjMsInVzZXJfaWQiOjMsImVtYWlsIjoicHVibGljQXBpUm9sZUBzbGEuZ292LnNnIiwiZm9yZXZlciI6ZmFsc2UsImlzcyI6Imh0dHA6XC9cLzEwLjAuMy4xMTo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDgwMjQzNTAyLCJleHAiOjE0ODA2NzU1MDIsIm5iZiI6MTQ4MDI0MzUwMiwianRpIjoiOWNhMTY2NDZlYWJiNTcyNTFkNjI1NjI3MGNjMjUzOGUifQ.B0gSImYp8onJ9cj0uvNtukdtwJKUIOxjbYUyIQzR4V8&planningArea=Bedok&year=2010

Example Response:
[
    {
        id: "3",
        planning_area: "Bedok",
        year: 2011,
        hdb_1_2_room_flats: 7420,
        hdb_3_room_flats: 75680,
        hdb_4_room_flats: 56480,
        hdb_5_room_executive_flats: 23740,
        condominiums: 7580,
        landed_properties: 9300,
        others: 1400,
        total_hdb: 163300,
        total: 90800
    }
]

Parameters

Variables Description
token
Required
API token provided by the Authentication Service.
year
Required
The year selection is in the format of YYYY. For instance, 2010.
planningArea
Required
The planning area which you wished to retrieve your data from. The list of planning data names could be retrieved here, List of Planning Area Names.

Routing Service

Route



/privateapi/routingsvc/route

Usage:

/privateapi/routingsvc/route?start={start}&end={end}&routeType={routeType}&token={token}

With pt routeType:
/privateapi/routingsvc/route?start={start}&end={end}&routeType={routeType}&token={token}&date={date}&time={time}&mode={mode}&maxWalkDistance={maxWalkDistance}&numItineraries={numItineraries}

Examples:

https://developers.onemap.sg/privateapi/routingsvc/route?start=1.319728,103.8421&end=1.319728905,103.8421581&routeType=walk&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjUsInVzZXJfaWQiOjUsImVtYWlsIjoiY2xvc2VkYXBpdXNlcjFAc2xhLmdvdi5zZyIsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC9kZi5zbWFydGdlby5zZzo4MDgwXC9hcGlcL3YyXC91c2VyXC9zZXNzaW9uIiwiaWF0IjoxNDYwNTM1NjAxLCJleHAiOjE0NjA1MzkyMDEsIm5iZiI6MTQ2MDUzNTYwMSwianRpIjoiZThjZGMxZmYxM2Y3MWVmZWU0MTQ1ZGEwNzVjYzE0Y2MifQ.gXhl_OUdufq0g_VJDrnY0kHJCU4aE8VoS3quWAqnV-w

With pt routeType:
https://developers.onemap.sg/privateapi/routingsvc/route?start=1.320981,103.844150&end=1.326762,103.8559&routeType=pt&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjM0MywidXNlcl9pZCI6MzQzLCJlbWFpbCI6InZpdGFsYXBwQHF1YW50dW1pbnZlbnRpb25zLmNvbSIsImZvcmV2ZXIiOmZhbHNlLCJpc3MiOiJodHRwOlwvXC8xMC4wLjMuMTE6ODA4MFwvYXBpXC92MlwvdXNlclwvc2Vzc2lvbiIsImlhdCI6MTQ4NjYyMTExOCwiZXhwIjoxNDg3MDUzMTE4LCJuYmYiOjE0ODY2MjExMTgsImp0aSI6ImJiNWIyNDgxYjdjYTFmOTYzYzY0ZDU1YjhlNWRkMmJmIn0.Ft5Krzu2efx89FclE8zW8cFzgtJmqF0CLveAEcNV33I&date=2017-02-03&time=07:35:00&mode=TRANSIT&maxWalkDistance=1000&numItineraries=3

Example Response (drive routeType; Snippet):
{
   "status_message":"Found route between points",
   "alternative_names":[
      [
         "COMMONWEALTH AVENUE WEST",
         "NORTH BUONA VISTA ROAD"
      ]
   ],
   "route_name":[
      "CLEMENTI AVENUE 2",
      "ULU PANDAN ROAD"
   ],
   "route_geometry":"yr`oAm`k{dEksAstD~e@iW`e@{UxtAqr@pd@sVrOmItC}GZ}GJwDeSmWkm@gb@qKuEyCwE}AgHJiH\\kE{BaRoCoEsGcLiE{N{AmQvB{QbFkN|E}FzMcPtQmTh|A_iBfCcDzHcKpJaMr\\w_@t\\i`@hb@gg@lAkJRqJg@wJeCoMgQ{f@qHsTuC_FiMsT_S_ViVkPkfAyi@oXiNq{@q_@qn@cU{SsGgEqAiDeAcTsGcd@eMoF{AoBi@uGkB}d@uMwDoA_EsA{QiG_VyJaSkLkQuN}CgDqJkKqDsFqE_H}CuE}CyEsBsGcDeKuK}f@}FiJ_FaEkKiEgHcAe~@xMsr@`LqMrB_En@gAy`@kBkVwE{W_^gbAkHg[aFeQaRe^_Nea@iEwYJkYsAyj@KiRkGglAcDqn@KiUrDkc@nFkY`Lo]lIeQfJgOfcAyhAzJ}KtPsTjIuQxFaQrBcN|E{u@rDgh@hBuYjDy_@zHoUbI}O|PwSkDuBiP_K{]cTq_Ack@ixAe|@_L}G{LoHynBujAsh@iZiRqK}|@ig@xg@wo@v{@_gA~q@g}@fUgZp^{`@gDqLv`@oNfTwH~LcIl@gEy@{PqU_V_`@cuAvHwJt^_MvXgMxCaD",
   "route_instructions":[
      [
         "10",
         "PANDAN LOOP",
         853,
         0,
         89,
         "853m",
         "NE",
         65,
         1,
         "SW",
         245
      ]
   ],
   "alternative_summaries":[
      {
         "end_point":"REBECCA ROAD",
         "start_point":"PANDAN LOOP",
         "total_time":761,
         "total_distance":8133
      }
   ],
   "via_points":[
      [
         1.311549,
         103.749657
      ],
      [
         1.32036,
         103.800156
      ]
   ],
   "route_summary":{
      "end_point":"REBECCA ROAD",
      "start_point":"PANDAN LOOP",
      "total_time":740,
      "total_distance":7957
   },
   "found_alternative":true,
   "status":200,
   "via_indices":[
      0,
      140
   ],
   "hint_data":{
      "locations":[
         "NzgBANtqAQBRBQAAAAAAAAQAAAAAAAAAuQIAAEOcAABoAAAAPQMUABcYLwYAAAEB",
         "0OUAAF4zAQChAwAABAAAAAwAAABIAAAAdQAAACx9AABoAAAAqCUUAFndLwYCAAEB"
      ],
      "checksum":585417468
   },
   "alternative_geometries":[
      "yr`oAm`k{dEksAstD~e@iW`e@{UxtAqr@pd@sVrOmItC}GZ}GJwDeSmWkm@gb@qKuEyCwE}AgHJiH\\kE{BaRoCoEsGcLiE{N{AmQvB{QbFkN|E}FzMcPtQmTh|A_iBfCcDzHcKpJaMr\\w_@t\\i`@hb@gg@lAkJRqJg@wJeCoMgQ{f@qHsTuC_FiMsT_S_ViVkPkfAyi@oXiNq{@q_@qn@cU{SsGgEqA~@wEzCgOvBiLzAqM\\mG@ad@UoQmC{^eDms@e@uJoAsXgAg^MgEe@sEuD__@qLstB}@ePIsCmAiq@zA_YjG_b@nB_HpHeWdK}UdkBqqD~A{CnAcCjA{BpIoPhAyBf_@gs@rb@uz@vC{F`CcFf`@sv@bEeMvGgVzEoQ~AyRrAyRe@mQ_E_XyDuWsJo}@gJsgAwByYcAmN?eDJ}Bh@cPnDuRtKs]~Ig[g_@oGg[aJqDY{FGkOdAqH`B{VrFok@bMsIlAcJNcJm@sImB{HiDej@ig@yDmD_CyB}v@qt@_TkQpf@yv@r_@kh@lF{MlDqM`AwN[cN}BqP{Uii@iI~DsFb@ih@cPeQaPaJ_NsIwEmV}KyMiBmKg@ae@}HkP}RgDoHwCwNkFWaY{E{Hj]uDjJcJhKia@n_@qFpL}g@uHcd@tLoBm[}GmJe`@eZub@qh@uHsa@_MuMsSiOvXgMxCaD"
   ],
   "alternative_instructions":[
      [
         [
            "10",
            "PANDAN LOOP",
            853,
            0,
            89,
            "853m",
            "NE",
            65,
            1,
            "SW",
            245
         ],
         [
            "8",
            "JALAN BUROH",
            217,
            9,
            23,
            "217m",
            "NE",
            50,
            1,
            "SW",
            230
         ],
         [
            "1",
            "WEST COAST HIGHWAY",
            62,
            14,
            7,
            "61m",
            "E",
            92,
            1,
            "W",
            272
         ]
      ]
   ],
   "alternative_indices":[
      0,
      159
   ]
}

This service will calculate the distance and return the drawn path between the specified start and end values depending on the routeType.

There are 4 routeType available, walk, drive , cycle and pt (public transport). If the routeType is set to pt, more parameters will be available. This allows you to choose between 3 modes of transport. maxWalkDistance will be the maximum walking distance. numItineraries may be used to limit the number of results returned.

Parameters

Variables Description
start
Required
The start point in lat,lng (WGS84) format.
end
Required
The end point in lat,lng (WGS84) format.
routeType
Required
Values: walk, drive, pt, cycle
The different route types available. Route types must be in lowercase.
token
Required
API token provided by the Authentication Service.

If you specify the routeType as pt, more parameters will be available.

date
Required
The date of the selected start point in YYYY-MM-DD.
EG: 2016-04-30.
time
Required
The time of the selected start point in [HH][MM][SS].
The time uses the 24-hour clock system.

[HH] refers to a zero-padded hour between 00 and 23.
[MM] refers to a zero-padded minute between 00 and 59.
[SS] refers to a zero-padded second between 00 and 59.
EG: 15:30:00.
mode
Required
Values: TRANSIT, BUS, RAIL
The mode of transportation. The mode specified must be in uppercase.
maxWalkDistance
Optional
The maximum walking distance set by the user.
numItineraries
Optional
Values: 1 to 3
Limits the number of return results.


Decoding route_geometry

JavaScript Decoder:

var polyUtil = require('polyline-encoded');
var encoded = route_geometry;

if (encoded !== undefined || encoded !== '' || encoded != null ) {
  var latlngs = polyUtil.decode(encoded, {
    precision: 6
  });

  // Do something with latlngs
} 

Android Decoder:

public static List<LatLng> decodePolyline(String encoded) {
    List<LatLng> poly = new ArrayList<LatLng>();
    int index = 0, len = encoded.length();
    int lat = 0, lng = 0;

    while (index < len) {
        int b, shift = 0, result = 0;
        do {
            b = encoded.charAt(index++) - 63;
            result |= (b & 0x1f) << shift;
            shift += 5;
        } while (b >= 0x20);
        int dlat = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
        lat += dlat;

        shift = 0;
        result = 0;
        do {
            b = encoded.charAt(index++) - 63;
            result |= (b & 0x1f) << shift;
            shift += 5;
        } while (b >= 0x20);
        int dlng = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
        lng += dlng;
        // LatLng p = new LatLng((int) (((double) lat / 1E5) 1E6), (int) (((double) lng / 1E5) 1E6));

        int latlength = (int)(Math.log10(lat)+1);
        double divider = 10 / Math.pow(10, latlength);
        //OSRM returns 6 decimal points, OTP 5 decimal points

        LatLng p = new LatLng((double)lat * divider, (double)lng * divider);
        poly.add(p);
        // Log.i("TEST", "Latitude: " + Double.toString(p.getLatitude()) + " " + "Longitude: " + Double.toString(p.getLongitude()));
    }

    return poly;
}

iOS Decoder:

GeometryDecoder.h:

#import <Foundation/Foundation.h>

@interface GeometryDecoder : NSObject
+ (NSArray *)polylineWithEncodedString:(NSString *)encodedString;
@end
GeometryDecoder.m:

#import <MapKit/MKAnnotation.h>
#import "GeometryDecoder.h"

@implementation GeometryDecoder

+ (NSArray *)polylineWithEncodedString:(NSString *)encodedString
{
    const char *bytes = [encodedString UTF8String];
    NSUInteger length = [encodedString lengthOfBytesUsingEncoding:NSUTF8StringEncoding];

    NSUInteger idx = 0;
    float latitude = 0;
    float longitude = 0;

    NSMutableArray * decodedGeometries = [[NSMutableArray alloc] init];

    while (idx < length)
    {
        char byte = 0;
        int res = 0;
        char shift = 0;

        do
        {
            byte = bytes[idx++] - 63;
            res |= (byte & 0x1F) << shift;
            shift += 5;
        }
        while (byte >= 0x20);
        float deltaLat = ((res & 1) ? ~(res >> 1) : (res >> 1));
        latitude += deltaLat;
        shift = 0;
        res = 0;

        do
        {
            byte = bytes[idx++] - 0x3F;
            res |= (byte & 0x1F) << shift;
            shift += 5;

        }
        while (byte >= 0x20);

        float deltaLon = ((res & 1) ? ~(res >> 1) : (res >> 1));
        longitude += deltaLon;

        float finalLat = latitude * 1E-5;
        float finalLon = longitude;

        /***********************************************************************************
            Note:   Below bit shift only works for Singapore Latitude because it is 1.xxx
         ***********************************************************************************/

        if(finalLat >= 1 && finalLat < 2)
        {
            finalLon *= 1E-5;
        }
        else
        {
            finalLat = latitude * 1E-6;
            finalLon *= 1E-6;
        }

        CLLocation * coord = [[CLLocation alloc] initWithLatitude:finalLat longitude:finalLon];

        [decodedGeometries addObject:coord];
    }

    return [decodedGeometries copy];
}

@end

The routing service returns response will have a route_geometry variable that is encoded.

Google Polyline Decoder can be used if pt is specified as the routeType.

If drive or walk is specified as the routeType, please use the sample code given as shown.

Static Map

Get Method:

/commonapi/staticmap/getStaticImage

Post Method:

/commonapi/staticmap/post/getStaticImage

Usage:

/commonapi/staticmap/getStaticImage?layerchosen={Map Layer}&lat={Latitude}&lng={Longtitude}&zoom={Zoom Level}&width={Image's Width}&height={Image's Height}&polygons={Polygons' Details}&lines={Lines' Details}&points={Points' Details}&color={All Lines' Color}&fillColor={All Polygons' Color}

Polygon coordinates Format: 

Array of Points:{Color Code} | Array of Points:{Color Code}

Example: [[1.31955,103.84223],[1.31755,103.84223],[1.31755,103.82223],[1.31755,103.81223],[1.31955,103.84223]]:255,255,105

Lines coordinates Format: 

Array of Points:{Color Code}:{Line Thickness} | Array of Points:{Color Code}:{Line thickness}

Example: [[1.31955,103.84223],[1.31801,103.83224]]:177,0,0:3

Points coordinates Format: 

Array of Points:Point|Point:{Color Code}

Example: [1.31955,103.84223,"255,255,178","B"]|[1.31801,103.84224,"175,50,0","A"]

Examples:

With Optional Variables:
https://developers.onemap.sg/commonapi/staticmap/getStaticImage?layerchosen=default&lat=1.31955&lng=103.84223&zoom=17&height=512&width=400&polygons=[[1.31955,103.84223],[1.31755,103.84223],[1.31755,103.82223],[1.31755,103.81223],[1.31955,103.84223]]:255,255,105&lines=[[1.31955,103.84223],[1.31801,103.83224]]:177,0,0:3&points=[1.31955,103.84223,"255,255,178","B"]|[1.31801,103.84224,"175,50,0","A"]

Without Optional Variables:
https://developers.onemap.sg/commonapi/staticmap/getStaticImage?layerchosen=default&lat=1.31955&lng=103.84223&zoom=17&height=512&width=512

Example Response (With optional variables):

This API returns a static image of the map based on the defined parameters. You may also overlay multiple point(s), polygon(s) or polyline(s) on your static map.

The response is returned in PNG format in accordance to your parameter inputs. You can also create your personalised static maps via Static Map Creator.

Parameters

Variables Description
layerchosen
Required
ValuesMap Style
nightNight View
greyGrey
originalOriginal
defaultDefault
landlotLand Lot
Provides the user with choices from the following basemap (Night View, Grey, Original, Default and Land Lot) to be used for the static image.
lat
Required
Latitude Coordinates in WGS84 format.
lng
Required
Longitude Coordinates in WGS84 format.
postal
Required
Either lat/lng or postal should be used. If postal code is provided as a parameter, your center point(lat/lng) would change.
zoom
Required
Values: 11- 19
The zoom level of the static image. Lowering the value will cause the image to be zoomed out.
width
Required
Values: 128-512
The width of the static image.
height
Required
Values: 128-512
The height of the static image.
polygons
Optional
The coordinates of Polygon(s) that is to be overlaid on the basemap. Polygons and its color is being segregated by semi colon. Whereas each polygon is differentiated with a pipe. The start and end must be the same point, other points should be unique
lines
Optional
The coordinates of line(s) that is to be overlaid on the basemap. Lines and its color and thickness are being segregated by semi colon. Each line is differentiated with a pipe.
points
Optional
The coordinates of point(s) that is to be overlaid on the basemap. Coordinates,color and label of individual point is being segregated with a comma. Each Point is differentiated with a pipe. This is an example of 2 points being differentiated with pipe, [1.31955,103.84223,"255,255,178","B"]|[1.31801,103.84224,"175,50,0","A"].
color
Optional
Specifies the color of all lines. Color must be in RGB format. EG: 255, 255, 255
fillColor
Optional
Specifies the fill color of all Polygons. Color must be in RGB format. EG: 255, 255, 255

Tools

OneMap 2.0 Mini-map Generator

This creator tool will allow you to create a mini-map on the fly with a marker pointing to a location specified, which you can embed it on your website as an iframe or serving out as a hyperlink (URL). Now, You can create your own @ Mini-Map Creator.


Static Map Generator

This creator tool will allow you to create a static map with your destinated marker(s), line(s) and/or polygon(s) on the fly. Your desired image would be created using the generated URL provided. Now, You can create your own @ Static Map Creator.


Helper Libraries

Leaflet

Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps.


Leaflet is designed with simplicity, performance and usability in mind. It works efficiently across all major desktop and mobile platforms, can be extended with lots of plugins, has a beautiful, easy to use and well-documented API and a simple, readable source code that is a joy to contribute to.


Leaflet.draw

Leaflet.draw is designed to not only be easy for end users to use, but also for developers to integrate.

Draw shapes on your map with easy to use drawing tools.

Edit and delete vectors and markers.

Event based system allows you to perform any necessary actions when shapes are created, edited or deleted.

Super customizable:

-Customize the styles of each shape to fit in with your maps theme.

-Pick and choose the which tools you want to use.

-Roll your own by simply using the drawing and editing handlers.




ESRI-Leaflet

Esri-Leaflet is a Javascript library to help developers build lightweight applications using the Leaflet Javascript mapping library.

Leaflet plugins for working with a handful of the most popular ArcGIS Service types. This includes Esri basemaps and feature services, as well as tiled map, dynamic map and image services.

Provide components for only some aspects of the ArcGIS platform for developers who prefer to build mapping applications with Leaflet.

Support for Geocoding services and Geoprocessing services, as well as service defined rendering are available as well (via additional plugins).




Mapbox Omnivore

Omnivore helps Mapbox.js & Leaflet eat more types of data. We love and support GeoJSON, but sometimes specific data is in other formats, like GPX from a running watch, KML from Google Earth, CSVs from your spreadsheets, or TopoJSON files with enhanced geometries.


Turf.js

Turf.js is a JavaScript library for spatial analysis. It helps you analyze, aggregate, and transform data in order to visualize it in new ways and answer advanced questions about it.

Turf.js is a library for spatial analysis: a large family of tasks like ‘calculating area and distance’ and ‘joining points to polygons’ that enable people to see new facets of their data. Spatial analysis is used in every industry: to find the nearest coffee shop, calculate travel time, and show regional statistics for utility usage. It’s also a huge part of GIS, where many problems are solved with spatial analysis.

Today, spatial analysis is used in epidemiology, biology, statistics, economics, commerce and business, urban planning, geology, oil and gas, and in many other industries. With Turf.js, we can now bring these analyses to the browser and show results quickly and seamlessly.


OpenLayers

OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles, vector data and markers loaded from any source. OpenLayers has been developed to further the use of geographic information of all kinds. It is completely free, Open Source JavaScript, released under the 2-clause BSD License (also known as the FreeBSD).

Overlayers have features such as Tiled Layers, Vector Layers, Cutting Edge, Fast & Mobile Ready Easy to Customize and Extend

GitHub/Forum

Our OneMap team would like to share some of the work that done by us:

General repositories

General repositories: Click here

IOS

basemap and custom marker: Click here

Android

basemaps with Mapbox Android SDK: Click here

One Map 2.0 API authentication module

MacOS: Click here
Linux x86: 32-Bit: Click here
Linux x64: 64-Bit: Click here
Windows x64: 32-Bit: Click here
Windows x86: 64-Bit: Click here

Appendices

Reverse Geocoding

Reverse geocoding is the process of back (reverse) coding of a point location (latitude, longitude) to a readable address or place name.

WGS84

WGS84 is the standard U.S. Department of Defense definition of a global reference system for geospatial information and is the reference system for the Global Positioning System (GPS).

SVY21

SVY21 is a geodetic datum first defined in 2004 and is suitable for use in Singapore - onshore and offshore. SVY21 references the WGS 84 ellipsoid and the Greenwich prime meridian.

EPSG 3857

EPSG 3857 Projection used in many popular web mapping applications. Sometimes known as EPSG:900913. Each pixel is calculated in metres from the origin.

Basemap

A basemap is a non-editable layer that provides background, or reference information, in your map. It is typically designed to provide a visual reference for other layers to help orient the user of the map.

Polygon

A polygon is an area that is bounded by a finite chain of straight line segments closing in a loop to form a closed chain or circuit.

Line

A line is a straight one-dimensional figure having no thickness and extending infinitely in both directions.

Points

A point is a location. It has no size (i.e. no width, no length and no depth). A point is shown by a dot.

Register

We warmly welcome you to OneMap 2.0 API.

Kindly register your new account on our registration site.

Your confirmation email might end up in junk. Kindly read through your junk mail as well! :)

Contact Us

Hello Everyone!

We are One Map 2.0 Dev Team @ IRAS Revenue House, Singapore Land Authority.

As we are constantly seeking ways to improve on our services, your suggestions will be greatly appreciated. Please feel free to feedback to us at onemap@sla.gov.sg.

We will try to get back to you in lightspeed! =)

Change Logs

Changes on 17 June 2017

Changes on 28 March 2017

Changes on 20 March 2017

Changes on 16 March 2017