wobsoriano / Coronavirus Ph Api
Programming Languages
Projects that are alternatives of or similar to Coronavirus Ph Api
π¨ DISCONTINUED and unmaintained π¨
In unforeseen circumstances, the number of cases in the country has grown and the main source has not been updated. The APIs will stop working on August 7, 2020.
coronavirus-ph (API)
π¦ An API for tracking the coronavirus (COVID-19, SARS-CoV-2) outbreak in the Philippines.
Endpoints
All requests must be made to the base url: https://coronavirus-ph-api.herokuapp.com
(e.g: https://coronavirus-ph-api.herokuapp.com/cases). You can try them out in your browser to further inspect responses.
Getting total cases:
GET /total
{
"cases": 6459,
"deaths": 428,
"recoveries": 613,
"cases_today": 200,
"deaths_today": 19,
"recoveries_today": 41,
"admitted": 5418,
"fatality_rate": "6.63%",
"recovery_rate": "9.49%"
}
Getting summary of COVID-19 cases in the Philippines (DOH Data Drop):
GET /doh-data-drop
Key | Description |
---|---|
page |
Page number. This activates the pagination. Returns all cases without it |
itemsPerPage |
Number of cases per page. |
[
{
"case_code": "C404174",
"age": 38,
"sex": "F",
"is_admitted": "",
"date_reported": "2020-01-30",
"date_died": "",
"recovered_on": "2020-02-08",
"region_res": "Negros Oriental",
"prov_city_res": "Dumaguete City (Capital)",
"location": "Dumaguete City (Capital), Negros Oriental",
"latitude": 9.3061758,
"longitude": 123.3046069
},
{...}
]
Getting summary of COVID-19 cases in the Philippines:
GET /cases
Key | Description |
---|---|
page |
Page number. This activates the pagination. Returns all cases without it |
itemsPerPage |
Number of cases per page. |
[
{
"case_no": "PH00001",
"sex": "F",
"age": 38,
"nationality": "Chinese",
"residence_in_the_ph": "None",
"travel_history": "China",
"date_of_announcement_to_public": "2020-01-30",
"hospital_admitted_to": "San Lazaro Hospital",
"status": "Recovered",
"health_status": "Recovered",
"location": "Manila City",
"latitude": 14.61348,
"longitude": 120.98095,
"residence_lat": 14.5987266,
"residence_long": 120.9819909
},
{...}
]
Getting confirmed cases of Filipino nationals outside the Philippines by Region:
GET /cases-outside-ph
[
{
"country_territory_place": "Asia-Pacific",
"confirmed": 272,
"recovered": 111,
"died": 160
},
{...}
]
Getting list of facitilies
GET /facilities
[
{
"facility": "Research Institute for Tropical Medicine",
"puis": 24,
"confirmed_cases": 9,
"region": "NCR",
"latitude": 14.4096347,
"longitude": 121.0374245
},
{...}
]
Getting Metro Manila Community Quarantine Checkpoints:
GET /mm-checkpoints
[
{
"id": 13,
"district": "NORTHERN POLICE DISTRICT",
"city": "VALENZUELA CITY",
"location": "NLEX (ENTRANCE)",
"type": "EntryExit",
"lat": 14.768614,
"lng": 120.967557,
"description": "Not verified"
},
{...}
]
Getting a single Metro Manila Community Quarantine Checkpoint:
GET /mm-checkpoints/:id
{
"id": 13,
"district": "NORTHERN POLICE DISTRICT",
"city": "VALENZUELA CITY",
"location": "NLEX (ENTRANCE)",
"type": "EntryExit",
"lat": 14.768614,
"lng": 120.967557,
"description": "Not verified"
}
Data
All data are programmatically retrieved, re-formatted and stored in the cache for one hour.
- http://tiny.cc/n8nsmz
- https://en.wikipedia.org/wiki/2020_coronavirus_pandemic_in_the_Philippines
- https://safetravel.ph
- https://github.com/gigerbytes/ncov-ph-data
Installation
git clone https://github.com/sorxrob/coronavirus-ph-api.git
cd coronavirus-ph-api
cp .env.example .env
npm install
npm start
Running / Development
npm run dev
- Visit your app at http://localhost:3030.
License & copyright
Β© Robert C Soriano
Licensed under the MIT License.