参数名称 | 类型 | 必填 | 说明 |
---|
参数名称 | 类型 | 说明 |
---|---|---|
totalCured | int | 全国累计治愈数 |
totalDeath | int | 全国累计死亡数 |
totalIncrease | int | 始终为0,请勿使用 |
incDoubtful | int | 全国疑似数,较昨日数据对比 |
childStatistic | string | 地点 |
totalDoubtful | int | 全国疑似数 |
time | string | 截止时间 |
totalConfirmed | int | 全国累计确诊数 |
updateTime | string | 截止时间 |
dataSource | string | 数据来源 |
day | string | 日期,月日 |
sure_cnt | int | 累计确诊数 |
die_cnt | int | 累计死亡数 |
cure_cnt | int | 累计治愈数 |
doubt_cnt | int | 当日疑似数 |
fullDay | int | 日期,年月日 |
<?php require_once 'curl.func.php'; $appkey = 'your_appkey_here';//你的appkey $url = "https://api.jisuapi.com/ncov/query?appkey=$appkey"; $result = curlOpen($url, array('ssl'=>true)); $jsonarr = json_decode($result, true); if($jsonarr['status'] != 0) { echo $jsonarr['msg']; exit(); } $result = $jsonarr['result']; foreach($result as $key=>$val) { echo $key.' '.$val. '<br>'; }
{ "status": 0, "msg": "ok", "result": { "country": { "totalCured": 322031, "totalDeath": 24883, "totalIncrease": 0, "incDoubtful": 0, "childStatistic": "全国", "totalDoubtful": 0, "time": "2022-09-02 11:07:00", "totalConfirmed": 5974028 }, "dataSourceUpdateTime": { "updateTime": "截至 2022.9.2 11:07", "dataSource": "各省市地区卫健委" }, "trend": [ { "day": "3.05", "sure_cnt": 319225, "die_cnt": 7263, "cure_cnt": 138250, "doubt_cnt": 9, "fullDay": 20220305 } ], "provinceArray": [ { "totalCured": 13742, "totalDeath": 9950, "totalIncrease": 0, "cityArray": [ { "totalCured": 13742, "totalDeath": 9950, "totalIncrease": 0, "childStatistic": "中国台湾", "totalDoubtful": 0, "totalConfirmed": 5342106 } ], "childStatistic": "中国台湾", "totalDoubtful": 0, "totalConfirmed": 5342106 } ] } }
代号 | 说明 |
---|---|
210 | 没有信息 |
代号 | 说明 |
---|---|
101 | APPKEY为空或不存在 |
102 | APPKEY已过期 |
103 | APPKEY无请求此数据权限 |
104 | 请求超过次数限制 |
105 | IP被禁止 |
106 | IP请求超过限制 |
107 | 接口维护中 |
108 | 接口已停用 |
© 2015-2025 杭州极速互联科技有限公司 版权所有 浙ICP备17047587号-4 浙公网安备33010502005096 增值电信业务经营许可证:浙B2-20190875