PHPackages                             ovidigital/covid-19-data-scraper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ovidigital/covid-19-data-scraper

AbandonedArchivedLibrary

ovidigital/covid-19-data-scraper
================================

PHP library to extract COVID-19 statistical data from multiple sources on the Internet

1.2.0(6y ago)03MITPHPPHP ^7.2

Since Apr 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ovidigital/covid-19-data-scraper)[ Packagist](https://packagist.org/packages/ovidigital/covid-19-data-scraper)[ Docs](https://github.com/ovidigital/covid-19-data-scraper)[ RSS](/packages/ovidigital-covid-19-data-scraper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (5)Used By (0)

ovidigital/covid-19-data-scraper
================================

[](#ovidigitalcovid-19-data-scraper)

###### PHP library to extract COVID-19 statistical data from multiple sources

[](#php-library-to-extract-covid-19-statistical-data-from-multiple-sources)

[![Latest Version](https://camo.githubusercontent.com/674aa917906a2842254653e02f2299eb1e173730f1341caeeb9cda97c47908aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f76696469676974616c2f636f7669642d31392d646174612d736372617065722e7376673f7374796c653d666c61742d7371756172652663616368655365636f6e64733d33363030266c6162656c3d6c617465737425323076657273696f6e)](https://github.com/ovidigital/covid-19-data-scraper/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/74a669ac3323f042ddc77b29263631599d5ebcb3cd02798935a11d3205b2c190/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6f76696469676974616c2f636f7669642d31392d646174612d736372617065722f6d61737465722e7376673f7374796c653d666c61742d737175617265266c6f676f3d747261766973266c6f676f436f6c6f723d7768697465)](https://travis-ci.com/ovidigital/covid-19-data-scraper)[![Code Coverage](https://camo.githubusercontent.com/6fb2bb5dc62dac0bebcc2f720cd19b17868d78cf4af5a65572a38adba5ff130d/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6f76696469676974616c2f636f7669642d31392d646174612d736372617065722f6d61737465723f6c6162656c3d74657374253230636f766572616765267374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/6fb2bb5dc62dac0bebcc2f720cd19b17868d78cf4af5a65572a38adba5ff130d/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6f76696469676974616c2f636f7669642d31392d646174612d736372617065722f6d61737465723f6c6162656c3d74657374253230636f766572616765267374796c653d666c61742d737175617265)

This library aims to be a quick way to extract statistical data for [COVID-19](https://en.wikipedia.org/wiki/Coronavirus_disease_2019) (Coronavirus disease 2019) from multiple sources on the Internet and provide this data in multiple formats (PHP Array, JSON, CSV etc.)

Disclaimer
----------

[](#disclaimer)

This software is provided for educational and demonstration purposes only.

By using this software, you might access resources for which you need prior permission from their respective owners (e.g. [Worldometers Coronavirus](https://www.worldometers.info/coronavirus/)).

It is the sole responsibility of the user of this software to ensure proper permission is granted before using this software to access such resources.

License
-------

[](#license)

This project is licensed under the terms of the MIT license.

Check the [LICENSE.md](LICENSE.md) file for license rights and limitations.

Installation
------------

[](#installation)

```
composer require ovidigital/covid-19-data-scraper
```

Usage
-----

[](#usage)

```
use OviDigital\Covid19DataScraper\StatisticsService;

$statisticsService = new StatisticsService();

// Scrape Worldometers aggregated statistics for all countries
$dataObject = $statisticsService->getWorldometersAggregated();

// Scrape Worldometers aggregated statistics for specific countries using alpha-2 country codes
$dataObject = $statisticsService->getWorldometersAggregated(['US', 'RO']);

// Scrape Worldometers country statistics for specific country (e.g. Romania)
$dataObject = $statisticsService->getWorldometersCountry('RO');

// Get data as PHP array
$dataAsArray = $dataObject->toArray();

// Get data in JSON format
$dataAsJson = $dataObject->toJson();
```

Returned Data
-------------

[](#returned-data)

Depending on the source used to scrape the statistics, the data and schema might slightly differ.
The examples below display partial, dummy data.

#### Example Worldometers Aggregated Data

[](#example-worldometers-aggregated-data)

```
{
    "meta": {
        "timestamp": 1587914124
    },
    "countries": {
        "US": {
            "meta": {
                "country_code": "US",
                "country_name": "United States of America",
                "country_slug": "us"
            },
            "data": {
                "total_cases": 123456,
                "new_cases_today": 1337,
                "total_deaths": 45678,
                "new_deaths_today": 101,
                "total_recovered": 80000,
                "total_active_cases": 765432,
                "total_serious_critical": 13337,
                "total_tests": 4194304,
                "cases_per_million": 2121,
                "deaths_per_million": 196,
                "tests_per_million": 16384
            }
        },
        "RO": {
            "meta": {
                "country_code": "RO",
                "country_name": "Romania",
                "country_slug": "romania"
            },
            "data": {
                "total_cases": 10123,
                "new_cases_today": 321,
                "total_deaths": 500,
                "new_deaths_today": -5,
                "total_recovered": 2350,
                "total_active_cases": 7123,
                "total_serious_critical": 210,
                "total_tests": 112112,
                "cases_per_million": 543,
                "deaths_per_million": 25.15,
                "tests_per_million": 12345
            }
        }
    }
}
```

#### Example Worldometers Country Data

[](#example-worldometers-country-data)

```
{
    "meta": {
        "timestamp": 1587901089,
        "country_code": "RO",
        "country_name": "Romania"
    },
    "data": {
        "totals": {
            "cases": 1500,
            "deaths": 60,
            "recovered": 120
        },
        "daily": {
            "new_cases": {
                "2020-02-15": "null",
                "2020-02-16": "null",
                "2020-02-17": 100,
                "2020-02-18": 200,
                "2020-02-19": 300,
                "2020-02-20": 400,
                "2020-02-21": 500
            },
            "new_deaths": {
                "2020-02-15": 0,
                "2020-02-16": 0,
                "2020-02-17": 0,
                "2020-02-18": 0,
                "2020-02-19": 10,
                "2020-02-20": 20,
                "2020-02-21": 30
            },
            "new_recovered": {
                "2020-02-15": 0,
                "2020-02-16": 0,
                "2020-02-17": 0,
                "2020-02-18": 0,
                "2020-02-19": 20,
                "2020-02-20": 40,
                "2020-02-21": 60
            },
            "total_active_cases": {
                "2020-02-15": "null",
                "2020-02-16": "null",
                "2020-02-17": 100,
                "2020-02-18": 300,
                "2020-02-19": 570,
                "2020-02-20": 910,
                "2020-02-21": 1320
            },
            "total_deaths": {
                "2020-02-15": 0,
                "2020-02-16": 0,
                "2020-02-17": 0,
                "2020-02-18": 0,
                "2020-02-19": 10,
                "2020-02-20": 30,
                "2020-02-21": 60
            }
        }
    }
}
```

Contributing
------------

[](#contributing)

Feel free to submit a pull request or create an issue.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

4

Last Release

2207d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4647dae45ca706bbf9ee62b17dbd3121069bfc61d668b91c5c8e8bc01cb0477d?d=identicon)[ovidyou](/maintainers/ovidyou)

---

Top Contributors

[![ovidyou](https://avatars.githubusercontent.com/u/1453063?v=4)](https://github.com/ovidyou "ovidyou (22 commits)")

---

Tags

coronacoronaviruscovidcovid-19data-extractiondata-scrapingscrapervirusdataextractstatsstatisticsscraperviruscovid-19coronacovid

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ovidigital-covid-19-data-scraper/health.svg)

```
[![Health](https://phpackages.com/badges/ovidigital-covid-19-data-scraper/health.svg)](https://phpackages.com/packages/ovidigital-covid-19-data-scraper)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[wnx/laravel-stats

Get insights about your Laravel Project

1.8k1.8M7](/packages/wnx-laravel-stats)[vdb/php-spider

A configurable and extensible PHP web spider

1.4k181.0k7](/packages/vdb-php-spider)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49516.9k](/packages/blackfire-player)[crwlr/crawler

Web crawling and scraping library.

37214.8k2](/packages/crwlr-crawler)[helgesverre/extractor

AI-Powered Data Extraction for your Laravel application.

22128.0k](/packages/helgesverre-extractor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
