Worldbank Scraper
Pricing
Pay per event
Worldbank Scraper
Scrape World Bank economic data including GDP, population, trade, education, health, and 1,400+ indicators. Filter by country and time period. Export structured data.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Stas Persiianenko
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 hours ago
Last modified
Share
World Bank Data Scraper
Extract economic indicators from the World Bank's open data platform. Get GDP, population, unemployment, trade, education, health, and 1,400+ other indicators for any country and time period.
What does World Bank Data Scraper do?
World Bank Data Scraper fetches structured economic and development data from the World Bank's API. Specify indicator codes and countries, and it returns time-series data with values, country names, and metadata.
It supports all 1,400+ World Bank indicators and all 200+ countries and regions in the database.
Who is World Bank Data Scraper for?
- 📊 Economists analyzing macroeconomic trends across countries
- 🏦 Investment analysts evaluating country-level fundamentals for emerging markets
- 🎓 Academic researchers building datasets for economics, political science, and development studies
- 📰 Data journalists creating visualizations with authoritative economic data
- 🏛️ Policy researchers tracking education, health, and poverty indicators over time
- 🤖 Data scientists building ML models with global economic features
- 🌍 NGO analysts monitoring development progress and aid effectiveness
Why use World Bank data?
The World Bank's open data platform is the premier source for global development statistics. Use cases include:
- 📈 Economic analysis — compare GDP, inflation, trade balances across countries
- 🏪 Market research — assess market size, purchasing power, and growth trends
- 🎓 Academic research — build datasets for economics, political science, and development studies
- 📰 Data journalism — create visualizations and stories with authoritative economic data
- 💰 Investment analysis — evaluate country-level economic fundamentals
- 🏛️ Policy research — track education, health, and poverty indicators over time
Data extraction fields
| Field | Type | Description |
|---|---|---|
country | string | Country name |
countryCode | string | ISO 3166-1 alpha-3 code |
countryIso3 | string | ISO 3166-1 alpha-3 code |
indicator | string | Human-readable indicator name |
indicatorCode | string | World Bank indicator code |
year | string | Data year |
value | number | Indicator value (null values are filtered out) |
unit | string | Unit of measurement |
scrapedAt | string | ISO timestamp when data was extracted |
How much does it cost to scrape World Bank data?
World Bank Data Scraper uses pay-per-event pricing:
| Event | Price |
|---|---|
| Run started | $0.001 |
| Data point extracted | $0.0005 per point |
Example costs:
- GDP for 5 countries over 10 years (50 points): ~$0.026
- 3 indicators for 20 countries over 5 years (300 points): ~$0.151
- Population data for all 200+ countries (200 points): ~$0.101
Platform costs are minimal. The World Bank API is free and requires no authentication.
How to scrape World Bank economic data
- Open World Bank Data Scraper on Apify.
- Enter one or more indicator codes in the
indicatorsfield (e.g.,NY.GDP.MKTP.CDfor GDP). - Set the
countriesfield with ISO country codes or use["all"]for all countries. - Optionally specify a
dateRange(e.g.,2015:2024). - Click Start and wait for the extraction to finish.
- Download data as JSON, CSV, or Excel from the Dataset tab.
Input parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
indicators | string[] | World Bank indicator codes | Required |
countries | string[] | ISO country codes (use all for all countries) | ["all"] |
dateRange | string | Year range in YYYY:YYYY format | All years |
maxResultsPerIndicator | integer | Maximum data points per indicator (1–10000) | 500 |
Common indicator codes
| Code | Indicator |
|---|---|
NY.GDP.MKTP.CD | GDP (current US$) |
SP.POP.TOTL | Population, total |
SL.UEM.TOTL.ZS | Unemployment rate (%) |
FP.CPI.TOTL.ZG | Inflation, consumer prices (%) |
NE.EXP.GNFS.ZS | Exports (% of GDP) |
EN.ATM.CO2E.KT | CO2 emissions (kt) |
SE.ADT.LITR.ZS | Adult literacy rate (%) |
SH.XPD.CHEX.GD.ZS | Health expenditure (% of GDP) |
IT.NET.USER.ZS | Internet users (% of population) |
NY.GDP.PCAP.CD | GDP per capita (current US$) |
Find more codes at data.worldbank.org/indicator.
Input example
{"indicators": ["NY.GDP.MKTP.CD", "SP.POP.TOTL"],"countries": ["US", "CN", "DE", "JP", "IN"],"dateRange": "2015:2024"}
Output example
Each data point is returned as a JSON object:
{"country": "United States","countryCode": "USA","countryIso3": "USA","indicator": "GDP (current US$)","indicatorCode": "NY.GDP.MKTP.CD","year": "2023","value": 27360935000000,"unit": "","scrapedAt": "2026-03-03T04:36:00.000Z"}
Tips and best practices
- 🔍 Find indicator codes — browse data.worldbank.org/indicator to find the right code for your data needs.
- 📅 Use date ranges — specify
dateRangeto avoid pulling decades of historical data when you only need recent years. - ❌ Null values — the scraper automatically skips null/missing data points. Some countries may not have data for all years.
- 🌍 Country groups — World Bank codes include aggregates like
WLD(World),EUU(EU),OED(OECD). Use these for regional comparisons. - 📋 Multiple indicators — combine related indicators in one run (e.g., GDP + population + unemployment) to build comprehensive country profiles.
- 🌐 All countries — omit the
countriesparameter or use["all"]to get data for every country and aggregate. - 📊 Large datasets — increase
maxResultsPerIndicatorup to 10,000 for comprehensive time series.
Integrations
Connect World Bank Data Scraper to hundreds of apps:
- 📊 Google Sheets — export economic data to spreadsheets for analysis and charts
- 🔔 Slack / Microsoft Teams — notifications when data extraction completes
- ⚡ Zapier / Make — trigger workflows with fresh economic data
- ☁️ Amazon S3 / Google Cloud Storage — store large datasets
- 🔗 Webhook — send data to your own analytics pipeline
How to use World Bank Scraper with the API
Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });const run = await client.actor('automation-lab/worldbank-scraper').call({indicators: ['NY.GDP.MKTP.CD'],countries: ['US', 'CN', 'DE', 'JP', 'IN'],dateRange: '2015:2024',});const { items } = await client.dataset(run.defaultDatasetId).listItems();items.forEach(item => {const gdpT = (item.value / 1e12).toFixed(2);console.log(`${item.country} ${item.year}: $${gdpT}T`);});
Python
from apify_client import ApifyClientclient = ApifyClient("YOUR_API_TOKEN")run = client.actor("automation-lab/worldbank-scraper").call(run_input={"indicators": ["NY.GDP.MKTP.CD"],"countries": ["US", "CN", "DE", "JP", "IN"],"dateRange": "2015:2024",})for item in client.dataset(run["defaultDatasetId"]).iterate_items():gdp_t = item["value"] / 1e12 if item["value"] else 0print(f"{item['country']:15s} {item['year']} GDP: ${gdp_t:.2f}T")
cURL
curl "https://api.apify.com/v2/acts/automation-lab~worldbank-scraper/runs" \-X POST \-H "Authorization: Bearer YOUR_API_TOKEN" \-H "Content-Type: application/json" \-d '{"indicators": ["NY.GDP.MKTP.CD", "SP.POP.TOTL"], "countries": ["US", "CN"], "dateRange": "2020:2024"}'
Use with AI agents via MCP
World Bank Data Scraper is available as a tool for AI assistants via the Model Context Protocol (MCP).
Setup for Claude Code
$claude mcp add --transport http apify "https://mcp.apify.com?tools=automation-lab/worldbank-scraper"
Setup for Claude Desktop, Cursor, or VS Code
{"mcpServers": {"apify": {"url": "https://mcp.apify.com?tools=automation-lab/worldbank-scraper"}}}
Example prompts
- "Get GDP growth data for BRICS countries"
- "Search World Bank indicators for education spending"
- "Compare unemployment rates between EU countries since 2015"
Learn more in the Apify MCP documentation.
Is it legal to scrape World Bank data?
The World Bank provides its data under an open data license (Creative Commons Attribution 4.0). All data accessed through this scraper is freely available via the official World Bank API, which is designed for programmatic access.
You are free to use, share, and adapt the data for any purpose, including commercial use, as long as you provide attribution to the World Bank. No authentication is required.
FAQ
Q: How current is the data? A: The World Bank updates most indicators annually. GDP and population data is typically available within 6-12 months of the reporting period.
Q: Does it need an API key? A: No. The World Bank API is completely open and free.
Q: What countries are available? A: All 217 World Bank member countries and economies, plus aggregates (World, income groups, regions).
Q: Can I get monthly or quarterly data? A: Most World Bank indicators are annual. For higher-frequency data, consider other sources like the IMF or FRED.
Q: My indicator returns no data — what's wrong?
A: Double-check the indicator code at data.worldbank.org/indicator. Codes are case-sensitive (e.g., NY.GDP.MKTP.CD not ny.gdp.mktp.cd). Also, not all countries have data for all indicators or years.
Q: The output has fewer data points than expected — why?
A: The scraper automatically filters out null/missing values. Some countries may not report certain indicators for every year. Try widening the date range or using "all" for countries to see what data is available.
Related scrapers
- Yahoo Finance Scraper — extract stock quotes, historical prices, and crypto data
- SEC EDGAR Scraper — scrape SEC filings and company financial data
- Exchange Rate Scraper — get current and historical exchange rates
- Company Funding Tracker — track startup funding rounds and investments