Your first request takes three steps
Try core metrics anonymously; use shdata browser authorization for complete data or a Bearer API key on servers.
Try the public scope
Query six core metrics and recent yearbooks without a key; responses identify preview limits.
Install shdata CLIChoose authentication
Run shdata login locally; on servers save a Professional key as SHDATA_API_KEY.
Send the request
Call an endpoint under the API base URL and inspect meta.truncated.
Read the gross regional product series
All three examples return the same metric definition, 2015–2024 values, statistical definitions, and annual sources.
export SHDATA_API_KEY="sdo_请替换为你的密钥"
curl --request GET \
--url "https://shdata.watch/api/v1/data/metrics/gdp?fromYear=2015&toYear=2024" \
--header "Authorization: Bearer $SHDATA_API_KEY"{
"data": {
"metric": {
"id": "gdp",
"label": "地区生产总值",
"topic": "经济总量",
"unit": "亿元",
"firstYear": 1978,
"lastYear": 2024,
"observationCount": 47
},
"series": [
{
"year": 2024,
"value": 53926.71,
"editionYear": 2025,
"sourcePageId": "C0301-51a44e58",
"sourceUrl": "https://tjj.sh.gov.cn/..."
}
]
},
"meta": {
"sourceVersion": "catalog-v1-...",
"generatedAt": "..."
}
}