China National Bureau of Statistics Data Query (cn-stats)
Query China's official statistics portal (CPI, GDP, population, housing price index) through its public API with curl and jq.
Data & AnalyticsIntermediate★ 149⑂ 18AI score 7/10Last updated: Jul 15, 2026
What it does
Gives Claude the exact endpoints for the public data API at data.stats.gov.cn.
- Walk the indicator category tree (monthly/quarterly/annual, by province, major cities, HK/Macau/Taiwan, major economies — 14 root codes)
- Search indicators by keyword and resolve their IDs
- Fetch statistics for multiple indicators or multiple regions in one request
- Look up province and major-city region codes, plus a global keyword search
- Format results with
jqinto TSV: period / indicator name / value / unit
Who it's for
- Researchers, economists and analysts working with Chinese macro, price or property data
- Market-research teams tracking China for export or expansion
- Data analysts building reports or dashboards from open data
- Anyone comfortable with curl and jq in a terminal
Examples
- "Compare CPI for Shanghai and Beijing over the last three years" → search the indicator, then call the multi-region endpoint for 202301–202605
- "List the residential sales price index indicators for the 70 large/medium cities" → uses the category ID already included in the skill
- "Show annual GDP together with GDP per capita" → sends both indicator IDs in a single annual-data query
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/aahl/skills/HEAD/skills/cn-stats/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/cn-stats folder from the GitHub repo aahl/skills into my ~/.claude/skills/cn-stats/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone --depth 1 https://github.com/aahl/skills.git /tmp/aahl-skills && mkdir -p ~/.claude/skills && cp -r /tmp/aahl-skills/skills/cn-stats ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Check prerequisites:
curl --versionandjq --version(install jq viabrew install jqon macOS orsudo apt install jqon Ubuntu). - Create the skills folder:
mkdir -p ~/.claude/skills - Clone the repo:
git clone --depth 1 https://github.com/aahl/skills.git /tmp/aahl-skills - Copy just this skill:
cp -r /tmp/aahl-skills/skills/cn-stats ~/.claude/skills/ - Restart Claude Code and test with a prompt like "look up the latest China CPI figures".
- Verify your network can reach data.stats.gov.cn — the skill cannot work from regions or networks where the portal is unreachable.
View source on GitHub ↗License: MIT