# WHO Health Data Scraper (`wakey7dev/who-health-data-scraper`) Actor

Search and extract global health indicators from the WHO Global Health Observatory. 3000+ indicators on mortality, diseases, immunization, nutrition, and more — with country comparison and human-readable enrichment.

- **URL**: https://apify.com/wakey7dev/who-health-data-scraper.md
- **Developed by:** [Chris Wakefield](https://apify.com/wakey7dev) (community)
- **Categories:** Business, AI
- **Stats:** 2 total users, 0 monthly users, 82.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 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.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

![Chris The Dev](https://raw.githubusercontent.com/chriswakefield87/appstore-screenshot-translator/main/assets/actor-banner.png)

## WHO Health Data Scraper 🏥

Search and extract global health indicators from the **WHO Global Health Observatory (GHO)** — the world's most comprehensive health statistics database. With **3,000+ indicators** spanning mortality, diseases, immunization, nutrition, environmental health, and more across 194 countries.

**No API key required** — the WHO GHO OData API is completely free and open.

### Features

- 🔍 **Keyword search** — find indicators by name (e.g. "life expectancy", "cancer", "diabetes")
- 🌍 **Multi-country comparison** — compare health stats across any ISO3-coded countries
- 📊 **Multi-year time series** — fetch data for specific years or ranges
- 🏷️ **Sex/age filtering** — filter by sex dimension (both/male/female)
- ✨ **Data enrichment** — country codes → full names, indicator codes → readable titles, dimension codes → labels
- ✅ **Confidence intervals** — includes low/high bounds where available
- 📋 **Formatted output** — human-readable table in run log + structured JSON dataset + machine-readable stats

### Input Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `searchQuery` | string | ✅ | — | Keyword to search for health indicators |
| `countries` | string | ❌ | `GBR` | Comma-separated ISO3 codes (e.g. `GBR,USA,DEU`) |
| `years` | string | ❌ | `2020` | Comma-separated years or ranges (e.g. `2015-2022`) |
| `sexFilter` | select | ❌ | all | Filter: `SEX_BTSX`, `SEX_MLE`, `SEX_FMLE` |
| `maxIndicators` | integer | ❌ | `10` | Max matching indicators (1-50) |
| `maxResultsPer` | integer | ❌ | `100` | Max data points per indicator/country |

### Example Input

```json
{
  "searchQuery": "life expectancy",
  "countries": "GBR,USA,JPN,NGA,BRA",
  "years": "2020",
  "sexFilter": "SEX_BTSX",
  "maxIndicators": 3
}
```

### Example Output

```
=========================================================================================
  WHO GLOBAL HEALTH OBSERVATORY DATA
=========================================================================================
  Search:        life expectancy
  Indicators:    3 matched
  Countries:     GBR, USA, JPN, NGA, BRA (5)
  Results:       15 data points

  #  Country          Indicator                          Year Value                        Dimension
 ───  ──────────────── ─────────────────────────────────── ──── ──────────────────────────── ──────────────
   0  United Kingdom   Life expectancy at birth (years)    2020 80.1 [80.1-80.2]            Both sexes
   1  United States    Life expectancy at birth (years)    2020 77.0 [76.9-77.1]            Both sexes
   2  Japan            Life expectancy at birth (years)    2020 84.7 [84.6-84.8]            Both sexes
   3  Nigeria          Life expectancy at birth (years)    2020 55.0 [54.5-55.5]            Both sexes
   4  Brazil           Life expectancy at birth (years)    2020 75.3 [75.1-75.5]            Both sexes
```

### Use Cases

- **Public health research** — compare disease prevalence, mortality rates, risk factors across countries
- **Policy analysis** — track health system indicators over time
- **Journalism & data viz** — build dashboards and infographics with WHO-verified data
- **NGO reporting** — cite authoritative health statistics in grant applications
- **Academic research** — extract datasets for meta-analyses and systematic reviews
- **Business intelligence** — assess health market opportunities by country

### Data Source

All data comes from the [WHO Global Health Observatory](https://www.who.int/data/gho) via their public OData API (`ghoapi.azureedge.net`). Data is updated regularly by WHO. This actor enriches raw API responses with human-readable labels but does not alter the underlying data.

### Pricing

Pay-per-result pricing — you only pay for the data you extract. See the Apify Store listing for current rates.

# Actor input Schema

## `searchQuery` (type: `string`):

Keyword to search for health indicators (e.g. 'life expectancy', 'cancer', 'diabetes', 'vaccination', 'mortality').

## `countries` (type: `string`):

Comma-separated ISO3 country codes (e.g. 'GBR,USA,DEU,FRA,JPN'). Default: GBR.

## `years` (type: `string`):

Comma-separated years or ranges (e.g. '2020' or '2015-2022,2023'). Default: 2020.

## `sexFilter` (type: `string`):

Filter by sex dimension. Leave empty for all. Options: SEX\_BTSX (both sexes), SEX\_MLE (male), SEX\_FMLE (female).

## `maxIndicators` (type: `integer`):

Maximum number of matching indicators to fetch (1-50). Default: 10.

## `maxResultsPer` (type: `integer`):

Maximum data points per indicator-country combination. Default: 100.

## Actor input object example

```json
{
  "searchQuery": "life expectancy",
  "countries": "GBR,USA,DEU,FRA,JPN,CHN,IND,BRA,NGA,RUS",
  "years": "2020",
  "maxIndicators": 10,
  "maxResultsPer": 100
}
```

# Actor output Schema

## `results` (type: `string`):

All data points as JSON with country, indicator, year, value, and confidence intervals.

## `summary` (type: `string`):

Human-readable formatted ASCII table of results.

## `stats` (type: `string`):

Query summary: indicators matched, countries, years, result count.

# 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 = {
    "searchQuery": "life expectancy",
    "countries": "GBR,USA,DEU,FRA,JPN,CHN,IND,BRA,NGA,RUS",
    "years": "2020"
};

// Run the Actor and wait for it to finish
const run = await client.actor("wakey7dev/who-health-data-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 = {
    "searchQuery": "life expectancy",
    "countries": "GBR,USA,DEU,FRA,JPN,CHN,IND,BRA,NGA,RUS",
    "years": "2020",
}

# Run the Actor and wait for it to finish
run = client.actor("wakey7dev/who-health-data-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "searchQuery": "life expectancy",
  "countries": "GBR,USA,DEU,FRA,JPN,CHN,IND,BRA,NGA,RUS",
  "years": "2020"
}' |
apify call wakey7dev/who-health-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=wakey7dev/who-health-data-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/u3jpU2JLlZmtXjRvb/builds/K1xwdQF6yqTwENquB/openapi.json
