nCov-DataCollect

本接口已失效,请移步GitHub

数据来自丁香园

武汉加油,温州加油

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

数据可视化查看地址

管理后台

登录用户名 : demo

登录密码:demo

模板来源:lin-xin

api接口地址

基础URL:

http://ncov.neeto.cn/api/

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

http://ncov.neeto.cn/api/

请求方法:

GET

返回实例:

只截取了部分数据

"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
                },....

返回实例参数:

参数名称参数类型备注
provinceNameString省份全名
provinceShortNameString省份短名
cityNameString城市名称
confirmedCountnumber确诊人数
suspectedCountnumber疑似人数
curedCountnumber治愈人数
deadCountnumber死亡人数
addtimenumber爬取时间

获取实时数据:

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

请求方法:

GET

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

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

请求方法:

GET

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

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

请求参数:

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

请求方法:

POST

返回实例:

{
    "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
        }
    ]
}

返回实例参数:

参数名称参数类型备注
provinceNameString省份全名
provinceShortNameString省份短名
cityNameString城市名称
confirmedCountnumber确诊人数
suspectedCountnumber疑似人数
curedCountnumber治愈人数
deadCountnumber死亡人数
addtimenumber爬取时间

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

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

请求参数:

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

请求方法:

POST

返回实例:

[
    {
        "id": 46994,
        "cityName": "武汉",
        "provinceShortName": "湖北",
        "confirmedCount": 1590,
        "suspectedCount": 0,
        "curedCount": 47,
        "deadCount": 85,
        "addtime": 1580224800003
    }
]

返回实例参数:

参数名称参数类型备注
provinceShortNameString省份短名
cityNameString城市名称
confirmedCountnumber确诊人数
suspectedCountnumber疑似人数
curedCountnumber治愈人数
deadCountnumber死亡人数
addtimenumber爬取时间
Last modification:February 6th, 2020 at 02:51 pm
不要打赏!不要打赏!(大雾