World Bank Data Scraper - Economic & Dev Indicators avatar

World Bank Data Scraper - Economic & Dev Indicators

Pricing

from $1.50 / 1,000 results

Go to Apify Store
World Bank Data Scraper - Economic & Dev Indicators

World Bank Data Scraper - Economic & Dev Indicators

Scrape World Bank Open Data by country, indicator code, or full directory. Extract GDP, population, inflation, unemployment, and 16,000+ indicators. No API key, no login.

Pricing

from $1.50 / 1,000 results

Rating

0.0

(0)

Developer

Logiover

Logiover

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

2

Monthly active users

4 days ago

Last modified

Categories

Share

World Bank Data Scraper — Economic & Development Indicators, Time-Series & Country Metadata

Scrape the World Bank Open Data API — the world's most comprehensive source of free global economic and development statistics — without any API key, login, or rate-limit hurdles. Extract GDP, population, inflation, unemployment, poverty rates, and 16,000+ more indicators across 200+ countries, fully paginated, ready to export as CSV, JSON, or Excel.

What does World Bank Data Scraper do?

This actor connects directly to the official World Bank Open Data REST API (https://api.worldbank.org/v2), which is keyless and freely accessible to everyone. It operates in three modes:

  • indicatorData (main mode): Fetches time-series data for one indicator across multiple countries over a custom year range. You supply a semicolon-separated list of ISO2 country codes (or all for all countries), a World Bank indicator code like NY.GDP.MKTP.CD, and a start/end year. The actor paginates in 1,000-row batches using the ?page=N parameter until all data is collected.
  • indicators: Lists all 16,000+ available indicator codes with their names, descriptions, source notes, and topic tags. Ideal for discovering what metrics are available before building a pipeline.
  • countries: Returns full metadata for all 295 World Bank country/territory records — ISO2/ISO3 codes, region, income level classification, capital city, and GPS coordinates.

The actor uses got-scraping for HTTP with retry logic, pushing clean normalized rows directly into an Apify dataset. No login, no API key, no browser — pure JSON API.

Who is it for?

  • Economists and researchers who need decades of GDP, inflation, or unemployment data for multiple countries in a single flat table.
  • Data journalists who want to compare development indicators across regions for data-driven articles.
  • Business intelligence analysts tracking macroeconomic trends for market-entry decisions.
  • Students and academics building datasets for theses, papers, or quantitative coursework.
  • Government and NGO analysts monitoring progress toward development goals across dozens of countries.

Use cases

  • Extract GDP per capita for all G20 countries from 1990 to 2023 and load it into Google Sheets for a comparative growth chart.
  • Pull 20 years of inflation data (FP.CPI.TOTL.ZG) for emerging markets to analyze monetary policy impacts.
  • Build a country metadata table with region, income level, and capital coordinates for a mapping dashboard.
  • Automate quarterly downloads of World Bank poverty and unemployment data into a BI tool like Tableau or Power BI.
  • Discover which indicator codes cover CO2 emissions, renewable energy, or gender equality by running the indicators mode and filtering by topic.

Why use World Bank Data Scraper?

  • No API key required: The World Bank API is fully open — zero registration, zero authentication, zero monthly quota drama.
  • 16,000+ indicators: GDP, population, education, health, poverty, gender, climate, trade, debt — every major development metric is available.
  • Multi-country bulk mode: Pass US;CN;IN;DE;GB or all to pull thousands of rows in one run.
  • Long historical series: Data goes back to 1960 for many indicators — ideal for longitudinal analysis.
  • Three modes in one actor: Time-series data, indicator directory, and country metadata without needing separate tools.
  • Export as CSV, JSON, or Excel: Apify datasets support one-click export in any format, or integrate via API into your pipeline.

What data can you extract?

indicatorData mode fields

FieldTypeDescription
countrystringFull country name (e.g. "United States")
countryCodestringISO 2-letter country code (e.g. "US")
countryIso3stringISO 3-letter country code (e.g. "USA")
indicatorstringHuman-readable indicator name (e.g. "GDP (current US$)")
indicatorCodestringWorld Bank code (e.g. "NY.GDP.MKTP.CD")
datestringYear or date period (e.g. "2023")
valuestringNumeric value as string (null if data unavailable)
unitstringUnit of measurement if provided
observationStatusstringStatus code (E = estimate, P = provisional, etc.)

indicators mode fields

FieldTypeDescription
idstringIndicator code (e.g. "NY.GDP.MKTP.CD")
namestringIndicator display name
sourceNotestringFull description of what is measured
topicsstringComma-separated topic tags
unitstringDefault unit

countries mode fields

FieldTypeDescription
idstringISO 3-letter country code
iso2CodestringISO 2-letter code
namestringCountry name
regionstringWorld Bank region (e.g. "East Asia & Pacific")
incomeLevelstringIncome classification (High/Upper-middle/Lower-middle/Low)
capitalCitystringCapital city name
latitudestringGPS latitude of capital
longitudestringGPS longitude of capital

Output example (indicatorData)

{
"country": "United States",
"countryCode": "US",
"countryIso3": "USA",
"indicator": "GDP (current US$)",
"indicatorCode": "NY.GDP.MKTP.CD",
"date": "2023",
"value": "27811517000000",
"unit": "",
"observationStatus": ""
}

How to use

Option A: Time-series data for specific countries and indicator

Use indicatorData mode to pull years of data for any combination of countries and indicators.

Steps:

  1. Go to the actor's Input tab.
  2. Set Mode to indicatorData.
  3. Enter your country codes in Countries (e.g. US;CN;IN;DE;GB), or type all.
  4. Enter the Indicator Code (e.g. NY.GDP.MKTP.CD for GDP). See common codes below.
  5. Set Date From and Date To (e.g. 2000 and 2023).
  6. Click Start.
{
"mode": "indicatorData",
"countries": "US;CN;IN;DE;GB",
"indicator": "NY.GDP.MKTP.CD",
"dateFrom": 2000,
"dateTo": 2023
}

Common indicator codes:

IndicatorCode
GDP (current US$)NY.GDP.MKTP.CD
GDP per capita (current US$)NY.GDP.PCAP.CD
Population, totalSP.POP.TOTL
Inflation, consumer prices (%)FP.CPI.TOTL.ZG
Unemployment, total (% of labor force)SL.UEM.TOTL.ZS
Life expectancy at birth (years)SP.DYN.LE00.IN
CO2 emissions (metric tons per capita)EN.ATM.CO2E.PC
Internet users (% of population)IT.NET.USER.ZS

Option B: Discover all available indicators

Use indicators mode to browse the full catalog of 16,000+ indicator codes before building your pipeline.

{
"mode": "indicators",
"maxResults": 500
}

Option C: Country metadata

Use countries mode to get the full list of countries with region, income classification, and coordinates.

{
"mode": "countries"
}

Input parameters

ParameterTypeDefaultDescription
modestringindicatorDataMode: indicatorData, indicators, or countries
countriesstringUS;CN;IN;DE;GBSemicolon-separated ISO2 codes or all. Only for indicatorData mode
indicatorstringNY.GDP.MKTP.CDWorld Bank indicator code. Only for indicatorData mode
dateFrominteger2000Start year (1960–2030). Only for indicatorData mode
dateTointeger2023End year (1960–2030). Only for indicatorData mode
maxResultsinteger0Max records to push (0 = unlimited)
proxyConfigurationobjectApify datacenterProxy settings

Full input JSON (indicatorData):

{
"mode": "indicatorData",
"countries": "US;CN;IN;DE;GB;JP;BR;FR",
"indicator": "SP.POP.TOTL",
"dateFrom": 1990,
"dateTo": 2023,
"maxResults": 0,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["DATACENTER"]
}
}

Output example (full object)

{
"country": "China",
"countryCode": "CN",
"countryIso3": "CHN",
"indicator": "GDP (current US$)",
"indicatorCode": "NY.GDP.MKTP.CD",
"date": "2022",
"value": "17963170970000",
"unit": "",
"observationStatus": ""
}

Tips for best results

  • Use all countries sparingly: It returns 16,000+ rows per indicator per year range. Start with a few countries to validate your setup, then scale up.
  • Combine with indicators mode first: Run indicators with maxResults: 100 to browse available codes before committing to a big pull.
  • Year ranges matter: Not all indicators have data before 1990. Narrow dateFrom if you get many null values.
  • Null values are normal: World Bank data has gaps — value: null means the observation was not collected for that year/country, not that the scraper failed.
  • GDP is in current US dollars: NY.GDP.MKTP.CD values like 27811517000000 are raw USD (not millions). Divide by 1e9 for billions in your spreadsheet.
  • Use maxResults for testing: Set maxResults: 50 for a quick sanity check before running a full multi-country pull.
  • Datacenter proxy is sufficient: The World Bank API does not block datacenter IPs — no residential proxy needed.
  • Schedule quarterly runs: World Bank updates data monthly. Use Apify's scheduler to auto-refresh your dataset.
  • Export to Google Sheets: After a run, click Export → Google Sheets on the dataset page for instant pivot-table analysis.
  • Use ISO2 codes: The actor accepts standard 2-letter codes like US, DE, IN. Do not use country names or ISO3 in the countries field.

Integrations

Google Sheets: Export your dataset directly from the Apify UI (Dataset → Export → Google Sheets) or use the Google Sheets integration to auto-sync on each run.

Zapier / Make: Trigger a Zap or Make scenario whenever a new run completes. Push freshly scraped World Bank data to Airtable, Notion, a database, or a Slack channel.

Webhooks: Configure a webhook in the actor's settings to POST run results to your own endpoint — ideal for triggering downstream ETL pipelines.

Schedule: Use Apify's built-in scheduler to run this actor monthly or quarterly and keep your economic dataset perpetually fresh.

API: The Apify API exposes each dataset as a JSON/CSV endpoint that you can query directly from Python, R, Node.js, or any BI tool.

API usage

cURL

curl -X POST "https://api.apify.com/v2/acts/logiover~world-bank-data-scraper/runs?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mode":"indicatorData","countries":"US;CN;IN","indicator":"NY.GDP.MKTP.CD","dateFrom":2010,"dateTo":2023}'

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('logiover/world-bank-data-scraper').call({
mode: 'indicatorData',
countries: 'US;CN;IN;DE;GB',
indicator: 'NY.GDP.MKTP.CD',
dateFrom: 2000,
dateTo: 2023,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('logiover/world-bank-data-scraper').call(run_input={
'mode': 'indicatorData',
'countries': 'US;CN;IN;DE;GB',
'indicator': 'NY.GDP.MKTP.CD',
'dateFrom': 2000,
'dateTo': 2023,
})
items = client.dataset(run['defaultDatasetId']).list_items().items

Use with AI agents (MCP)

This actor is compatible with Apify's Model Context Protocol (MCP) server, which means you can call it directly from Claude, GPT-4, or any MCP-enabled AI agent. Ask your AI assistant: "Use the logiover/world-bank-data-scraper actor to fetch GDP data for the BRICS countries from 2000 to 2023 and compare their growth trajectories." The agent will invoke the actor via the Apify MCP tool, retrieve the dataset, and perform the analysis — no manual API calls required.

FAQ

Does this actor require an API key?

No. The World Bank Open Data API is completely free and keyless. You do not need to register, generate tokens, or configure credentials of any kind.

How many countries and indicators are available?

The World Bank covers 295 countries and territories, with over 16,000 indicator codes across topics including macroeconomics, health, education, environment, trade, and governance.

How many rows can one run produce?

A typical run with countries=all, a single indicator, and a 30-year date range produces around 6,000–9,000 rows (one per country per year). Running multiple indicators or wider date ranges multiplies this proportionally.

Why are some value fields null?

World Bank data has legitimate gaps. Not every country reports every indicator every year. A null value means the data point was not available in the World Bank database — it is not a scraper error.

Can I fetch multiple indicators in one run?

The current version supports one indicator per run. To fetch multiple indicators, run the actor once per indicator (use Apify's scheduler or API) and merge the resulting datasets by country + year.

How do I find the right indicator code?

Run the actor in indicators mode with maxResults: 200. You will get the full list of codes. Alternatively, browse the World Bank Data Catalog at data.worldbank.org.

How often is the World Bank data updated?

Most indicators are updated annually, with the main bulk release in late spring (April–June). Some indicators like commodity prices update more frequently. World Bank shows the lastupdated date in the API response.

How fast does the actor run?

A 5-country × 24-year pull (120 rows) typically completes in under 10 seconds. A full all countries run for one indicator (6,000+ rows) typically takes 30–90 seconds depending on pagination.

Yes. The World Bank Open Data is published under the Creative Commons Attribution 4.0 International license (CC BY 4.0). Commercial and non-commercial use is both permitted with attribution.

How do I export to Excel or CSV?

In the Apify Console, open the run's dataset and click the Export button. You can download as CSV, Excel, JSON, or XML. You can also access the same exports via the Apify API.

What is the difference between NY.GDP.MKTP.CD and NY.GDP.PCAP.CD?

NY.GDP.MKTP.CD is total GDP in current US dollars. NY.GDP.PCAP.CD is GDP divided by population — GDP per capita. Use per capita for fair country comparisons.

Can I use this actor with Python pandas?

Yes. Fetch the dataset via the Apify Python client or direct CSV/JSON URL and load it with pd.read_json() or pd.read_csv(). The flat row format with country, date, and value maps naturally to a DataFrame.

World Bank Open Data is published under the Creative Commons Attribution 4.0 International license. The API is publicly available without authentication and is explicitly designed for programmatic access. This actor accesses only the official public endpoints documented at https://datahelpdesk.worldbank.org/knowledgebase/articles/889392-about-the-indicators-api-documentation. No login credentials are used, no personal data is collected, and the usage complies with the World Bank's Terms of Use for open data access. As with any public dataset, verify any data quality or coverage requirements before using results in high-stakes decisions.

  • UN Comtrade Data Scraper — International merchandise trade statistics from the UN Comtrade database. Complements World Bank macro data with bilateral trade flows.
  • Company Registry Scrapers — Country-level business registry scrapers (France, Finland, Australia, Czech Republic, and more) for company-level data to pair with country macro indicators.
  • B2B Lead Scraper — OSM-based company and contact scraper for sector-level B2B lead generation by country.