聚美智数


国家统计局数据查询

<p>[TOC]</p> <h3>接口调用说明</h3> <h4>请求方式</h4> <p>如接口没有单独说明,所有接口均为:<strong>POST</strong></p> <h4>请求格式</h4> <p>如接口没有单独说明,所有接口均为:<strong>application/x-www-form-urlencoded</strong></p> <h4>请求参数</h4> <p>请求参数包括公共参数和业务参数(业务参数见具体接口说明) 调用接口时,需要把<strong>公共参数</strong>和<strong>业务参数</strong>一并放在<strong>请求参数</strong>中提交</p> <h5>公共请求参数</h5> <table> <thead> <tr> <th>名称</th> <th>类型</th> <th>必须</th> <th>&lt;div style=&quot;width:420px;&quot;&gt;说明&lt;/div&gt;</th> </tr> </thead> <tbody> <tr> <td>appId</td> <td>String</td> <td>是</td> <td>服务商分配的唯一标识</td> </tr> <tr> <td>timestamp</td> <td>Long</td> <td>是</td> <td>当前时间戳(毫秒)</td> </tr> <tr> <td>sign</td> <td>String</td> <td>是</td> <td>签名,详见&lt;a href=&quot;#签名算法&quot;&gt;签名算法说明&lt;/a&gt;</td> </tr> </tbody> </table> <p>&lt;a name=&quot;签名算法&quot;&gt;&lt;/a&gt;</p> <h5>签名算法说明</h5> <pre><code>sign = sha256(appId + appSecret + timestamp)</code></pre> <p>用服务商分配的 <strong>appId</strong>、服务商分配的 <strong>appSecret</strong>,当前时间戳(毫秒) <strong>timestamp</strong>,按上述顺序拼接成字符串,再进行 <strong>sha256</strong> 哈希得到。如下:</p> <pre><code class="language-java">String appId = &amp;quot;xyzxy2121zxyz&amp;quot;; String timestamp = &amp;quot;1555378976238&amp;quot;; String appSecret = &amp;quot;efcefcef1121cefcefc1212121&amp;quot;; String str = appId + appSecret + timestamp; String sign = sha256(str);</code></pre> <h4>返回说明</h4> <h5>公共返回字段说明</h5> <p>所有接口均返回以下公共字段:</p> <table> <thead> <tr> <th>字段名</th> <th>&lt;div style=&quot;width:420px&quot;&gt;说明&lt;/div&gt;</th> </tr> </thead> <tbody> <tr> <td>code</td> <td>返回码,详见:code返回码说明</td> </tr> <tr> <td>msg</td> <td>code对应的描述</td> </tr> <tr> <td>charge</td> <td>计费标志 true为计费,false为不计费</td> </tr> <tr> <td>taskNo</td> <td>本次请求号</td> </tr> <tr> <td>data</td> <td>返回具体结果,object类型,详见data返回字段描述</td> </tr> </tbody> </table> <p>&lt;a name=&quot;公共code返回码说明&quot;&gt;&lt;/a&gt;</p> <h5>公共code返回码说明</h5> <p>所有接口公共返回码如下:</p> <table> <thead> <tr> <th>code</th> <th>&lt;div style=&quot;width:420px;&quot;&gt;说明&lt;/div&gt;</th> </tr> </thead> <tbody> <tr> <td>200</td> <td>成功</td> </tr> <tr> <td>400</td> <td>参数错误</td> </tr> <tr> <td>404</td> <td>接口地址不正确</td> </tr> <tr> <td>500</td> <td>系统维护,请稍候再试</td> </tr> <tr> <td>601</td> <td>接口未开通</td> </tr> <tr> <td>602</td> <td>账号停用</td> </tr> <tr> <td>604</td> <td>接口停用</td> </tr> <tr> <td>606</td> <td>调用超限,请稍候再试</td> </tr> <tr> <td>607</td> <td>ip不在白名单</td> </tr> <tr> <td>609</td> <td>请求过于频繁,请稍候再试</td> </tr> <tr> <td>610</td> <td>请求超时</td> </tr> <tr> <td>999</td> <td>其他,以实际返回为准</td> </tr> </tbody> </table> <h3>国家统计局数据分类查询接口</h3> <h4>接口描述</h4> <ul> <li>查询国家统计局分类统计数据。</li> </ul> <h4>请求地址</h4> <p><code>https://api.jumdata.com/data-statistics/classification</code></p> <h4>业务参数</h4> <table> <thead> <tr> <th>名称</th> <th>类型</th> <th>必须</th> <th>&lt;div style=&quot;width:400px&quot;&gt;说明&lt;/div&gt;</th> </tr> </thead> <tbody> <tr> <td>type</td> <td>String</td> <td>是</td> <td>分类,hgyd:全国月度数据,hgjd:全国季度数据,hgnd:全国年度数据,fsyd:分省月度数据,fsjd:分省季度数据,fsnd:分省年度数据</td> </tr> </tbody> </table> <h4>成功返回样例</h4> <pre><code class="language-json">{ &amp;quot;msg&amp;quot;: &amp;quot;成功&amp;quot;,//code对应的描述 &amp;quot;code&amp;quot;: 200,//返回码,详见code返回码说明 &amp;quot;taskNo&amp;quot;: &amp;quot;968545275134169633742173&amp;quot;,//本次唯一请求号 &amp;quot;charge&amp;quot;: true, //计费标志 &amp;quot;data&amp;quot;: { &amp;quot;type&amp;quot;: &amp;quot;hgyd&amp;quot;,//分类 &amp;quot;list&amp;quot;: [ { &amp;quot;name&amp;quot;: &amp;quot;价格指数&amp;quot;,//分类名称 &amp;quot;id&amp;quot;: &amp;quot;A01&amp;quot;,//分类id &amp;quot;list&amp;quot;: [//子分类列表(不一定有,没有列表的时候该id为最终查询数据的id) { &amp;quot;name&amp;quot;: &amp;quot;居民消费价格分类指数(上年同月=100)&amp;quot;,//子分类名称 &amp;quot;id&amp;quot;: &amp;quot;A0101&amp;quot;,//子分类id &amp;quot;list&amp;quot;: [//子分类列表(不一定有,没有列表的时候该id为最终查询数据的id) { &amp;quot;name&amp;quot;: &amp;quot;全国居民消费价格分类指数(上年同月=100)(2016-)&amp;quot;, &amp;quot;id&amp;quot;: &amp;quot;A010101&amp;quot; }, { &amp;quot;name&amp;quot;: &amp;quot;全国居民消费价格分类指数(上年同月=100)(-2015)&amp;quot;, &amp;quot;id&amp;quot;: &amp;quot;A010102&amp;quot; } ] } ] } ] } }</code></pre> <h4>失败返回样例</h4> <pre><code class="language-json">{ &amp;quot;msg&amp;quot;: &amp;quot;参数不正确&amp;quot;, &amp;quot;code&amp;quot;: 400 }</code></pre> <h3>统计数据查询接口</h3> <h4>接口描述</h4> <ul> <li>查询国家统计局统计数据。</li> </ul> <h4>请求地址</h4> <p><code>https://api.jumdata.com/data-statistics/query</code></p> <h4>业务参数</h4> <table> <thead> <tr> <th>名称</th> <th>类型</th> <th>必须</th> <th>&lt;div style=&quot;width:400px&quot;&gt;说明&lt;/div&gt;</th> </tr> </thead> <tbody> <tr> <td>type</td> <td>String</td> <td>是</td> <td>分类,hgyd:全国月度数据,hgjd:全国季度数据,hgnd:全国年度数据,fsyd:分省月度数据,fsjd:分省季度数据,fsnd:分省年度数据</td> </tr> <tr> <td>id</td> <td>String</td> <td>是</td> <td>分类接口查询返回的最后查询id</td> </tr> <tr> <td>prov</td> <td>String</td> <td>否</td> <td>省份,110000 北京市,120000 天津市,130000 河北省,140000 山西省,150000 内蒙古自治区,210000 辽宁省,220000 吉林省,230000 黑龙江省,310000 上海市,320000 江苏省,330000 浙江省,340000 安徽省,350000 福建省,360000 江西省,370000 山东省,410000 河南省,420000 湖北省,430000 湖南省,440000 广东省,450000 广西壮族自治区,460000 海南省,500000 重庆市,510000 四川省,520000 贵州省,530000 云南省,540000 西藏自治区,610000 陕西省,620000 甘肃省,630000 青海省,640000 宁夏回族自治区,650000 新疆维吾尔自治区</td> </tr> </tbody> </table> <h4>成功返回样例</h4> <pre><code class="language-json">{ &amp;quot;msg&amp;quot;: &amp;quot;成功&amp;quot;,//code对应的描述 &amp;quot;code&amp;quot;: 200,//返回码,详见code返回码说明 &amp;quot;taskNo&amp;quot;: &amp;quot;968545275134169633742173&amp;quot;,//本次唯一请求号 &amp;quot;charge&amp;quot;: true, //计费标志 &amp;quot;data&amp;quot;: { &amp;quot;type&amp;quot;: &amp;quot;hgyd&amp;quot;,//查询分类 &amp;quot;id&amp;quot;: &amp;quot;A010101&amp;quot;,//查询的子分类id &amp;quot;memo&amp;quot;: &amp;quot;按照统计制度规定,我国CPI每五年进行一次基期轮换。每次基期轮换后,……&amp;quot;,//该分类规定 &amp;quot;list&amp;quot;: [ { &amp;quot;code&amp;quot;: &amp;quot;A01010101&amp;quot;,//数据分类id &amp;quot;name&amp;quot;: &amp;quot;居民消费价格指数(上年同月=100)&amp;quot;,//数据分类名称 &amp;quot;datas&amp;quot;: [ { &amp;quot;data&amp;quot;: &amp;quot;100.0&amp;quot;, &amp;quot;time&amp;quot;: &amp;quot;202309&amp;quot;, &amp;quot;prov&amp;quot;: &amp;quot;&amp;quot;,//省份;分省数据才有 &amp;quot;prov_name&amp;quot;: &amp;quot;&amp;quot; //省份名称;分省数据才有 }, { &amp;quot;data&amp;quot;: &amp;quot;100.1&amp;quot;, &amp;quot;time&amp;quot;: &amp;quot;202308&amp;quot; } ] } ] } }</code></pre> <h4>失败返回样例</h4> <pre><code class="language-json">{ &amp;quot;msg&amp;quot;: &amp;quot;参数不正确&amp;quot;, &amp;quot;code&amp;quot;: 400 }</code></pre>

页面列表

ITEM_HTML