World Bank Indicators API: Countries, GDP, Population, More
Under maintenancePricing
from $2.00 / 1,000 indicator values
World Bank Indicators API: Countries, GDP, Population, More
Under maintenanceSearch World Bank indicators, get country time series (GDP, population, life expectancy...) and rank countries by latest value. CC BY 4.0 indicators only, with source, licence and update date in every record. Unofficial.
Pricing
from $2.00 / 1,000 indicator values
Rating
0.0
(0)
Developer
Shadow Tools
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
15 days ago
Last modified
Categories
Features
Share
Call this Actor to get World Bank indicator values by country and year (GDP per capita, population, life expectancy, unemployment, CO2, internet use and about 1,500 other World Development Indicators), to find the right indicator id from a keyword, or to rank countries on an indicator's latest value. Output is flat JSON rows: country (ISO3 code, name, region, income level, aggregate flag), indicator (id, name, unit), year, value, source, licence, last-update date and a ready-made attribution line in every record. Only indicators that the World Bank itself declares CC BY 4.0 are returned.
Unofficial tool. Not affiliated with, endorsed by or sponsored by The World Bank. It reads the public World Bank Indicators API and reformats it. The World Bank name and logos are not used to suggest any association.
Minimal input per mode
| Mode | Minimal input | What comes back |
|---|---|---|
getIndicator | {"indicators": ["NY.GDP.PCAP.CD"], "countries": ["FRA", "DEU"], "startYear": 2018, "endYear": 2023} | one row per country and year |
searchIndicators | {"mode": "searchIndicators", "query": "life expectancy", "maxResults": 5} | indicator id, name, unit, source, topics, licence |
compareCountries | {"mode": "compareCountries", "indicators": ["SP.DYN.LE00.IN"], "countries": ["region:ECS"], "maxResults": 10} | countries ranked on their latest value, with the year |
An empty input {} works: GDP per capita (current US$) of France, Germany and the USA, last 5 available values per country (15 rows).
Short real output (default input, 8 Nov 2026, shortened; the full record also has region, incomeLevel, sourceOrganization, licenseUrl, period, obsStatus):
{"type": "observation", "countryIso3": "DEU", "countryName": "Germany", "isAggregate": false, "indicatorId": "NY.GDP.PCAP.CD", "indicatorName": "GDP per capita (current US$)", "year": 2025, "value": 60496.4350820414, "unit": null, "sourceName": "World Development Indicators", "lastUpdated": "2026-10-08", "license": "CC BY 4.0", "attribution": "The World Bank: World Development Indicators: Country official statistics, ... License: CC BY 4.0 (https://datacatalog.worldbank.org/public-licenses#cc-by); ... Source last updated: 2026-10-08. ..."}
For AI agents (MCP)
- One call = one answer. Default
maxResultsis 20 (max 50,000). Typical run: 1-5 s; all countries over 66 years of one indicator (14,292 rows) took 25 s. - Pick the mode by what you have: you know the id (
NY.GDP.PCAP.CD,SP.POP.TOTL) ->getIndicator; you only know a topic ->searchIndicatorsfirst (it returns the id), thengetIndicator; "which countries are highest/lowest" ->compareCountries. - Countries accept ISO3 (
FRA), ISO2 (DE), exact English names (United States), and groups:all(countries only),aggregates(World, regions, income groups),region:ECS,income:HIC. Aggregates are flaggedisAggregate: trueso they are never mistaken for countries. - Empty values are
null, never filled in. By default empty rows are skipped (and counted in theSUMMARYrecord);includeMissing: truereturns them asnull. - Errors fail fast as
Field X invalid: expected Y, got Z, example W(for exampleField countries invalid: expected ISO3 or ISO2 codes, exact country names, "all", ..., got ["Atlantis"], example ["FRA", "DE", "region:ECS"].). Nothing is charged. - 0 results is not an error. The run succeeds with an empty dataset and the key-value record
SUMMARYhas anotesaying why (no value in the period, indicator refused because of its licence, ...) and what to change. - Licence refusals are explicit: asking for an indicator that is not CC BY 4.0 (for example the SIPRI series
MS.MIL.XPND.CD) returns no rows and a note naming the declared licence.
Who uses it
- Analysts, journalists, students: country time series without handling the API, pagination or country codes.
- Dashboards and data pipelines: a stable flat JSON/CSV feed with source, licence and update date on each row.
- AI assistants: answer "GDP per capita of Poland since 2015" or "which countries have the highest life expectancy" with a dated, attributed source.
Modes
- getIndicator: values of one or several indicators (up to 10) for the chosen countries. Period:
startYear/endYear, orlatestValues(the most recent N non-empty values per country; default 5 when no year is given). - searchIndicators: keyword and/or topic search in the indicator catalogue (
sourceId2= World Development Indicators by default,all= every database, about 29,000 indicators). All words must match the id, the name or the indicator description (the description itself is not returned). By default only reusable (CC BY 4.0) indicators are listed (onlyReusable); set it tofalseto also see others, flaggedreusable: false. The licence of each hit is read from the World Bank metadata (at most 400 candidates are checked per run). - compareCountries: the latest non-empty value of one indicator for each country, ranked (
orderdesc or asc; ties share the rank: 1, 2, 2, 4). Countries rank on their own latest year, shown inyear;SUMMARY.yearsDiffertells when years differ (useendYearto cap the period).
What you get
Observation record (getIndicator): type ("observation"), countryIso3, countryIso2, countryName, isAggregate, region, regionId, incomeLevel, incomeLevelId (null for aggregates), indicatorId, indicatorName, year, period (for example "2023"), value (number or null), unit (when the source gives one, else null), obsStatus, sourceId, sourceName, sourceOrganization (credit line, see Privacy), lastUpdated (source database last-update date), license, licenseUrl, attribution, extractedAt.
Comparison record (compareCountries): the same fields with type "comparison", plus rank and rankedAmong.
Indicator record (searchIndicators): type ("indicator"), indicatorId, indicatorName, unit, topics[], sourceId, sourceName, sourceOrganization, sourceLastUpdated, license (as declared), licenseUrl, reusable, attribution, extractedAt.
Quick start
GDP per capita and population, 2015-2023, four countries:
{ "indicators": ["NY.GDP.PCAP.CD", "SP.POP.TOTL"], "countries": ["FRA", "DEU", "ITA", "ESP"], "startYear": 2015, "endYear": 2023, "maxResults": 100 }
Which European and Central Asian countries live longest?
{ "mode": "compareCountries", "indicators": ["SP.DYN.LE00.IN"], "countries": ["region:ECS"], "maxResults": 10 }
Find unemployment indicators:
{ "mode": "searchIndicators", "query": "unemployment", "maxResults": 10 }
World and EU population since 2000:
{ "indicators": ["SP.POP.TOTL"], "countries": ["WLD", "EUU"], "startYear": 2000 }
Call it from the API: POST https://api.apify.com/v2/acts/<ACTOR>/run-sync-get-dataset-items?token=<TOKEN> with the JSON input as body.
Pricing
Pay per event, no subscription:
| Event | Price | Per 1,000 |
|---|---|---|
indicator-value: one record delivered (an observation row, a ranked country or an indicator) | 0.002 USD | 2 USD per 1,000 records |
| Actor start (once per run) | 0.00005 USD | n/a |
A run returning nothing costs only the start event. Example: the default run (15 rows) costs 0.03 USD; 5 years of GDP for all 217 countries (up to 1,085 rows) at most about 2.2 USD. Use the platform's Maximum cost per run to cap spending: the Actor reads it, stops cleanly at the cap and returns what it already delivered (the cap must allow at least one record). Empty rows requested with includeMissing are records like any other.
Privacy / GDPR by design
This Actor returns macro-economic data about countries, not data about people:
- Countries, not people. Every row is a country (or an aggregate such as World or a region), an indicator and a year. No microdata or survey responses are fetched, and the Actor never asks for anything about individuals.
- Allow-list, fail-closed. Records are built from a fixed list of named fields; any other field the API might add in the future is dropped, not passed through (a unit test pins the list). A row whose country is not in the official country list, whose indicator is not the one requested, or whose value or period cannot be read with certainty is dropped, not guessed.
- Free text is limited. The only text copied from the source metadata is the indicator name, its unit and the source credit line (
sourceOrganization). E-mail addresses and phone-number patterns in them are masked. Credit lines that look like an author citation (for example "Surname, A.B., Surname, C.D. ...", "et al.", or a personal name with initials) are not returned: the attribution then carries the dataset name only. A credit line is also dropped unless it contains an organisation word (bank, statistics, office, union, survey ...). This is a pattern filter, not a proof: on 8 Nov 2026 it dropped 25 of the 1,498 World Development Indicators credit lines and about 26% of the other databases' credit lines. Long indicator descriptions are never returned. - Your input stays yours. Nothing about the requester is stored by the Actor: no state between runs, no logs of your query beyond the standard run log, no tracking. (The Apify platform stores the run input as for any Actor.)
Licence and attribution
Data: World Bank open data, read from the World Bank Indicators API (https://api.worldbank.org/v2, no key). The World Bank's Terms of Use for Datasets (https://www.worldbank.org/en/about/legal/terms-of-use-for-datasets, read 8 Nov 2026) state: "Unless specifically labeled otherwise, these Datasets are provided to you under a Creative Commons Attribution 4.0 International License (CC BY 4.0), with the additional terms below." and "You may use our application programming interfaces ("APIs") to facilitate access to the Datasets, whether through a separate Web site or through another type of software application." They also state: "Some datasets and indicators are provided by third parties, and may not be redistributed or reused without the consent of the original data provider, or may be subject to terms and conditions that are different from those described above. Where applicable, these conditions are included in the dataset or indicator metadata." The licence page (https://datacatalog.worldbank.org/public-licenses#cc-by) says CC BY 4.0 "allows users to copy, modify and distribute data in any format for any purpose, including commercial use", with attribution.
How the Actor applies this. The API publishes the licence per indicator in its series metadata (License_Type, License_URL). The Actor reads it before returning any value and serves an indicator only when it says CC BY 4.0. Indicators under another licence, with no licence field, or whose metadata cannot be read are refused and never returned (the run SUMMARY names them and their declared licence). Measured on 8 Nov 2026: of the 1,498 World Development Indicators, 1,489 are declared CC BY 4.0, 6 are SIPRI military series ("SIPRI terms and conditions") and 3 are "CC BY 3.0 IGO" (Women, Business and the Law): those 9 are refused. In a sample of 120 indicators spread over the whole catalogue (all databases), 62 were declared CC BY 4.0, 56 declared no licence and 2 declared "Open": the 58 others are refused. If you need those, ask the World Bank for their terms.
Attribution. Every record carries the credit in the format the World Bank asks for, "The World Bank: Dataset name: Data source (if known)", together with the licence name and URL, the terms-of-use URL, the last-update date of the source database, a statement that the data was reformatted by an unofficial service (values unchanged) and the extraction date. If you redistribute the data, keep that line, or at least the terms-of-use URL, as the Terms require for sub-licensing. The Terms also add a dispute-resolution procedure (non-binding mediation, then arbitration) to CC BY 4.0: read them before redistributing.
No warranty: the World Bank disclaims warranties and liability for the data and the APIs, and so does this unofficial service. Check the original source before relying on a figure.
Limits and good to know
- Values are the World Bank's latest published values: they are revised, and countries report with different delays.
lastUpdatedtells the database's last-update date, not the year of the value. unitis empty for most indicators because the API gives no unit; the unit is usually inindicatorName("current US$", "% of population").- Some indicator ids of other databases cannot be queried through this API (it answers "indicator not found"); the Actor reports the API message.
- The API is polite-use: the Actor identifies itself, pauses between requests and retries on temporary errors.
En français (court)
Outil non officiel qui reprend l'API publique des indicateurs de la Banque mondiale : valeurs par pays et par année (PIB par habitant, population, espérance de vie...), recherche d'indicateurs par mot-clé, classement des pays sur la dernière valeur disponible. Seuls les indicateurs déclarés CC BY 4.0 par la Banque mondiale sont servis, avec la licence, la source et la date de mise à jour dans chaque enregistrement. Données macroéconomiques par pays : aucune donnée personnelle.