Covid-19 Somaliland API is an API made for tracking Coronavirus cases in Somaliland, the data is based on the official Somaliland Coronavirus website and it's updated daily.
All endpoints are located at covid-19-somaliland-api.herokuapp.com/ and are accessible via https. For instance: you can get data per location by using this URL:
https://covid-19-somaliland-api.herokuapp.com/locations
You can open the URL in your browser to further inspect the response. Or you can make this curl call in your terminal to see the prettified response:
curl https://covid-19-somaliland-api.herokuapp.com/locations | json_pp
You can use the API through the SwaggerUI.
Gets the latest national confirmed, recovered and deaths cases.
GET /latestSample response
{
"latest": [
"confirmed": 6,
"deaths": 1,
"recovered": 2
]
}Gets the latest national confirmed, recovered and deaths cases of each location
GET /locationsSample response
{
"locations": [
{
"city": "Hargeysa",
"confirmed": 3,
"deaths": 0,
"id": 1,
"province": "Maroodijeex",
"recovered": 0
},
{
"city": "Burco",
"confirmed": 1,
"deaths": 0,
"id": 2,
"province": "Togdheer",
"recovered": 1
}
]
}GET /locations/id/:idPath Parameters
| Path parameter | Required/Optional | Description | Type |
|---|---|---|---|
| id | OPTIONAL | The unique location id for each location. The list of valid location IDs can be found in the locations response: /locations |
Integer |
GET /locations/id/2Sample response
{
"locations": [
{
"city": "Burco",
"confirmed": 1,
"deaths": 0,
"id": 2,
"province": "Togdheer",
"recovered": 1
}
]
}GET /locations/province/:provincePath Parameters
| Path parameter | Required/Optional | Description | Type |
|---|---|---|---|
| province | OPTIONAL | The name of the province in which the location belongs to. The list of the provinces can be found in the locations response: /locations |
String |
GET /locations/province/togdheerSample response
{
"locations": [
{
"city": "Burco",
"confirmed": 1,
"deaths": 0,
"id": 2,
"province": "Togdheer",
"recovered": 1
}
]
}GET /locations/city/:cityPath Parameters
| Path parameter | Required/Optional | Description | Type |
|---|---|---|---|
| province | OPTIONAL | The name of the city in which the location belongs to. The list of the cities can be found in the locations response: /locations |
String |
GET /locations/city/buraoSample response
{
"locations": [
{
"city": "Burco",
"confirmed": 1,
"deaths": 0,
"id": 2,
"province": "Togdheer",
"recovered": 1
}
]
}