Department of Statistics Singapore
SingStat Table Builder API — Singapore's CPI, GDP, jobs and trade by table id — no key
For Singapore's real-economy statistics from the source — CPI, GDP, unemployment, retail sales, trade — each as a table id you can pull as JSON. The monetary side (S$NEER, SORA, MAS statistics) sits with the Monetary Authority of Singapore's API portal, which needs a free key.
Reach for it when…
For Singapore's real-economy statistics from the source — CPI, GDP, unemployment, retail sales, trade — each as a table id you can pull as JSON. The monetary side (S$NEER, SORA, MAS statistics) sits with the Monetary Authority of Singapore's API portal, which needs a free key.
Not for: Rates and exchange rates (MAS), Singapore stock prices (SGX or a market-data API), regional comparisons (World Bank, OECD).
Units, revisions, traps
Units. CPI as an index (2024 = 100) and as year-on-year change in separate tables; GDP in S$ millions at chained 2015 prices and as growth rates; unemployment as a percent.
Revisions. GDP advance estimates are revised twice; CPI is final.
- Table ids look like M213751 (CPI, monthly, 2024 base); find them with the Table Builder search or its resourceid API before pulling.
- The JSON nests rows under Data → row → columns; flatten before using.
- Quarterly GDP is published as year-on-year and as quarter-on-quarter annualised — two different columns.
Classic mistake: Using the SAAR quarterly growth as if it were year-on-year.
Three recipes
- Recipe 1 · Singapore CPI, all items
- Recipe 2 · Real GDP growth by quarter
- Recipe 3 · Unemployment rate, quarterly
Each recipe: Python · Excel · Sheets, with how to read the result. Python recipes run under pandas; recipe 1 is re-run by the weekly check where the source allows it.
How to use it in your own work
Copy the snippet, change the series id, read the result the way the footer says. Replace YOUR_…_KEY with your own key where one is needed.
Recipe 1Singapore CPI, all items
# table M213751: CPI by division, monthly (2024 = 100)
import requests, pandas as pd
u = "https://tablebuilder.singstat.gov.sg/api/table/tabledata/M213751?seriesNoORrowNo=1&limit=120"
j = requests.get(u, headers={"User-Agent": "Mozilla/5.0"}, timeout=30).json()
row = j["Data"]["row"][0]
df = pd.DataFrame(row["columns"])
s = df.set_index(pd.to_datetime(df.key, format="%Y %b"))["value"].astype(float).sort_index()
print((s.pct_change(12) * 100).dropna().tail(6).round(1))- Table Builder → search 'consumer price index' → open the table → Download CSV.
- Import the downloaded CSV.
Recipe 2Real GDP growth by quarter
# table M014811: GDP at 2015 prices, quarterly, year-on-year growth
import requests, pandas as pd
u = "https://tablebuilder.singstat.gov.sg/api/table/tabledata/M014811?seriesNoORrowNo=1&limit=40"
j = requests.get(u, headers={"User-Agent": "Mozilla/5.0"}, timeout=30).json()
df = pd.DataFrame(j["Data"]["row"][0]["columns"])
print(df.tail(8))- Table Builder → search 'gross domestic product' → Download CSV.
- Import the downloaded CSV.
Recipe 3Unemployment rate, quarterly
# table M182341: overall unemployment rate, seasonally adjusted
import requests, pandas as pd
u = "https://tablebuilder.singstat.gov.sg/api/table/tabledata/M182341?seriesNoORrowNo=1&limit=40"
j = requests.get(u, headers={"User-Agent": "Mozilla/5.0"}, timeout=30).json()
df = pd.DataFrame(j["Data"]["row"][0]["columns"])
print(df.tail(8))- Table Builder → search 'unemployment rate' → Download CSV.
- Import the downloaded CSV.
Series → question map
The ids we use from SingStat Table Builder API, each with the question it answers. The catalog's compare view reads the concept tags behind these rows.
| Series | Answers | Region | Concept |
|---|---|---|---|
| M213751 | What is Singapore inflation? | Singapore | cpi |
| M014811 | Is Singapore's economy growing? | Singapore | gdp |
| M182341 | What is Singapore's unemployment rate? | Singapore | unemployment |
| M602121 | Are retail sales growing? | Singapore | retail |
Compare with
Same question, different source: HKMA API, BNM OpenAPI, World Bank Indicators API. The compare view lines up coverage, frequency, history and access side by side and lists what the combination makes possible.
Open compare: SingStat Table Builder API · HKMA API · BNM OpenAPI →
Questions readers ask
Do I need a key?
No for the Table Builder API. MAS's separate API portal (rates, exchange rates) needs a free registration key.
Where are SORA and the S$NEER?
MAS statistics (eservices.mas.gov.sg), through the API portal or browser export.
How do I find a table id?
Search the Table Builder (or its resourceid API with a keyword); the id (M213751 for monthly CPI) is in the table's URL and its 'API' tab.
Educational only — we explain, we never advise · snippet licence: public domain · corrections to [email protected], fixed within a day and logged in the changelog.