World Bank Indicators Scraper — GDP, Population & More
Pricing
Pay per event
World Bank Indicators Scraper — GDP, Population & More
Fetch World Bank Open Data indicators (GDP, population, CO2, poverty and 20,000+ others) across any countries and years, flattened into one clean row per country, indicator and year.
Pricing
Pay per event
Rating
0.0
(0)
Developer
DevilScrapes
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
8 hours ago
Last modified
Categories
Share
🎯 What this scrapes
The World Bank's Open Data API is free and keyless, but its wire format is built for the World Bank's own tooling, not for a spreadsheet. A successful response is a two-element array — pagination metadata bolted onto a row list, not a normal JSON object — and an invalid indicator code answers with HTTP 200 and a silent error block instead of a 404. This Actor fetches any mix of indicator codes across any countries and any date range, and hands back one flat row per country/indicator/year — ready for a pivot table, not a parser rewrite.
🔥 What we handle for you
- We parse the API's two-shape response envelope so a paging bug or a bad indicator code never corrupts your dataset.
- We skip an invalid indicator code or an empty country series with a clear warning — one bad code never kills the rest of your run.
- We retry
429/5xxresponses with exponential backoff and honourRetry-After. - We keep every null observation — most (country, year) pairs genuinely have no reported value, and we ship that as a real
null, not a dropped row.
💡 Use cases
- Build a "GDP + population + CO2 for 200 countries × 25 years" master table for a macro research note.
- Pull a development-finance dashboard's underlying indicators without hand-copying from the World Bank's website.
- Feed an ESG or country-risk model with the World Bank's own reported figures, refreshed on a schedule.
- Fact-check a journalism piece against the official series instead of a secondary aggregator.
⚙️ How to use it
- Click Try for free at the top of the page.
- List the indicator codes you need (e.g.
NY.GDP.MKTP.CDfor GDP) — codes are ondata.worldbank.org/indicator. - Set country codes (
allor a;-separated ISO list) and an optional date range. - Click Start. Output streams into the run's dataset as it's fetched.
- Export from Storage → Dataset as JSON, CSV, or Excel — or fetch via the API.
📥 Input
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
indicatorCodes | array | no | ["NY.GDP.MKTP.CD"] | World Bank indicator codes to fetch, one paginated series per code. |
countryCodes | string | no | "all" | all or a ;-separated ISO list, e.g. US;CN;DE. |
dateRange | string | no | (none) | Optional YYYY or YYYY:YYYY range, e.g. 2000:2024. |
includeSourceNote | boolean | no | false | Attach each indicator's methodology note and source organization to every row. |
maxResults | integer | no | 5000 | Stop after this many rows. Each row is one billed result event. |
proxyConfiguration | object | no | {"useApifyProxy": false} | World Bank's API is public and keyless; proxy is opt-in. |
Example input
{"indicatorCodes": ["NY.GDP.MKTP.CD", "SP.POP.TOTL"],"countryCodes": "US;CN;DE","dateRange": "2015:2024","includeSourceNote": false,"maxResults": 200,"proxyConfiguration": {"useApifyProxy": false}}
📤 Output
Every row is one dataset item — one (country, indicator, year) observation.
| Field | Type | Notes |
|---|---|---|
country_id | string | Country ISO3 code, falling back to the API's alpha-2 id. |
country_iso3 | string | ISO alpha-3 country code. |
country_name | string | Country display name. |
region | string | World Bank region — not enriched in v1, always null today. |
income_level | string | World Bank income level — not enriched in v1, always null today. |
indicator_id | string | World Bank indicator code. |
indicator_name | string | Indicator display name. |
year | integer | Observation year. |
value | number | Observed value — null for most rows; that's the API's own data, not a bug. |
unit | string | Unit of measure, when the API provides one. |
obs_status | string | Observation status flag, when present. |
decimal | integer | Decimal precision of value. |
scale | string | Value scale, when the API provides one. |
source_note | string | Indicator methodology note (only when includeSourceNote is on). |
source_organization | string | Source organization (only when includeSourceNote is on). |
Example output
{"country_id": "USA","country_iso3": "USA","country_name": "United States","region": null,"income_level": null,"indicator_id": "NY.GDP.MKTP.CD","indicator_name": "GDP (current US$)","year": 2022,"value": 25462700000000.0,"unit": "","obs_status": "","decimal": 0,"scale": null,"source_note": null,"source_organization": null}
💰 Pricing
Pay-Per-Event — you pay only when these events fire:
| Event | USD | What it is |
|---|---|---|
actor-start | $0.05 | One-off warm-up charge per run |
result | $0.002 | Per dataset item |
Example: 1 000 results at the rates above ≈ $2.05. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.
🚧 Limitations
regionandincome_levelare not enriched from the country-metadata endpoint in this version — both ship asnull. A future version will cross-reference/v2/countryto fill them in.- This is a current snapshot, not a historical-revision tracker — the World Bank periodically restates past years, and we fetch whatever the API reports at run time.
- We pass through the API's raw
valueandunitas-is — no currency conversion or unit normalization.
❓ FAQ
Do I need an API key?
No. The World Bank's Open Data API is free and keyless. We still send a polite, identifiable User-Agent so runs stay good API citizens.
Why is value null for so many rows?
Most countries don't report every indicator for every year — that's a real gap in the underlying data, not something we dropped. We ship the null so your analysis sees the true coverage.
What happens if I typo an indicator code?
The API answers a typo'd code with HTTP 200 and a hidden error block — we detect that, skip the code with a warning, and keep fetching every other code you asked for.
💬 Your feedback
Spotted a bug, hit a weird edge case, or need a new field? Open an issue on the Actor's Issues tab on Apify Console — we ship fixes weekly and we read every report.