# disease.sh Global Health Stats Scraper (`parseforge/disease-sh-health-stats-scraper`) Actor

Scrapes disease.sh for COVID-19 and vaccine statistics by country, US state, continent, or global totals. Returns each region as a flat row with cases, deaths, recoveries, tests, and vaccine coverage.

- **URL**: https://apify.com/parseforge/disease-sh-health-stats-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Education, Developer tools, Automation
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $30.23 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner-v4.webp)](https://apify.com/parseforge?fpr=vmoqkp)

### disease.sh Global Health Stats Scraper

**Scrape global health statistics from disease.sh for any country, US state, continent, or worldwide totals.** Each record includes cases, deaths, recoveries, tests, and vaccine coverage data. Export to CSV, JSON, Excel, or XML.

disease.sh provides open, real-time health data but querying it manually for multiple regions or time comparisons is slow. This Actor reads the public API endpoints directly, letting you pull structured COVID-19 and vaccine statistics by country, US state, continent, or global aggregate. You get a clean, flat dataset without writing a single request.

| Who uses it | What they scrape disease.sh for |
|---|---|
| Health researchers | Compare COVID-19 case trajectories across countries for academic papers. |
| Data journalists | Pull the latest state-level US data for a daily outbreak dashboard. |
| Public health analysts | Monitor vaccine coverage rates by country to identify gaps. |
| App developers | Feed a health-tracking app with fresh global totals every hour. |

### What it does

This Actor collects global health statistics from disease.sh and returns each region's cases, deaths, recoveries, tests, and vaccine coverage as a flat row.

- 🌍 **By country:** all countries with cases, deaths, recoveries, tests, and population.
- 🇺🇸 **By US state:** state-level breakdowns for domestic tracking.
- 🗺️ **By continent:** aggregated figures for each continent.
- 📊 **Global totals:** worldwide confirmed cases, deaths, and recoveries in one row.
- 💉 **Vaccine coverage:** country-level vaccination doses, people vaccinated, and population share.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with disease.sh data

**📈 Track outbreak trends.**

A health researcher pulls daily country-level cases sorted by active infections to spot emerging hotspots for a weekly report.

**🗞️ Power a newsroom dashboard.**

A data journalist scrapes US state data every morning to update a public-facing map of COVID-19 deaths and test positivity.

**💉 Audit vaccine rollouts.**

A public health analyst collects vaccine coverage by country to compare doses administered against population and flag slow campaigns.

**🌐 Feed a global health app.**

An app developer schedules a daily run for worldwide totals and caches the result to serve a home-screen counter of confirmed cases.

### Why choose this scraper

|  | What you get |
|---|---|
| **No API key required** | Reads the open disease.sh endpoints directly with no registration. |
| **Fixed flat schema** | Every record follows the same structure so you can merge runs without cleaning. |
| **Sort and limit** | Order by cases, deaths, or country name and set a hard cap on rows per run. |
| **Multiple scopes** | One Actor covers countries, US states, continents, global totals, and vaccines. |

### How it compares

No other Store actor targets disease.sh the same way, so the honest comparison is with the alternatives teams actually weigh.

| | disease.sh Global Health Stats Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When disease.sh changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Drive the Actor by selecting a scope (countries, states, continents, global totals, or vaccine coverage), then optionally sort the results by cases, deaths, today's figures, active cases, tests, recovered, or country name, and cap the records returned. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "scope": "countries",
  "maxItems": 10
}
```

A larger pull:

```json
{
  "scope": "countries",
  "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.0403 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $4.03 |
| 1,000 results | $40.30 |
| 10,000 results | $403.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [disease.sh Global Health Stats Scraper](https://apify.com/parseforge/disease-sh-health-stats-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to disease.sh through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/disease-sh-health-stats-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check that you have set a maxItems value greater than zero. Also confirm that the disease.sh API is reachable from your network; a temporary outage on their side can return an empty response.

**The sort order is not what I expected.**

The sort field applies only to the 'By country' and 'By US state' scopes. For other scopes, the order is fixed by the API. Make sure you selected a scope that supports sorting.

**My run failed with a timeout.**

The disease.sh API usually responds quickly, but network issues can cause timeouts. Increase the Actor's timeout in the run settings or retry the run after a few minutes.

**Vaccine data shows zero for some countries.**

Not all countries report vaccine data to the upstream sources. A zero value means either no doses have been administered or the data is unavailable for that country.

### FAQ

| Question | Answer |
|---|---|
| What data source does this Actor use? | It reads the public disease.sh API, which aggregates data from Worldometer, Johns Hopkins University, and other official health sources. No API key or registration is needed. |
| Can I get historical data or only current snapshots? | The disease.sh endpoints return the latest available figures. This Actor captures the current snapshot on each run. For time series, you would need to run it on a schedule and store the results yourself. |
| How do I get data for a single country instead of all countries? | Set the scope to 'By country' and use the sort and maxItems fields to narrow the output. The Actor does not filter by a single country name directly, but you can sort alphabetically and limit records to isolate a specific nation. |
| Does this Actor include vaccine data? | Yes. Select the 'Vaccine coverage by country' scope to get doses administered, people fully vaccinated, and the percentage of the population covered for each country. |
| What format does the output come in? | The dataset is stored in the Apify key-value store and you can export it to CSV, JSON, Excel, or XML from the run console. |
| Is there a rate limit on the disease.sh API? | The disease.sh API is open and does not enforce strict rate limits for reasonable use. This Actor makes a single request per run, so you are unlikely to hit any throttling. |
| Can I scrape US state-level data? | Yes. Choose the 'By US state' scope to get COVID-19 statistics for each US state, including cases, deaths, and tests. |
| How often is the data updated on disease.sh? | disease.sh refreshes its data roughly every 10 minutes from its upstream sources. Each run of this Actor pulls the latest available snapshot at that moment. |
| Can I get continent-level aggregates? | Yes. The 'By continent' scope returns cases, deaths, recoveries, and other metrics aggregated for each continent. |
| What does the 'Global totals' scope return? | It returns a single row with the worldwide sum of confirmed cases, deaths, recoveries, active cases, and tests. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by disease.sh. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `scope` (type: `string`):

Which slice of disease.sh data to scrape

## `sort` (type: `string`):

Sort countries / states by this field

## `maxItems` (type: `integer`):

How many records to collect per run.

## Actor input object example

```json
{
  "scope": "countries",
  "sort": "cases",
  "maxItems": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

Overview of scraped data

## `fullData` (type: `string`):

Complete dataset

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "scope": "countries",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/disease-sh-health-stats-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "scope": "countries",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/disease-sh-health-stats-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "scope": "countries",
  "maxItems": 10
}' |
apify call parseforge/disease-sh-health-stats-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/disease-sh-health-stats-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/sZFo1sHDNBzak6zgh/builds/6pkGLDnP9N8Q87Qyi/openapi.json
