SingStat Table Builder API
Programmatic access to over 2,500 official statistical tables from 70 public sector agencies: population, CPI, GDP, trade, employment and more. Query any table by its resource id.
How to authenticate
3 stops to a working call
- 1No key needed.
- 2Find your table id (e.g. M810001) by browsing tablebuilder.singstat.gov.sg or the resourceId search API.
- 3GET /api/table/tabledata/{tableId}; send an Accept: application/json header (some clients get blocked without a normal User-Agent).
Example request
curl -H 'Accept: application/json' -A 'Mozilla/5.0' 'https://tablebuilder.singstat.gov.sg/api/table/tabledata/M810001?limit=1'Example response
{"Data":{"theme":"Population","id":"M810001","title":"Indicators On Population, Annual","frequency":"Annual","datasource":"SINGAPORE DEPARTMENT OF STATISTICS"}}api/table/tabledata: working example
No key is needed. Send a browser-like User-Agent and Accept: application/json. Our tests used both headers.
curl -A 'Mozilla/5.0' -H 'Accept: application/json' \
'https://tablebuilder.singstat.gov.sg/api/table/tabledata/M810011?limit=2'Real response, truncated:
{"Data":{"theme":"Population","subject":"Population and Population Structure",
"id":"M810011","title":"Singapore Residents By Age Group, Ethnic Group And Sex, At End June, Annual",
"frequency":"Annual","datasource":"SINGAPORE DEPARTMENT OF STATISTICS",
"dataLastUpdated":"25/09/2026","limit":"2","timeFilter":null,
"row":[{"seriesNo":"1","rowText":"Total Residents","uoM":"Number","footnote":"",
"columns":[{"key":"1957","value":"1445929"},{"key":"1958","value":"1518800"}]}]},
"DataCount":1,"StatusCode":200,"Message":""}Each row is a series. Each columns entry is one period (key) and its value (value, a string).
Parameters: timeFilter, seriesNoORrowNo, limit
Tested live on 2026-09-25:
curl -A 'Mozilla/5.0' -H 'Accept: application/json' \
'https://tablebuilder.singstat.gov.sg/api/table/tabledata/M650391?seriesNoORrowNo=1&timeFilter=2024&limit=3'{"Data":{"id":"M650391","title":"Motor Vehicle Population By Type Of Vehicle (End Of Period), Annual",
"timeFilter":"2024","limit":"3",
"row":[{"seriesNo":"1","rowText":"Total","uoM":"Number","columns":[{"key":"2024","value":"1007094"}]}]},
"DataCount":1,"StatusCode":200,"Message":""}timeFilter: restricts periods, for example2024.seriesNoORrowNo: returns one series by itsseriesNo.limit: caps rows returned. It is echoed back inData.limit.
The response also echoes offset, sortBy, between and search. See the official developer page for their formats.
Find a table ID and its metadata
curl -A 'Mozilla/5.0' -H 'Accept: application/json' \
'https://tablebuilder.singstat.gov.sg/api/table/resourceid?keyword=population&searchOption=all'
curl -A 'Mozilla/5.0' -H 'Accept: application/json' \
'https://tablebuilder.singstat.gov.sg/api/table/metadata/M810011'resourceid returns Data.records with id, title, theme and tableType. The population keyword returned 365 tables in our test. metadata returns the table description under Data.records.
Common errors
- StatusCode 400, Data "Bad Request": the table ID does not exist. We got
{"Data":"Bad Request","DataCount":0,"StatusCode":400}for a made-up ID. - HTML or blocked response: add
-A 'Mozilla/5.0'andAccept: application/json. - Values are strings. Convert them before doing maths.
SingStat Table Builder API: common questions
Is the SingStat Table Builder API free?
Yes. Department of Statistics Singapore offers the SingStat Table Builder API free of charge.
Does the SingStat Table Builder API need an API key?
No. The SingStat Table Builder API can be called without an API key or login.
What is the SingStat Table Builder API endpoint?
The base URL is https://tablebuilder.singstat.gov.sg/api/table/tabledata/. A working example: curl -H 'Accept: application/json' -A 'Mozilla/5.0' 'https://tablebuilder.singstat.gov.sg/api/table/tabledata/M810001?limit=1'
What is the SingStat api/table/tabledata endpoint?
GET https://tablebuilder.singstat.gov.sg/api/table/tabledata/{tableId}, for example M810011. It returns JSON with Data.row series and period columns.
How do I use timeFilter?
Add timeFilter to the query, for example ?timeFilter=2024. Only matching periods are returned.
What is seriesNoORrowNo?
It picks one series by its seriesNo, for example seriesNoORrowNo=1 returns the Total row of M650391.
Do I need an API key for TableBuilder?
No. Our calls worked without a key when sending a User-Agent and Accept: application/json.
How do I find a table ID like M810011?
Call api/table/resourceid?keyword=your-term&searchOption=all and read the id field.
Verified 2026-09-25 against tablebuilder.singstat.gov.sg, tablebuilder.singstat.gov.sg, tablebuilder.singstat.gov.sg
Notes for AI agents
Invalid table ids return 200 with a Resource Not Found body, not a 404 status; check the StatusCode field inside the JSON. Supports seriesNoORrowNo, timeFilter and limit params.
Machine-readable version: /api/apis/singstat-tablebuilder