{"id":37106215,"url":"https://github.com/willfantom/lu-covid-api","last_synced_at":"2026-01-14T12:47:49.981Z","repository":{"id":55621145,"uuid":"302992303","full_name":"WillFantom/lu-covid-api","owner":"WillFantom","description":"API access to the Lancaster University Covid19 statistics 🦠 (Also, some basic CLI graphs)","archived":false,"fork":false,"pushed_at":"2020-12-17T16:07:06.000Z","size":339,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-21T02:18:06.849Z","etag":null,"topics":["covid-19","university","unofficial"],"latest_commit_sha":null,"homepage":"https://lucovid.willfantom.dev","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WillFantom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-10T21:24:44.000Z","updated_at":"2020-12-02T13:30:24.000Z","dependencies_parsed_at":"2022-08-15T04:40:37.434Z","dependency_job_id":null,"html_url":"https://github.com/WillFantom/lu-covid-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WillFantom/lu-covid-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WillFantom%2Flu-covid-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WillFantom%2Flu-covid-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WillFantom%2Flu-covid-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WillFantom%2Flu-covid-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WillFantom","download_url":"https://codeload.github.com/WillFantom/lu-covid-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WillFantom%2Flu-covid-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["covid-19","university","unofficial"],"created_at":"2026-01-14T12:47:49.209Z","updated_at":"2026-01-14T12:47:49.970Z","avatar_url":"https://github.com/WillFantom.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# COVID Statistics API for LU\n\u003e Very unofficial, but uses the data provided by the university publicly\n\nTo see the statistics, see [here](https://portal.lancaster.ac.uk/intranet/cms/coronavirus/covid-19-statistics). The API is currently hosted at `https://lucovid.willfantom.dev`. The data can also be found through the telegram bot `@LU_Covid19_bot`.\n\nThis API exists only to allow for easier manipulation of the data.\n\n## Examples\n\n- Get graph of all cases since 01/Oct/2020 (with `lolcat` for colors):\n  ```bash\n  $ curl \"https://lucovid.willfantom.dev/graphs/total\" | lolcat\n  ```\n  ![totals graph](./total-cases-graph.png)\n\n- Get average daily cases for the past week as JSON (with `jq` for formatting):\n  ```bash\n  $ curl \"https://lucovid.willfantom.dev/api/v1/average?days=7\" | jq\n\n  {\n    \"average cases\": 22,\n    \"ending date\": \"Thu, 15 Oct 2020 00:00:00 UTC\",\n    \"starting date\": \"Thu, 08 Oct 2020 00:00:00 UTC\"\n  }\n  ```\n\n### ⚠️ Warning\n\nIf you can't reach `portal.lancaster.ac.uk`, you can't host the API. This might be because you are using CloudFlare DNS.\n\n### Graphs\n\nThis simply returns some poorly formatted ascii graphs for now...\n\n- **Total Cases**\n\n  `/graphs/total`\n\n  Shows increase in total cases across all available data.\n\n- **Student Cases**\n\n  `/graphs/students`\n\n  Shows increase in total student cases (campus and city) across all available data points.\n\n- **Staff Cases**\n\n  `/graphs/staff`\n\n  Shows increase in total staff cases across all available data points.\n\n### API\n\n- **Cases Today** [get]\n\n  `/api/v1/today`\n\n  Telegram bot function: `/today`\n\n  Will return:\n  - `204` if today's data has not yet been published (or scraped)\n  - `500` if this crappy code messed up\n  - `200` with a json summary of the cases today if successful\n\n- **Most Recent Daily Numbers** [get]\n\n  `/api/v1/recent`\n\n  Telegram bot function: `/recent`\n\n  Will return:\n  - `204` if data has not yet been published (or scraped)\n  - `500` if this crappy code messed up\n  - `200` with a json summary of the cases for that day if successful, e.g.\n      ```json\n      {\"Date\":\"2020-10-02T00:00:00Z\",\"Campus\":4,\"City\":2,\"Staff\":0}\n      ```\n\n- **Cases for Given Day** [get]\n\n  `/api/v1/day`\n\n  Required Parameters:\n    - `day`: e.g. `02`\n    - `month`: e.g. `Oct`\n    - `year`: e.g. `2020`\n    \u003e (example builds `October 2nd 2020`)\n\n  Will return:\n  - `204` if data has not yet been published (or scraped)\n  - `500` if this crappy code messed up\n  - `200` with a json summary of the cases for that day if successful, e.g.\n      ```json\n      {\"Date\":\"2020-10-02T00:00:00Z\",\"Campus\":4,\"City\":2,\"Staff\":0}\n      ```\n\n- **Total Cases** [get]\n\n  `/api/v1/totals`\n\n  Will return:\n  - `204` if data has not yet been published (or scraped)\n  - `500` if this crappy code messed up\n  - `200` with a json summary of the total cases if successful, e.g.\n      ```json\n      {\n        \"starting date\": \"Thu, 01 Oct 2020 00:00:00 UTC\",\n        \"ending date\": \"Thu, 08 Oct 2020 00:00:00 UTC\",\n        \"staff total\": 5,\n        \"student total\": 117,\n        \"total cases\": 122\n      }\n      ```\n\n- **Average Daily Cases** [get]\n\n  `/api/v1/average`\n\n  Optional Parameters:\n    - `days`: e.g. `7` | if not provided, will average across the whole dataset\n    \u003e (example returns average over the 7 most recently provided daily data)\n\n  Will return:\n  - `204` if data has not yet been published (or scraped)\n  - `500` if this crappy code messed up\n  - `200` with a json summary of the total cases if successful, e.g.\n      ```json\n      {\n        \"average cases\": 23,\n        \"ending date\": \"Sun, 11 Oct 2020 00:00:00 UTC\",\n        \"starting date\": \"Sun, 04 Oct 2020 00:00:00 UTC\"\n      }\n      ```\n\n- **Complete Raw** [get]\n\n  `/api/v1/raw`\n\n  Will return:\n  - `204` if data has not yet been published (or scraped)\n  - `500` if this crappy code messed up\n  - `200` with a json summary of the total cases as given in the table if successful, e.g.\n      ```json\n      [  {\"Date\":\"2020-10-01T00:00:00Z\",\"Campus\":1,\"City\":2,\"Staff\":0},\n         {\"Date\":\"2020-10-02T00:00:00Z\",\"Campus\":4,\"City\":2,\"Staff\":0},\n         {\"Date\":\"2020-10-03T00:00:00Z\",\"Campus\":3,\"City\":1,\"Staff\":0},\n         {\"Date\":\"2020-10-04T00:00:00Z\",\"Campus\":4,\"City\":4,\"Staff\":0}  ]\n      ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillfantom%2Flu-covid-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillfantom%2Flu-covid-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillfantom%2Flu-covid-api/lists"}