World Bank Data Scraper – Indicators by Country & Year avatar

World Bank Data Scraper – Indicators by Country & Year

Pricing

from $2.00 / 1,000 result rows

Go to Apify Store
World Bank Data Scraper – Indicators by Country & Year

World Bank Data Scraper – Indicators by Country & Year

Export World Bank development indicators by country and year from the official World Bank Open Data API: GDP, population, unemployment, CO2, inflation and 1400+ more. Public API, no key.

Pricing

from $2.00 / 1,000 result rows

Rating

0.0

(0)

Developer

QIQI

QIQI

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Categories

Features

Limited permissions

Share

Turn any of the World Bank's 1400+ development indicators into a tidy country-year table — from the official open data API, not from scraping data.worldbank.org page by page.

The World Bank Open Data portal publishes GDP, population, unemployment, inflation, CO2 emissions, life expectancy, literacy, trade and hundreds of other indicators for around 200 economies, with series that reach back to 1960. It is one of the most widely used free economic datasets in the world.

This Actor queries the official api.worldbank.org/v2 JSON API and returns one flat row per indicator / country / year: the code and name of the indicator, the country with its region and income group, the year, the value and the observation status.

Why this Actor

Typical scrapersThis Actor
AccessClick the portal, export per countryOne query returns every country at once
Data sourceWebsite exports and dashboardsOfficial api.worldbank.org/v2 JSON API
Country contextYou join regions and income groups yourselfRegion, income group and ISO2 code included
ShapePortal CSV with its own column orderFixed 11-column schema, newest year first
API keyNot needed on the siteNot needed here either — anonymous public access

What you get

One dataset item per indicator / country / year observation.

FieldTypeDescription
indicator_idstringWorld Bank indicator code, e.g. NY.GDP.MKTP.CD.
indicator_namestringHuman-readable indicator name, e.g. GDP (current US$).
country_codestringISO 3166-1 alpha-3 country code, e.g. CHN. Aggregates use World Bank codes such as WLD or EAS.
country_namestringCountry or aggregate name as published by the World Bank.
country_iso2stringISO 3166-1 alpha-2 code from the World Bank country directory. Empty for aggregates and when the directory could not be loaded.
regionstringWorld Bank region, e.g. East Asia & Pacific. Aggregates are labelled Aggregates.
income_levelstringWorld Bank income group, e.g. High income, Upper middle income, Low income.
datestringReference year of the observation, YYYY.
valuenumberThe indicator value in the unit reported below. Empty when the World Bank holds no figure for that country-year.
unitstringUnit reported by the API for the indicator, when the World Bank supplies one.
obs_statusstringObservation status flag used by the World Bank for estimated or provisional values. Empty for ordinary observations.
  • value -- Kept as a number so it can be charted straight away. The World Bank leaves the field null for country-years it has no figure for; those rows come back with an empty value rather than a zero, so a missing figure is never mistaken for a real 0.
  • region -- Read from the World Bank country directory, not guessed. Rows whose region is Aggregates are regional or income-group totals such as East Asia & Pacific, Sub-Saharan Africa or World — switch on excludeAggregates to keep only real countries.
  • obs_status -- The API's own flag for provisional or estimated values. Almost every row is empty here; when it is set, treat the figure as an estimate.

Input

ParameterTypeDefaultDescription
indicatorstringNY.GDP.MKTP.CDRequired. World Bank indicator code, e.g. NY.GDP.MKTP.CD (GDP, current US$), NY.GDP.PCAP.CD (GDP per capita), SP.POP.TOTL (population), SL.UEM.TOTL.ZS (unemployment %), FP.CPI.TOTL.ZG (inflation %), EN.ATM.CO2E.PC (CO2 per capita). Any of the 1400+ codes from the World Bank indicator list works.
countriesstringallISO codes separated by commas, e.g. CHN,USA,IND,DEU — or all for every country and aggregate the World Bank publishes. Aggregates such as East Asia & Pacific are included unless you turn on excludeAggregates.
dateRangestring2020:2024A single year (2024) or a range (2015:2024). Leave empty for every year the World Bank holds for that indicator — for GDP that goes back to 1960.
maxResultsinteger200Stop after this many country-year rows have been collected. 200 rows is about 40 countries over five years.
excludeAggregatesbooleanfalseWhen on, rows whose region is Aggregates (East Asia & Pacific, Sub-Saharan Africa, World, income groups …) are dropped and only real countries remain. Useful when you want to average or map the data.

A note on indicator

The code decides everything. NY.GDP.MKTP.CD is GDP in current US dollars, NY.GDP.PCAP.CD GDP per capita, SP.POP.TOTL total population, SL.UEM.TOTL.ZS unemployment as a share of the labour force, FP.CPI.TOTL.ZG inflation, EN.ATM.CO2E.PC CO2 emissions per capita, SP.DYN.LE00.IN life expectancy. The full list is browsable at data.worldbank.org/indicator — the code is shown on each indicator page.

A note on dateRange

Use 2015:2024 for a decade, 2024 for one year, or leave it empty for the whole series. Older series are sparse: GDP runs back to 1960, most social indicators start around 1990, and the most recent year is often missing for smaller economies.

A note on maxResults

Rows are collected newest year first and then cut at this number. A global query over ten years is roughly 2000 rows, so raise the limit if you want the full set.

Usage examples

1. GDP of the largest economies, 2015–2024

{
"indicator": "NY.GDP.MKTP.CD",
"countries": "USA,CHN,JPN,DEU,IND,GBR,FRA,BRA",
"dateRange": "2015:2024",
"maxResults": 100,
"excludeAggregates": true
}

2. World population, every economy, latest years

{
"indicator": "SP.POP.TOTL",
"countries": "all",
"dateRange": "2020:2024",
"maxResults": 1000,
"excludeAggregates": false
}

3. CO2 emissions per capita for a single country, full history

{
"indicator": "EN.ATM.CO2E.PC",
"countries": "CHN",
"dateRange": "",
"maxResults": 100,
"excludeAggregates": true
}

Run it on an Apify Schedule — monthly for slow indicators like GDP and literacy, yearly for the December revision cycle. Push the dataset to a Google Sheet, Airtable, BigQuery or a dashboard, and key your rows on country_code + date + indicator_id, which together are unique.

Data notes

  • Rows come out sorted by year descending and then alphabetically by country, so the newest data is always at the top of the dataset.
  • The country directory request gives you region, income group and ISO2 code in one extra call. If it fails, the run still succeeds and those three columns are simply empty.
  • The World Bank publishes the same series under slightly different codes across vintages, and revises history in place; the value you see today for 2020 can differ from the value published a year ago.

Pricing

This Actor uses pay-per-event pricing. You only pay for what you actually get.

EventPriceWhen it is charged
Actor start$0.002Once per run
Result row$0.002 per rowFor every row saved to the dataset

That works out to $2 per 1,000 rows. A typical run returning 50 rows costs about $0.10 in total.

No subscription is required. You can cap your spend with the max cost per run setting in Apify Console, and an empty or invalid input charges only the start event.

FAQ

Do I need an API key?

No. The World Bank Open Data API is public and anonymous, with no registration and no quota to configure.

Is this data free to use?

Yes. World Bank Open Data is released under CC BY 4.0 — you may use, redistribute and build on it, including commercially, with attribution to the World Bank.

How do I find the indicator code I want?

Open the indicator page on data.worldbank.org and look at the code printed under the indicator name, or search the Data Catalog. Codes look like NY.GDP.MKTP.CD.

Why are values missing for some years?

Because the World Bank has no reported figure for that country-year. These rows are returned with an empty value, not with a zero, and you can filter them out with a single step.

Can I get several indicators in one run?

Run the Actor once per indicator and join the datasets on country_code + date. Each run then stays fast and the schema stays flat.

More data tools from the same publisher:

Disclaimer

All data is retrieved in real time from the World Bank Open Data API v2 (api.worldbank.org), the World Bank's own public open data service. This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the World Bank Group.

World Bank indicators are estimates compiled from national statistics offices and may be revised, re-based or withdrawn. Verify anything financially significant against the indicator page on data.worldbank.org. This dataset is an analysis aid, not investment or policy advice.