{"info":{"_postman_id":"5f58b58e-7249-4666-a912-beada5a42cbd","name":"covid-india-api","description":"<html><head></head><body><h1 id=\"covid-india-api\">Covid India API</h1>\n<blockquote>\n<p>REST API to track Coronavirus cases in India on state level</p>\n</blockquote>\n<blockquote>\n<p>COVID 19 India States Data API</p>\n</blockquote>\n<p><img src=\"https://img.shields.io/github/issues/udaya2899/covid-india-api\" alt=\"Issues\"> <img src=\"https://img.shields.io/github/forks/udaya2899/covid-india-api\" alt=\"Forks\"> <img src=\"https://img.shields.io/github/stars/udaya2899/covid-india-api\" alt=\"Stars\"> <img src=\"https://img.shields.io/github/license/udaya2899/covid-india-api\" alt=\"License\"></p>\n<p>Coronavirus is shaking the world. At such crucial times, the purity of data is to be maintained. Govt. of India hasn't released an official API yet. This API scraps data from Official Website of <a href=\"https://mohfw.gov.in\">Ministry of Health and Family Welfare</a> :heavy_check_mark: and exposes them as a <strong>REST API</strong> at <a href=\"https://covid-india-api.herokuapp.com/v1/api\">https://covid-india-api.herokuapp.com/v1/api</a></p>\n<h1 id=\"usage\">Usage</h1>\n<h3 id=\"rest-api-sample-usage\">REST API Sample Usage</h3>\n<p>cURL Command:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>curl --request GET \"https://covid-india-api.herokuapp.com/v1/api\"\n</code></pre><h3 id=\"to-run-the-server-locally-on-your-machine\">To run the server locally on your machine:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>git clone https://github.com/udaya2899/covid-india-api.git\ncd covid-india-api\npip install -r requirements.txt\npython app.py\n</code></pre><h2 id=\"implementation\">Implementation</h2>\n<ul>\n<li><strong>Python 3</strong> </li>\n<li><strong>Flask</strong> - REST GET Implementation</li>\n<li><strong>BeautifulSoup</strong> - Web Scraping</li>\n<li><strong>JSON</strong> - Data Serialization</li>\n<li><strong>Heroku</strong> - Deployment</li>\n</ul>\n<h2 id=\"requirements\">Requirements</h2>\n<p>Refer to <code>requirements.txt</code> for full list of requirements</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>beautifulsoup4==4.8.2\nFlask==1.1.1\npython-dateutil==2.8.1\nrequests==2.23.0\n</code></pre><h2 id=\"data-source---sample-table\">Data Source - Sample Table</h2>\n<p>Sample data from Ministry of Health and Family Welfare, Govt. of India <a href=\"https://mohfw.gov.in\">(link)</a></p>\n<p><img src=\"https://i.imgur.com/W4wNB1w.png\" alt=\"MOHFW Sample Data Table\"></p>\n<h2 id=\"api---sample-json\">API - Sample JSON</h2>\n<p>Sample API Response obtained from <a href=\"https://covid-india-api.herokuapp.com/v1/api\">https://covid-india-api.herokuapp.com/v1/api</a></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code> {\n  \"data\": {\n    \"state_data\": [\n      {\n        \"id\": \"1\",\n        \"place\": \"Andhra Pradesh\",\n        \"confirmed_indian\": \"14\",\n        \"confirmed_foreign\": \"0\",\n        \"cured\": \"1\",\n        \"deaths\": \"0\"\n      },\n      {\n        \"id\": \"2\",\n        \"place\": \"Andaman and Nicobar Islands\",\n        \"confirmed_indian\": \"6\",\n        \"confirmed_foreign\": \"0\",\n        \"cured\": \"0\",\n        \"deaths\": \"0\"\n      },\n      .\n      .\n      .\n      {\n        \"id\": \"27\", \n        \"place\": \"West Bengal\", \n        \"confirmed_indian\": \"15\", \n        \"confirmed_foreign\": \"0\", \n        \"cured\": \"0\", \n        \"deaths\": \"1\"\n      }\n    ]\n    \"total_data\": {\n        \"confirmed_indian\": \"862\", \n        \"confirmed_foreign\": \"47 \", \n        \"cured\": \"80\", \n        \"deaths\": \"19\"\n        }, \n     \"last_updated\": \"2020-03-28 17:45:00\"\n     }\n  }\n}\n</code></pre><h2 id=\"contribution\">Contribution</h2>\n<p>Pull requests are welcomed to make changes. To make drastic changes, open an issue to discuss.</p>\n<h2 id=\"contact\">Contact</h2>\n<p>Mail me at <a href=\"mailto:udayaprakash2899@gmail.com\">udayaprakash2899@gmail.com</a> for further queries </p>\n<h2 id=\"license\">License</h2>\n<p><a href=\"https://github.com/udaya2899/covid-india-api/blob/master/LICENSE\">MIT</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Covid India API","slug":"covid-india-api"},{"content":"Usage","slug":"usage"}],"owner":"5310017","collectionId":"5f58b58e-7249-4666-a912-beada5a42cbd","publishedId":"SzYW4LYY","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-03-29T10:44:59.000Z"},"item":[{"name":"Covid India State Wise Data","id":"22e97770-e374-4758-a32d-aed40cab08cd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"url":"https://covid-india-api.herokuapp.com/v1/api","description":"<h2 id=\"request-method-get\">Request Method: <code>GET</code></h2>\n<p>Request URL: <a href=\"https://covid-india-api.herokuapp.com/v1/api\">https://covid-india-api.herokuapp.com/v1/api</a></p>\n<h2 id=\"sample-usage\">Sample Usage</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>cURL --request GET https://covid-india-api.herokuapp.com/v1/api\n</code></pre>","urlObject":{"protocol":"https","path":["v1","api"],"host":["covid-india-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"22e97770-e374-4758-a32d-aed40cab08cd"}],"event":[{"listen":"prerequest","script":{"id":"ed6ffa62-729b-40b6-9069-859ac7d3c039","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"2dd02448-09ca-475c-836f-5170b1691168","type":"text/javascript","exec":[""]}}]}