# World Population Review Countries Scraper (`rl1987/worldpopulationreview-scraper`) Actor

Scrapy-based Actor that scrapes the countries population table from worldpopulationreview.com.

- **URL**: https://apify.com/rl1987/worldpopulationreview-scraper.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / dataset export

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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

## World Population Review Countries Scraper

### What does World Population Review Countries Scraper do?

This Actor scrapes **every country's population data** from [worldpopulationreview.com](https://worldpopulationreview.com/countries) — the 2026 population figure, land area, density, growth rate, and per-country demographic detail (capital, continent, region, largest cities, births/deaths/migration per day, and the historical year-by-year population table). It combines the site's country ranking table with each country's individual detail page to produce one of the most complete country-population datasets available on Apify, running on the Apify platform with proxy rotation, scheduling, and API access built in.

### Why use World Population Review Countries Scraper?

- **Market & demographic research** — compare population size, density, and growth trends across all 235 tracked countries and territories in one dataset.
- **Business expansion analysis** — identify high-growth or high-density markets worth targeting.
- **Academic & policy research** — pull historical population series and vital-statistics estimates (births/deaths/migration per day) without manually visiting 235 pages.
- **Dashboards & BI** — feed a single clean JSON/CSV dataset into your reporting pipeline on a schedule, instead of re-scraping by hand.

### How to use World Population Review Countries Scraper

1. Click **Try for free** (or **Start**) on the Actor page.
2. Optionally configure a **Proxy Configuration** in the Input tab (Apify Proxy is off by default; the target site has no blocking, so this is rarely needed).
3. Click **Start** and wait for the run to finish — a full run scrapes all ~235 countries in under a minute.
4. Open the **Output** or **Storage → Dataset** tab to view, filter, or export the results.

### Input

The Actor needs almost no configuration — it always targets `worldpopulationreview.com/countries` and follows every country link from there.

| Field | Type | Description |
|---|---|---|
| `proxyConfiguration` | Object | Optional proxy settings for the crawl (Apify Proxy or custom proxies). Defaults to no proxy. |

### Output

Each dataset item represents one country. Example:

```json
{
  "rank": 1,
  "country": "India",
  "country_url": "https://worldpopulationreview.com/countries/india",
  "population": 1476625576,
  "area_km2": "3.3M",
  "density_km2": "497",
  "annual_change_pct": "0.87%",
  "pct_world_pop": "18.45%",
  "flag_image": "https://worldpopulationreview.com/images/country-flags/h120/in.png",
  "capital": "Delhi",
  "continent": "Asia",
  "regions": ["Southern Asia", "South Central Asia"],
  "largest_cities": ["Delhi", "Mumbai", "Bengaluru"],
  "abbreviation": "IND",
  "births_per_day": 62939,
  "deaths_per_day": 27073,
  "net_migration_per_day": -1206,
  "net_change_per_day": 34660,
  "population_by_year": [
    { "year": 2026, "population": 1476625576, "change_pct": "0.87%", "rank": 1 },
    { "year": 2025, "population": 1463865525, "change_pct": "0.86%", "rank": 1 }
  ]
}
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

#### Data table

| Field | Description |
|---|---|
| `rank` | Population rank among all countries. |
| `country` | Country name. |
| `country_url` | Link to the country's detail page. |
| `flag_image` | URL of the country's flag image. |
| `population` | Current (2026) total population. |
| `area_km2` | Total area in km² (abbreviated, e.g. `"3.3M"`). |
| `density_km2` | Population density per km². |
| `annual_change_pct` | Year-over-year population change, as a percentage. |
| `pct_world_pop` | Share of world population. |
| `capital` | Capital city. |
| `continent` | Continent. |
| `regions` | Sub-region(s) the country belongs to. |
| `largest_cities` | Up to 3 largest cities. |
| `abbreviation` | ISO-style country abbreviation. |
| `births_per_day` / `deaths_per_day` / `net_migration_per_day` / `net_change_per_day` | Estimated daily vital statistics (negative migration = net emigration). Not published for very small territories, so these may be `null`. |
| `population_by_year` | Historical year-by-year population, change %, and rank. |

### Pricing / Cost estimation

This Actor uses **pay-per-event pricing**: a flat **$1.00 per successful run**, charged once after the full dataset (all ~235 countries) has been scraped and pushed. There's no per-country or per-item charge. A run typically completes in about a minute on the default 512 MB memory setting.

### Tips or Advanced options

- The Actor always does a full crawl of all tracked countries — there's no partial/filtered mode, since the source dataset is small enough to fully refresh on every run.
- `population_by_year` includes historical data as currently shown on the site; the site occasionally revises past estimates, so re-running periodically keeps your dataset in sync with the latest UN World Population Prospects revision.
- Schedule the Actor (Apify Console → Schedules) to keep a dataset of current population stats automatically refreshed, e.g. monthly.

### FAQ, disclaimers, and support

This Actor scrapes publicly available data from worldpopulationreview.com, which itself sources figures from the UN World Population Prospects and national statistics offices. It is intended for research, analytics, and informational use — always review the target site's Terms of Service for your specific use case.

Found a bug or missing field? Open an issue in the Actor's **Issues** tab. Need a custom variant (e.g. states, cities, or ZIP codes from the same site)? Reach out — a tailored solution is available on request.

### Did you find this useful?

⭐ Rate this actor on Apify! Your feedback helps other users find it and helps us keep improving it.

# Actor input Schema

## `proxyConfiguration` (type: `object`):

Proxy settings for the crawl.

## Actor input object example

```json
{
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Dataset rows, one per country.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/worldpopulationreview-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("rl1987/worldpopulationreview-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 '{}' |
apify call rl1987/worldpopulationreview-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rl1987/worldpopulationreview-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/QssS7R7VheJAi2bde/builds/GfZDyONxlVppuBUba/openapi.json
