PostalLens SG

Singapore open data, spatially joined

Every six digits,
a full picture.

One postal code in, one place out. Bus stops, MRT stations, hawker centres, food centres, schools and registered businesses around it — each with its distance in metres, its source agency and the date it was published.

Try

Type six digits to load live counts.

—
loading

How it works

Four calls, one answer

The corpus lives in one PostGIS database. Every query is a radius search against a spatial index, so "what is within 400 metres" is an index scan, not a table scan.

01

Resolve the code to a point

A postal code is not a location. GET /v1/resolve turns six digits into a building point: WGS84 latitude and longitude, plus SVY21 X and Y in metres. The local address table answers first; the geocoder only runs for codes it has not seen.

02

Ask what is nearby

GET /v1/nearby runs one ST_DWithin per category and returns the hits sorted by true distance. GET /v1/rings does the same thing for the count only, which is what the ring instrument on this page draws.

03

Read the report

GET /v1/report/{postal} assembles the modules: location, transport, education, daily needs and business activity — each with the source agency and an as-of date attached.

04

Use it from anywhere

Everything above is plain JSON over HTTP, no key and no login. Read it from a spreadsheet, a script or a mobile app. The guide has copy-paste examples for each one.

Try it now

Three endpoints, live

These run against this server. Press the button and you get the actual response.

GET /v1/rings

Counts by radius

What sits within 400 m, 800 m, 1 km and 2 km of a postal code.

GET /v1/nearby

Nearest points

Every point of interest in a category, sorted by distance in metres.

GET /v1/sources

What is loaded

Every dataset on this server, with row counts and the date it was last refreshed.

Provenance

What is on this server

Every row on this portal traces back to a named agency dataset. Nothing here is estimated, and nothing is a price opinion.

Loading the source register…