You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All endpoints are located at ``coronavirus-tracker-api.herokuapp.com/v2/`` and are accessible via https. For instance: you can get data per location by using this URL:
You can try to open the URL in your browser to further inspect the response.
28
28
29
29
30
-
###Picking data source
30
+
#### Available data-sources:
31
31
32
-
We provide multiple data-sources you can pick from, simply add the query parameter ``?source=your_source_of_choice`` to your requests. JHU will be used as a default if you don't provide one.
32
+
Currently 2 different data-sources are available to retrieve the data:
33
33
34
-
#### Available sources:
35
-
36
-
***jhu** - https://github.com/CSSEGISandData/COVID-19 - Data repository operated by the Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE).
34
+
***jhu** - https://github.com/CSSEGISandData/COVID-19 - Worldwide Data repository operated by the Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE).
37
35
38
36
***csbs** - https://www.csbs.org/information-covid-19-coronavirus - U.S. County data that comes from the Conference of State Bank Supervisors.
39
37
40
-
***... more to come later**.
38
+
__JHU__ data-source will be used as a default source if you don't specify a source parameter in your request.
39
+
40
+
### Latest Endpoint
41
+
42
+
Getting latest amount of total confirmed cases, deaths, and recoveries.
41
43
42
-
### Getting latest amount of total confirmed cases, deaths, and recoveries.
| source | The data-source where data will be retrieved from. __Value__ can be: __jhu/csbs__. |
119
+
|__Default__ is __jhu__| String |
120
+
| country_code | The ISO ([alpha-2 country_code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)) to the Country/Province for which you're calling the Endpoint | String |
121
+
| timelines | To set the visibility of timelines (*daily tracking*).__Value__ can be: __0/1__. __Default__ is __0__| Integer |
| {latest} | The total amount of confirmed cases, deaths and recoveries for all the locations | Object |
128
+
| {latest}/confirmed | The up-to-date total number of confirmed cases for all the locations within the data-source | Integer |
129
+
| {latest}/deaths | The up-to-date total amount of deaths for all the locations within the data-source | Integer |
130
+
| {latest}/recovered | The up-to-date total amount of recovered for all the locations within the data-source | Integer |
131
+
| {locations} | The collection of locations contained within the data-source | Object |
132
+
| {location} | Information that identifies a location | Object |
133
+
| {latest} | The amount of confirmed cases, deaths and recovered related to the specific location | Object |
134
+
| {locations}/{location}/{latest}/confirmed | The up-to-date number of confirmed cases related to the specific location | Integer |
135
+
| {locations}/{location}/{latest}/deaths | The up-to-date number of deaths related to the specific location | Integer |
136
+
| {locations}/{location}/{latest}/deaths | The up-to-date number of recovered related to the specific location | Integer |
137
+
| {locations}/{location}/id | The location id. This id number is assigned to the location by the data-source. | Integer |
138
+
| {locations}/{location}/country | The Country name | String |
139
+
| {locations}/{location}/country_code | The ISO ([alpha-2 country_code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)) Country code for the location. | String |
140
+
| {locations}/{location}/province | The province where the location belongs to. (Used only for __csbs data-source__ of US locations. __Empty__ with __jhu data-source__. | String |
141
+
| {locations}/{location}/{coordinates}/latitude | The location latitude | Float |
142
+
| {locations}/{location}/{coordinates}/longitude | The location longitude | Float |
143
+
144
+
103
145
104
-
Additionally, you can also filter by any attribute, including province and country ([alpha-2 country_code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
0 commit comments