Skip to content

JungYoungseok/COVID-19-API

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COVID-19-API Docker Pulls Total alerts

API Service for tracking the COVID-19

Try it

Run on Ainize

API Document

Endpoint

https://wuhan-coronavirus-api.laeyoung.endpoint.ainize.ai/

Brief

Request:

GET /jhu-edu/brief

Successful Response:

HTTP/1.1 200 OK
Content-Type: application/json

{
	"confirmed": 7783,
	"deaths": 170,
	"recovered": 133
}

Curl:

curl -X GET "https://wuhan-coronavirus-api.laeyoung.endpoint.ainize.ai/jhu-edu/brief" -H "accept: application/json"

Browser: https://wuhan-coronavirus-api.laeyoung.endpoint.ainize.ai/jhu-edu/brief

Latest

Request:

GET /jhu-edu/latest

Options

  • Filter by country's iso2 or iso3 code
GET /jhu-edu/latest?iso2=US
  • Make the sum of all the cities or the states in those countries
GET /jhu-edu/latest?onlyCountries=true

You can uses both options together.

Successful Response:

HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "provincestate": "Anhui",
    "countryregion": "Mainland China",
    "lastupdate": "2020-02-29T07:21:21.001Z",
    "confirmed": 990,
    "deaths": 6,
    "recovered": 821,
    "location": {
      "lat": 31.8257,
      "lng": 117.2264
    },
    "countrycode": {
      "iso2": "CN",
      "iso3": "CHN"
    }
  }, {
    "provincestate": "Beijing",
    "countryregion": "Mainland China",
    "lastupdate": "2020-02-29T07:21:21.001Z",
    "confirmed": 410,
    "deaths": 7,
    "recovered": 257,
    "location": {
      "lat": 40.1824,
      "lng": 116.4142
    },
    "countrycode": {
      "iso2": "CN",
      "iso3": "CHN"
    }
  }, ...
]

Curl:

curl -X GET "https://wuhan-coronavirus-api.laeyoung.endpoint.ainize.ai/jhu-edu/latest" -H "accept: application/json"

Browser:

Timeseries

Request:

GET /jhu-edu/timeseries

Options

  • Filter by country's iso2 or iso3 code
GET /jhu-edu/timeseries?iso2=US
  • Make the sum of all the cities or the states in those countries
GET /jhu-edu/timeseries?onlyCountries=true

You can uses both options together.

Successful Response:

HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "provincestate": "Anhui",
    "countryregion": "Mainland China",
    "lastupdate": "2020-02-29T08:15:03.208Z",
    "location": {
      "lat": 31.8257,
      "lng": 117.2264
    },
    "countrycode": {
      "iso2": "CN",
      "iso3": "CHN"
    },
    "timeseries": {
      "1/22/20": {
        "confirmed": 1,
        "deaths": 0,
        "recovered": 0
      },
      "1/23/20": {
        "confirmed": 9,
        "deaths": 0,
        "recovered": 0
      }, ...
    }
  }, {
    "provincestate": "Beijing",
    "countryregion": "Mainland China",
    "lastupdate": "2020-02-29T08:15:03.208Z",
    "location": {
      "lat": 40.1824,
      "lng": 116.4142
    },
    "countrycode": {
      "iso2": "CN",
      "iso3": "CHN"
    },    
    "timeseries": {
      "1/22/20": {
        "confirmed": 14,
        "deaths": 0,
        "recovered": 0
      },
      "1/23/20": {
        "confirmed": 22,
        "deaths": 0,
        "recovered": 0
      }, ...
    }
  }, ...
]

Curl:

curl -X GET "https://wuhan-coronavirus-api.laeyoung.endpoint.ainize.ai/jhu-edu/timeseries" -H "accept: application/json"

Browser:

Services using COVID-19-API

Original data source

Novel Coronavirus (COVID-19) Cases, provided by JHU CSSE

License

This project is released under the MIT License. See LICENSE for details.

Terms of Use

You can uses this Repo and API service freely, even commercial uses. But this term of use rely on data sources. You have to check each terms of use of data sources (JHU CSSE, livecod(kor)).

Packages

No packages published

Languages

  • JavaScript 98.6%
  • Dockerfile 1.4%