WuHan-nCoV-2019疫情数据接口

nCov-DataCollect

本接口又复活辣,3.2更新,请移步GitHub [button color=”info” icon=”” url=”https://github.com/TankNee/nCoV-2019-DataAPI" type=””]Github地址[/button]

数据来自丁香园

[scode type=”red”]武汉加油,温州加油[/scode]

本项目基于nodejs-express框架构建,使用正则表达式爬取页面信息

数据可视化查看地址

管理后台

登录用户名 : demo

登录密码:demo

模板来源:lin-xin

api接口地址

基础URL:

http://ncov.tanknee.cn/api/

获取后台数据库中的最新数据:

http://ncov.tanknee.cn/api/

请求方法:

GET

返回实例:

只截取了部分数据

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"sumInfo": {
"id": 1559,
"confirmedCount": 7830,
"curedCount": 135,
"deadCount": 170,
"suspectedCount": 12139,
"addtime": 1580387755098
},
"provinceInfo": [
{
"id": 19270,
"provinceName": "湖北省",
"provinceShortName": "湖北",
"confirmedCount": 4586,
"suspectedCount": 0,
"curedCount": 90,
"deadCount": 162,
"addtime": 1580387755098,
"cities": [
{
"id": 176949,
"cityName": "武汉",
"provinceShortName": "湖北",
"confirmedCount": 2261,
"suspectedCount": 0,
"curedCount": 54,
"deadCount": 129,
"addtime": 1580387755098
},....

返回实例参数:

参数名称 参数类型 备注
provinceName String 省份全名
provinceShortName String 省份短名
cityName String 城市名称
confirmedCount number 确诊人数
suspectedCount number 疑似人数
curedCount number 治愈人数
deadCount number 死亡人数
addtime number 爬取时间

获取实时数据:

http://ncov.tanknee.cn/api/realtime

请求方法:

GET

获取疫情总和数据的全部历史数据:

http://ncov.tanknee.cn/api/sum

请求方法:

GET

获取单一省份的最新数据:

http://ncov.tanknee.cn/api/province

请求参数:

参数名称 参数类型 备注
province String 省份名称
all String 是否获取全部历史消息,默认为false

请求方法:

POST

返回实例:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
{
"provinceInfo": [
{
"id": 5944,
"provinceName": "浙江省",
"provinceShortName": "浙江",
"confirmedCount": 173,
"suspectedCount": 0,
"curedCount": 3,
"deadCount": 0,
"addtime": 1580224800003
}
],
"citiesOfProvince": [
{
"id": 47028,
"cityName": "温州",
"provinceShortName": "浙江",
"confirmedCount": 60,
"suspectedCount": 0,
"curedCount": 3,
"deadCount": 0,
"addtime": 1580224800003
},
{
"id": 47029,
"cityName": "杭州",
"provinceShortName": "浙江",
"confirmedCount": 32,
"suspectedCount": 0,
"curedCount": 0,
"deadCount": 0,
"addtime": 1580224800003
},
{
"id": 47030,
"cityName": "台州",
"provinceShortName": "浙江",
"confirmedCount": 22,
"suspectedCount": 0,
"curedCount": 0,
"deadCount": 0,
"addtime": 1580224800003
},
{
"id": 47031,
"cityName": "宁波",
"provinceShortName": "浙江",
"confirmedCount": 17,
"suspectedCount": 0,
"curedCount": 0,
"deadCount": 0,
"addtime": 1580224800003
},
{
"id": 47032,
"cityName": "嘉兴",
"provinceShortName": "浙江",
"confirmedCount": 11,
"suspectedCount": 0,
"curedCount": 0,
"deadCount": 0,
"addtime": 1580224800003
},
{
"id": 47033,
"cityName": "绍兴",
"provinceShortName": "浙江",
"confirmedCount": 7,
"suspectedCount": 0,
"curedCount": 0,
"deadCount": 0,
"addtime": 1580224800003
},
{
"id": 47034,
"cityName": "金华",
"provinceShortName": "浙江",
"confirmedCount": 7,
"suspectedCount": 0,
"curedCount": 0,
"deadCount": 0,
"addtime": 1580224800003
},
{
"id": 47035,
"cityName": "衢州",
"provinceShortName": "浙江",
"confirmedCount": 5,
"suspectedCount": 0,
"curedCount": 0,
"deadCount": 0,
"addtime": 1580224800003
},
{
"id": 47036,
"cityName": "丽水",
"provinceShortName": "浙江",
"confirmedCount": 5,
"suspectedCount": 0,
"curedCount": 0,
"deadCount": 0,
"addtime": 1580224800003
},
{
"id": 47037,
"cityName": "舟山",
"provinceShortName": "浙江",
"confirmedCount": 4,
"suspectedCount": 0,
"curedCount": 0,
"deadCount": 0,
"addtime": 1580224800003
},
{
"id": 47038,
"cityName": "湖州",
"provinceShortName": "浙江",
"confirmedCount": 3,
"suspectedCount": 0,
"curedCount": 0,
"deadCount": 0,
"addtime": 1580224800003
}
]
}

返回实例参数:

参数名称 参数类型 备注
provinceName String 省份全名
provinceShortName String 省份短名
cityName String 城市名称
confirmedCount number 确诊人数
suspectedCount number 疑似人数
curedCount number 治愈人数
deadCount number 死亡人数
addtime number 爬取时间

获取单一城市的全部信息:

http://ncov.tanknee.cn/api/city

请求参数:

参数名称 参数类型 备注
cityname String 城市名称
all String 是否获取全部历史消息,默认为false

请求方法:

POST

返回实例:

1
2
3
4
5
6
7
8
9
10
11
12
[
{
"id": 46994,
"cityName": "武汉",
"provinceShortName": "湖北",
"confirmedCount": 1590,
"suspectedCount": 0,
"curedCount": 47,
"deadCount": 85,
"addtime": 1580224800003
}
]

返回实例参数:

参数名称 参数类型 备注
provinceShortName String 省份短名
cityName String 城市名称
confirmedCount number 确诊人数
suspectedCount number 疑似人数
curedCount number 治愈人数
deadCount number 死亡人数
addtime number 爬取时间
Author: TankNee
Link: https://www.tanknee.cn/2020/01/29/ncov/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.