World Bank Scraper · Indicators, Countries, Values & Series
Pricing
from $0.70 / 1,000 record returneds
World Bank Scraper · Indicators, Countries, Values & Series
Scrape World Bank global development indicators, country GDP, population, inflation, economic series, and historical annual values. Fast HTTP API scraper with pay-per-event pricing.
Pricing
from $0.70 / 1,000 record returneds
Rating
0.0
(0)
Developer
Tarek Etman
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Share

World Bank Scraper · Indicators, Countries, Values & Series
Scrape official World Bank global development indicators, country economic metrics, GDP figures, population stats, inflation rates, labor metrics, and multi-year time-series datasets directly from the World Bank Open Data REST API.
Maintained by reapX. Every row cites the Apify run that produced it — nothing is inferred, modelled or filled in, and a field absent from the source is absent from the row. The extracted archive for this source is browsable at reapx.dev/data/world-bank-scraper/ and mirrored as an open dataset on Hugging Face and Kaggle. Questions: reapxdev@proton.me
Features & Capabilities
- Official Source: Direct REST API integration with World Bank Open Data API (
api.worldbank.org/v2). - Comprehensive Coverage: Access over 16,000 indicator series covering 260+ countries, territories, and regional/income aggregates.
- Flexible Filters: Filter by indicator code, 2-character / 3-character ISO country code, regional cohorts (
EAP,ECA,LAC,SSA,EUU,OED), income groups (HIC,UMC,LMC,LIC), or single years / date ranges (2010:2024). - Entity Addressable: Output rows include sanitized
companyName(country or aggregate entity name) ensuring total 1:1 entity page generation and data linkage. - Pay-Per-Event Pricing: Pay purely per complete record returned ($0.001/record with tier discounts). Failed requests or empty queries are never charged.
- High Performance: Lightweight HTTP scraper (no browser overhead) capable of streaming hundreds of indicator records per second.
⬇️ Input
The actor accepts clean structured input to target specific indicators, country cohorts, and time horizons.
| Parameter | Type | Default / Prefill | Description |
|---|---|---|---|
indicator | String | NY.GDP.MKTP.CD | World Bank indicator code (e.g. NY.GDP.MKTP.CD for GDP, SP.POP.TOTL for Population, FP.CPI.TOTL.ZG for Inflation). |
country | String | all | Country ISO code (USA, DEU, CHN), regional aggregate (EAP, EUU, SSA), income level (HIC, LIC), or all. |
date | String | 2015:2024 | Single year (2023) or range (2010:2024) controlling temporal scope. |
source | Integer | 2 | World Bank catalog source ID (2 for World Development Indicators WDI). |
max_results | Integer | 500 | Hard cap on total indicator observation records to return. |
Input Example (JSON)
{"indicator": "NY.GDP.PCAP.CD","country": "all","date": "2015:2024","source": 2,"max_results": 1000}
⬆️ Output
All extracted records are pushed directly to the run's default dataset. Each row corresponds to a single annual observation for a country/entity.
| Field Name | Type | Example | Description |
|---|---|---|---|
companyName | String | United States | Primary addressable entity key (country or aggregate region name). |
countryCode | String | US | 2-letter or aggregate region code. |
countryIso3Code | String | USA | 3-letter ISO 3166-1 alpha-3 code. |
indicatorId | String | NY.GDP.PCAP.CD | World Bank indicator series code. |
indicatorName | String | GDP per capita (current US$) | Human-readable series title. |
year | String | 2023 | Four-digit observation year. |
value | Number | 81632.25 | Recorded numerical value (or null if missing in source). |
unit | String | "" | Unit of measurement if specified by World Bank. |
obsStatus | String | "" | Source observation status tag. |
decimal | Integer | 0 | Decimal precision reported by World Bank. |
Output Row Example (JSON)
{"companyName": "United States","countryCode": "US","countryIso3Code": "USA","indicatorId": "NY.GDP.PCAP.CD","indicatorName": "GDP per capita (current US$)","year": "2023","value": 81632.251953125,"unit": "","obsStatus": "","decimal": 0}
How it works
- API Initialization: The scraper queries
https://api.worldbank.org/v2/country/{country}/indicator/{indicator}using HTTP requests. - Metadata Count: Performs an initial lightweight metadata query to verify total matching records and validate parameters before scraping.
- Paginated Retrieval: Streams items page-by-page (500 items per request) with automatic exponential backoff on network errors or 429/5xx status codes.
- Data Normalization: Cleans and sanitizes country labels into
companyNamevalues matching exact entity page regex specifications. - Pay-Per-Event Emission: Pushes records to the default dataset while executing atomic pay-per-event micro-charging ($0.001 per record).
❓ FAQ
What indicators can I scrape?
You can scrape any valid World Bank indicator code from the World Development Indicators (WDI) catalog or other databases. Popular examples include:
NY.GDP.MKTP.CD: GDP (current US$)NY.GDP.PCAP.CD: GDP per capita (current US$)NY.GDP.MKTP.KD.ZG: GDP growth (annual %)SP.POP.TOTL: Total PopulationFP.CPI.TOTL.ZG: Inflation rate (annual %)SL.UEM.TOTL.ZS: Unemployment rate (% of labor force)EN.ATM.CO2E.PC: CO2 emissions (metric tons per capita)SP.DYN.LE00.IN: Life expectancy at birth (years)
How is pricing calculated?
This actor operates on Pay-Per-Event pricing. You are charged $0.001 per complete record pushed to the dataset. Platform compute usage is absorbed. Failed requests, rate limits, or queries matching 0 rows incur zero charge.
How do I filter by specific country or region?
Set the country parameter to a 3-letter ISO code (e.g. USA, DEU, JPN, BRA) or a regional cohort code (e.g. EAP for East Asia & Pacific, EUU for European Union, HIC for High Income countries). Leave as all to pull all available nations and aggregates.
Can I run this scraper programmatically?
Yes! Use the Apify Python SDK, JavaScript SDK, or standard HTTP client to invoke this actor via the Apify API.
from apify_client import ApifyClientclient = ApifyClient("YOUR_APIFY_TOKEN")run = client.actor("reapx/world-bank-scraper").call(run_input={"indicator": "NY.GDP.MKTP.CD","country": "all","date": "2020:2024","max_results": 500})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["companyName"], item["year"], item["value"])
💬 Your feedback
Have feature suggestions, bug reports, or requests for custom dataset extractions? Contact the maintainers directly at reapxdev@proton.me or visit reapx.dev.
Disclaimer: Unofficial - not affiliated with World Bank. Collects public data only. reapx. Contact reapxdev@proton.me.
🧪 Example input
A real, runnable configuration — this is an actual input this Actor has run with.
{"indicator": "NY.GDP.MKTP.CD","country": "all","date": "2020:2024","source": 2,"max_results": 500}
📄 Sample output
One real row from a real run of this Actor, unedited.
{"companyName": "Africa Eastern and Southern","countryCode": "ZH","countryIso3Code": "AFE","indicatorId": "NY.GDP.MKTP.CD","indicatorName": "GDP (current US$)","year": "2022","value": 1226461319482.05,"unit": "","obsStatus": "","decimal": 0}
⚠️ Run outcomes and error handling
This Actor reports what happened in the run's status message, and it always keeps whatever it collected. These are the outcomes you can get and what each one means.
| Outcome | What it means |
|---|---|
| Success | Rows were returned and you were charged record-returned at $0.001 per row. |
| No matches | The source returned nothing for your filters. Nothing is charged. Widen the date window or drop a filter. |
| Partial - source refused | The source rate-limited or refused some requests. The affected items are skipped and named in the log, and everything already collected is still pushed. A block never discards a run's work. |
| Rejected filter | The source itself rejected the filter combination. The run fails fast with the source's own reason and nothing is charged. |
What is guaranteed either way
- Every row is pushed as it is built, not buffered to the end of the run. Anything that buffers output loses everything to a timeout, a block or a migration; this does not.
- A field absent from the source is absent from the row. Nothing is inferred, modelled or filled in to make a row look complete.