National Bureau of Statistics of China
China NBS data portal — China's GDP, CPI, PMI, retail and industrial data — the official portal, browser export only
When you need the official Chinese number — GDP by quarter, CPI, the NBS manufacturing PMI, retail sales, industrial output, fixed-asset investment — and want the NBS table itself rather than a wire summary.
Reach for it when…
When you need the official Chinese number — GDP by quarter, CPI, the NBS manufacturing PMI, retail sales, industrial output, fixed-asset investment — and want the NBS table itself rather than a wire summary.
Not for: Anything automated: the portal blocks scripts. Use FRED or the World Bank for Chinese series you need to pull regularly, and the People's Bank of China for monetary data.
Units, revisions, traps
Units. Growth rates are year-on-year percent, often reported as cumulative year-to-date ('Jan–Aug'). CPI is a year-on-year rate, not an index. PMI is a diffusion index (50 = no change).
Revisions. Annual GDP is revised; monthly data are rarely revised but the January–February figures are combined because of the New Year.
- Cumulative year-to-date growth is not the monthly growth — check the column header.
- Quarterly GDP is published as a year-on-year rate first; quarter-on-quarter comes later and is seasonally adjusted.
- The English portal and the Chinese portal do not always carry the same tables.
Classic mistake: Reading 'Jan–Aug +5.2%' as August's growth.
Three recipes
- Recipe 1 · Browser export, then pandas
- Recipe 2 · The same headline series without the portal
- Recipe 3 · NBS PMI on release day
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 1Browser export, then pandas
# 1. data.stats.gov.cn/english → Monthly Data → pick indicators → Download (xlsx)
# 2. read the file
import pandas as pd
df = pd.read_excel("Monthly_Data.xlsx", skiprows=2)
print(df.head())- Open the downloaded xlsx directly; the first rows carry the table title and units.
- File → Import the downloaded file.
Recipe 2The same headline series without the portal
# FRED mirrors the headline Chinese series (OECD-sourced), pullable by script
import pandas as pd
u = "https://fred.stlouisfed.org/graph/fredgraph.csv?id=CHNCPIALLMINMEI"
df = pd.read_csv(u, index_col="observation_date", parse_dates=True, na_values=".")
print((df.iloc[:, 0].pct_change(12) * 100).dropna().tail(6).round(1))- From Web with the FRED URL.
=IMPORTDATA with the FRED URL.Recipe 3NBS PMI on release day
# the manufacturing PMI is published on the last day of the month in the NBS press release;
# the portal table is Monthly Data → Purchasing Managers' Index → Manufacturing PMI (browser export)
import pandas as pd
df = pd.read_excel("PMI.xlsx", skiprows=2)
print(df.head())- Open the export.
- Import the export.
Series → question map
The ids we use from China NBS data portal, each with the question it answers. The catalog's compare view reads the concept tags behind these rows.
| Series | Answers | Region | Concept |
|---|---|---|---|
| Monthly Data · CPI | What is Chinese inflation? | China | cpi |
| Quarterly Data · GDP | Is China's economy growing? | China | gdp |
| Monthly Data · Manufacturing PMI | Is Chinese manufacturing expanding? | China | pmi |
| Monthly Data · Total Retail Sales | Is the Chinese consumer spending? | China | retail |
Compare with
Same question, different source: World Bank Indicators API, FRED, OECD Data Explorer. The compare view lines up coverage, frequency, history and access side by side and lists what the combination makes possible.
Open compare: China NBS data portal · World Bank Indicators API · FRED →
Questions readers ask
Why does my script get 403 from data.stats.gov.cn?
The portal blocks automated access. Export from the browser, or pull the mirrored headline series from FRED or the World Bank.
Is there an English API?
No documented one. The Chinese portal has an undocumented query endpoint that also refuses scripts.
Which PMI?
Two: the official NBS PMI (large, state-heavy firms) and the private Caixin/S&P Global PMI (smaller exporters). They diverge often; say which you mean.
From the paper
Educational only — we explain, we never advise · snippet licence: public domain · corrections to [email protected], fixed within a day and logged in the changelog.