{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"5f58b58e-7249-4666-a912-beada5a42cbd","name":"covid-india-api","description":"# Covid India API\n> REST API to track Coronavirus cases in India on state level\n\n> COVID 19 India States Data API\n\n![Issues](https://img.shields.io/github/issues/udaya2899/covid-india-api) ![Forks](https://img.shields.io/github/forks/udaya2899/covid-india-api) ![Stars](https://img.shields.io/github/stars/udaya2899/covid-india-api) ![License](https://img.shields.io/github/license/udaya2899/covid-india-api)\n\nCoronavirus 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 [Ministry of Health and Family Welfare](https://mohfw.gov.in) :heavy_check_mark: and exposes them as a **REST API** at [https://covid-india-api.herokuapp.com/v1/api](https://covid-india-api.herokuapp.com/v1/api)\n\n\n# Usage \n### REST API Sample Usage\ncURL Command:\n\n    curl --request GET \"https://covid-india-api.herokuapp.com/v1/api\"\n\t\n### To run the server locally on your machine:\n\n    \n    git clone https://github.com/udaya2899/covid-india-api.git\n    cd covid-india-api\n    pip install -r requirements.txt\n    python app.py\n\n## Implementation\n\n - **Python 3** \n - **Flask** - REST GET Implementation\n - **BeautifulSoup** - Web Scraping\n - **JSON** - Data Serialization\n - **Heroku** - Deployment\n\n\n## Requirements\nRefer to `requirements.txt` for full list of requirements\n\n    beautifulsoup4==4.8.2\n    Flask==1.1.1\n    python-dateutil==2.8.1\n    requests==2.23.0\n## Data Source - Sample Table\nSample data from Ministry of Health and Family Welfare, Govt. of India [(link)](https://mohfw.gov.in)\n\n![MOHFW Sample Data Table](https://i.imgur.com/W4wNB1w.png)\n\n## API - Sample JSON \n\nSample API Response obtained from [https://covid-india-api.herokuapp.com/v1/api](https://covid-india-api.herokuapp.com/v1/api)\n\n     {\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\t      {\n\t\t    \"id\": \"27\", \n\t\t    \"place\": \"West Bengal\", \n\t\t    \"confirmed_indian\": \"15\", \n\t\t    \"confirmed_foreign\": \"0\", \n\t\t    \"cured\": \"0\", \n\t\t    \"deaths\": \"1\"\n\t\t  }\n        ]\n        \"total_data\": {\n\t        \"confirmed_indian\": \"862\", \n\t        \"confirmed_foreign\": \"47 \", \n\t        \"cured\": \"80\", \n\t        \"deaths\": \"19\"\n\t        }, \n\t     \"last_updated\": \"2020-03-28 17:45:00\"\n\t     }\n\t  }\n    }\n\n## Contribution\nPull requests are welcomed to make changes. To make drastic changes, open an issue to discuss.\n\n## Contact\nMail me at udayaprakash2899@gmail.com for further queries \n\n## License\n[MIT](https://github.com/udaya2899/covid-india-api/blob/master/LICENSE)","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"5310017","team":888577,"collectionId":"5f58b58e-7249-4666-a912-beada5a42cbd","publishedId":"SzYW4LYY","public":true,"publicUrl":"https://documenter-api.postman.tech/view/5310017/SzYW4LYY","privateUrl":"https://go.postman.co/documentation/5310017-5f58b58e-7249-4666-a912-beada5a42cbd","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","version":"8.10.1","publishDate":"2020-03-29T10:44:59.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/cb595e1adc9f0e0232865afe8fd2dd3897070be02919cce4722f1ab8a223494a","favicon":"https://res.cloudinary.com/postman/image/upload/v1585478183/team/rdyx61bxf0ns0hzeqnkc.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/SzYW4LYY"}