Awesome Open Source
Awesome Open Source

🚨 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.

GitHub GitHub repo size GitHub stars GitHub forks GitHub last commit

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.

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

License & copyright

© Robert C Soriano

Licensed under the MIT License.


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
javascript (70,997
nodejs (3,875
express (511
coronavirus (116
zeit (41