Home

Awesome

Coronavirus (COVID-19) open Go API

alt tag This API grabs live statistics from https://www.worldometers.info/coronavirus/#countries web site periodically.

It uses Dataflow Kit API to scrape source web site.

Endpoints

GET /v1 - List all COVID-19 cases per country.

GET /v1/{cntr} - Return COVID-19 cases for specified country.

Examples:

https://covid-19.dataflowkit.com/v1/world - summary results for the whole world.

https://covid-19.dataflowkit.com/v1/spain - COVID-19 cases for Spain.

https://covid-19.dataflowkit.com/v1/usa - COVID-19 cases for the USA.

Installation

Clone public repository from github

git clone https://github.com/slotix/COVID-19.git

Run the following command to build Go binary

cd COVID-19/covid-19-service && go build

Register at https://account.dataflowkit.com to get Free API Key.

Start API Server

Now start the service and try to send requests.

./covid-19-service -a DFK-API-KEY

Type a command in another terminal :

curl 0.0.0.0:8008/v1/world

Or open http://0.0.0.0:8008/v1 in your browser.

Dataflow Kit public COVID-19 Free API

https://covid-19.dataflowkit.com/v1

https://covid-19.dataflowkit.com/v1/world

Widgets (Informers).

Free Coronavirus (COVID-19) widgets are available at:

https://covid-19.dataflowkit.com

Your website visitor's country is determined automatically.