{"id":20556245,"url":"https://github.com/applegreengrape/2019ncov-api","last_synced_at":"2026-03-09T11:04:45.092Z","repository":{"id":130746643,"uuid":"237498008","full_name":"applegreengrape/2019nCov-API","owner":"applegreengrape","description":"2019nCov-API","archived":false,"fork":false,"pushed_at":"2020-02-12T20:09:01.000Z","size":205,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-06T06:48:13.261Z","etag":null,"topics":["2019ncov-api","backend-api","coronavirus-real-time","coronavirus-tracking","serverless"],"latest_commit_sha":null,"homepage":"https://applegreengrape.github.io/posts/2019ncov-api/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/applegreengrape.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-31T19:07:38.000Z","updated_at":"2020-02-12T20:09:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"5dd35ccd-c53a-4c97-9ea2-8d6549454f8f","html_url":"https://github.com/applegreengrape/2019nCov-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/applegreengrape/2019nCov-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applegreengrape%2F2019nCov-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applegreengrape%2F2019nCov-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applegreengrape%2F2019nCov-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applegreengrape%2F2019nCov-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/applegreengrape","download_url":"https://codeload.github.com/applegreengrape/2019nCov-API/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applegreengrape%2F2019nCov-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30291854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2019ncov-api","backend-api","coronavirus-real-time","coronavirus-tracking","serverless"],"created_at":"2024-11-16T03:26:01.945Z","updated_at":"2026-03-09T11:04:45.072Z","avatar_url":"https://github.com/applegreengrape.png","language":null,"readme":"# 2019nCov-API [新冠疫情爬虫数据接口]\n2019nCov-API - https://applegreengrape.github.io/posts/2019ncov-api/\n\n# Data Sources [数据来源]\n- real-time data: https://ncov.dxy.cn/ncovh5/view/pneumonia\n- travel data: http://2019ncov.nosugartech.com\n- baidu map api: http://api.map.baidu.com/\n- google map api: https://developers.google.com/maps/documentation/directions/start\n\n# AWS Setup \n![aws-serverless-setup](img/serverless-backend-api-diagram.png)\nDXY 网页爬虫数据和同城查询工具的数据每天3：30am 会录入AWS dynamodb tables.\n\n#### The API Endpoint [爬虫数据接口]: `https://4mmhkv7z9e.execute-api.eu-west-1.amazonaws.com/v1/`\n\n#### DXY 网页爬虫数据｜实时疫情数据\n#### `path`: `/dxy` \n\nYou can use this path to retrieve the stats of coronavirus including `id`, `date`, `country`, `provinceName`, `cityName`, `confirmedCount`, `suspectedCount`, `curedCount`, `deadCount`. Please be aware this ETL lambda function is scheduled from 2020-02-08. The latest data you can retrieve is from 2020-02-08. \n\nRequired URL parameters are `date` OR `country` OR `provincName` OR `cityName` OR `all`. \n\n| path          | /dxy                                                                                                 |                                                                                                                                             |                                |\n|---------------|------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------|\n| url parameter | description                                                                                          | returned result                                                                                                                             | example                        |\n| date          | Retrieve the coronavirus stats of a specific date. Accepted format is %Y-%m-%d (i.e. 2020-02-08).    | all fields from that date  | `/dxy?date=2020-02-08`           |\n| country       | Retrieve the coronavirus stats of a specific country. Accepted format is urllib encoded strings.     | all fields from that country | `/dxy?country=''`         |\n| provincName   | Retrieve the coronavirus stats of a specific provincName. Accepted format is urllib encoded strings. | all fields from that provincName | `/dxy?provincName=''` |\n| cityName      | Retrieve the coronavirus stats of a specific country. Accepted format is urllib encoded strings.     | all fields from that cityName | `/dxy?cityName=''`       |\n| all           | Set as 'yes' to retrieve all data                                                                    | all fields including id, date, country, provinceName, cityName, confirmedCount, suspectedCount, curedCount, deadCount                       | `/dxy?all='yes'`               |\n\n#### examples\n- search by the date:\n```bash\n$ curl -s https://4mmhkv7z9e.execute-api.eu-west-1.amazonaws.com/v1/dxy?date=2020-02-08 | jq .[0]\n{\n  \"id\": \"228\",\n  \"date\": \"2020-02-08\",\n  \"country\": \"中国\",\n  \"provinceName\": \"北京市\",\n  \"cityName\": \"通州区\",\n  \"confirmedCount\": \"15\",\n  \"suspectedCount\": \"NULL\",\n  \"curedCount\": \"NULL\",\n  \"deadCount\": \"NULL\",\n  \"msg\": \" No Man is an Island  🏝  没有人是一座孤岛 @pingzhou| 平舟 ⛵\"\n}\n```\n- search by cityName\n```bash\n# you will need to do url encode\n# i.e. 武汉(wuhan) will be something like %E6%AD%A6%E6%B1%89 \n$ curl -s https://4mmhkv7z9e.execute-api.eu-west-1.amazonaws.com/v1/dxy?cityName=%E6%AD%A6%E6%B1%89 | jq .\n[\n  {\n    \"id\": \"24\",\n    \"date\": \"2020-02-08\",\n    \"country\": \"中国\",\n    \"provinceName\": \"湖北省\",\n    \"cityName\": \"武汉\",\n    \"confirmedCount\": \"13603\",\n    \"suspectedCount\": \"NULL\",\n    \"curedCount\": \"698\",\n    \"deadCount\": \"545\",\n    \"msg\": \" No Man is an Island  🏝  没有人是一座孤岛 @pingzhou| 平舟 ⛵\"\n  }\n]\n```\n- to retrieve all data\n```bash\n$ curl -s https://4mmhkv7z9e.execute-api.eu-west-1.amazonaws.com/v1/dxy?all=yes | jq .[0]\n{\n  \"id\": \"228\",\n  \"date\": \"2020-02-08\",\n  \"country\": \"中国\",\n  \"provinceName\": \"北京市\",\n  \"cityName\": \"通州区\",\n  \"confirmedCount\": \"15\",\n  \"suspectedCount\": \"NULL\",\n  \"curedCount\": \"NULL\",\n  \"deadCount\": \"NULL\",\n  \"msg\": \" No Man is an Island  🏝  没有人是一座孤岛 @pingzhou| 平舟 ⛵\"\n}\n\n```\n#### 同城查询工具的数据\n#### `path`: `/travel`\n\nThis path is to retrieve the confirmed cases' travel paths including `id`, `date`, `start`, `stop`, `t_type`, `t_no`, `t_no_sub`. \n\nRequired URL parameters are `date` OR `start` OR `stop` OR `all`\n\n| Path          | /travel                                                                                                               |                                     |                        |\n|---------------|-----------------------------------------------------------------------------------------------------------------------|-------------------------------------|------------------------|\n| url parameter | description                                                                                                           | returned result                     | example                |\n| date          | Retrieve the coronavirus cases' travel paths of a specific date. Accepted format is %Y-%m-%d (i.e. 2020-02-08).       | all fields from that date           | `/travel?date=2020-02-08` |\n| start         | Retrieve the coronavirus cases' travel paths of a specific starting point. Accepted format is urllib encoded strings. | all fields from that starting point | `/travel?start=''`        |\n| end           | Retrieve the coronavirus cases' travel paths of a specific ending point. Accepted format is urllib encoded strings.   | all fields from that end point      | `/travel?end=''`          |\n| all           | Set as 'yes' to retrieve all data                                                                                     | all fields                          | `/travel?all='yes'`       |\n\n#### examples\n- search by date\n```bash\n$ curl -s https://4mmhkv7z9e.execute-api.eu-west-1.amazonaws.com/v1/travel?date=2020-02-02 | jq .\n[\n  {\n    \"id\": \"1246\",\n    \"date\": \"2020-02-02\",\n    \"start\": \"南极国际小区\",\n    \"stop\": \"哈尔滨传染病院\",\n    \"type\": \"6\",\n    \"t_no\": \"黑AE888Z\",\n    \"t_no_sub\": \"网约车\",\n    \"msg\": \" No Man is an Island  🏝  没有人是一座孤岛 @pingzhou| 平舟 ⛵\"\n  }\n]\n```\n- search by start city\n```bash\n$ curl -s https://4mmhkv7z9e.execute-api.eu-west-1.amazonaws.com/v1/travel?start=%E6%AD%A6%E6%B1%89 | jq .[0]\n{\n  \"id\": \"475\",\n  \"date\": \"2020-01-19\",\n  \"start\": \"武汉\",\n  \"stop\": \"成都东\",\n  \"type\": \"2\",\n  \"t_no\": \"D366\",\n  \"t_no_sub\": \"03号车厢\",\n  \"msg\": \" No Man is an Island  🏝  没有人是一座孤岛 @pingzhou| 平舟 ⛵\"\n}\n```\n- to retrieve all data\n```bash\n$ curl -s https://4mmhkv7z9e.execute-api.eu-west-1.amazonaws.com/v1/travel?all=yes | jq .[0]\n{\n  \"id\": \"228\",\n  \"date\": \"2020-01-17\",\n  \"start\": \"海口东\",\n  \"stop\": \"棋子湾\",\n  \"type\": \"2\",\n  \"t_no\": \"C7402\",\n  \"t_no_sub\": \"NULL\",\n  \"msg\": \" No Man is an Island  🏝  没有人是一座孤岛 @pingzhou| 平舟 ⛵\"\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapplegreengrape%2F2019ncov-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapplegreengrape%2F2019ncov-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapplegreengrape%2F2019ncov-api/lists"}