World Bank Indicators API: GDP, Population & WDI by Country
Pricing
from $1.00 / 1,000 value returneds
World Bank Indicators API: GDP, Population & WDI by Country
World Bank data API: GDP, population, inflation and 1,400+ World Development Indicators by country and year, or only new and revised values since your last run. Never charged for failed or unchanged rows. Not affiliated with or endorsed by the World Bank.
Pricing
from $1.00 / 1,000 value returneds
Rating
0.0
(0)
Developer
COMPASS DEV
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Share
Returns World Development Indicators (GDP, population, inflation and 1,400+ other series) by country and year from the official World Bank API, one flat row per value, or in watch mode only the values that are new (a newly published year) or revised since your last run. Never charged for failed or unchanged rows.
Give it indicator codes (e.g. NY.GDP.MKTP.CD for GDP) and, if you like, countries and years; get clean rows with the
country, year, value, unit, licence and a link to the indicator's page on data.worldbank.org. Built for analysts,
dashboards, spreadsheets and AI agents that need reliable macro data without wrestling with the API's paging and formats.
Data: The World Bank, World Development Indicators, CC BY 4.0. Not affiliated with or endorsed by the World Bank.
Quick start
- The latest GDP and population for three countries (export: every value, every run):
{ "indicators": ["NY.GDP.MKTP.CD", "SP.POP.TOTL"], "countries": ["FR", "DE", "US"] }
- Every country's inflation since 2015:
{ "indicators": ["FP.CPI.TOTL.ZG"], "yearFrom": 2015 }
- Watch GDP for new years and revisions (the first run is the baseline; later runs return only new or revised values):
{ "indicators": ["NY.GDP.MKTP.CD"], "countries": ["FR", "DE", "US"], "stateName": "gdp-watch" }
What it does
- One row per value (country × indicator × year). By default each country's latest published value; set
mostRecentValuesor a year range for more. Years without a published value are left out, free. - Licence check: before it returns a series, it reads the series' own licence label from the World Bank's metadata
(
License_Type). Only series labelled CC BY 4.0 (or CC0) are returned; any other gives one freeno_datarow. Every row carrieslicenseType,licenseUrland theattributionthe licence asks for. - Countries: two- or three-letter codes (
FRorFRA). Leavecountriesempty for every country and economy; regional and income aggregates ("World", "Euro area", "High income") only withincludeAggregates. A listed country with no value in the years gives one freeno_datarow; an unknown code gives one freefailedrow. - Watch mode: remembers every value under your watch list name and returns only:
baseline: the first run of an indicator on the list;new: a year or country that had no value before (the World Bank published it);changed: a revised value (previousValueholds the old one);- unchanged values are free and left out (
includeUnchanged: truereturns them as free rows). - A watch run with nothing new or revised returns exactly one free
no_datarow that says so.
- You are never charged for failed results: failed, no_data and unchanged rows are free.
Input
| Field | Type | Default | Description |
|---|---|---|---|
indicators | list of strings | — (prefilled with GDP and population) | WDI series codes, e.g. NY.GDP.MKTP.CD, SP.POP.TOTL, FP.CPI.TOTL.ZG |
countries | list of strings | — (prefilled FR, DE, US) | ISO2/ISO3 codes; empty = every country and economy |
mostRecentValues | integer 1–70 | 1 | Each country's N most recent published values (1 = the latest); ignored with yearFrom/yearTo |
yearFrom, yearTo | integer | — | An explicit year range |
includeAggregates | boolean | false | With every country: also World, regions and income groups |
mode | watch or export | — | Empty: watch when stateName is given, otherwise export. An explicit mode wins |
stateName | string | — (prefilled example-watchlist) | Watch list name. Watch mode without a name uses the list default |
includeUnchanged | boolean | false | Watch: also return unchanged values (free) |
maxItems | integer 1–100,000 | 1000 | Most charged rows per run; in watch mode the rest comes next run |
Output
{"status": "ok","attempts": 1,"error": null,"input": "NY.GDP.MKTP.CD","mode": "export","watchList": null,"indicatorId": "NY.GDP.MKTP.CD","indicatorName": "GDP (current US$)","countryIso3": "FRA","countryIso2": "FR","countryName": "France","year": 2024,"value": 3160000000000,"unit": null,"decimals": 0,"changeType": null,"previousValue": null,"url": "https://data.worldbank.org/indicator/NY.GDP.MKTP.CD?locations=FR","sourceName": "World Development Indicators","sourceLastUpdated": "2026-07-01","licenseType": "CC BY-4.0","attribution": "The World Bank: World Development Indicators (and its data providers)","scrapedAt": "2026-09-30T11:00:00.000Z"}
| Status | Meaning | Charged? |
|---|---|---|
ok | A value returned | Export: yes. Watch: baseline, new and changed yes; unchanged no |
no_data | Unknown series, a series not labelled CC BY 4.0, no value published, or no changes since the last run | No |
failed | Invalid code, or no answer after retries (error says why) | No |
The key-value store holds RUN_REPORT (counts, charged and free rows, stop reason) and, when something fails, the raw
response (SNAPSHOT_*).
Use it from AI agents
- One clear main input:
{"indicators": ["<WDI code>"]}(every country's latest published value, about 200 rows). The same call returns data every time. - Add
"stateName": "<list>"to get only new and revised values on later calls; a call with nothing new returns oneno_datarow that says "No new or changed values since the last run". - Every row has
status,error,url(data.worldbank.org) andscrapedAt. - Via the Apify MCP server or API:
mouadapi/world-bank-indicators. Pay per returned value; x402 agentic payments supported.
Copy-paste call (your Apify token in APIFY_TOKEN):
curl -s -X POST "https://api.apify.com/v2/acts/mouadapi~world-bank-indicators/run-sync-get-dataset-items?token=$APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"indicators": ["SP.POP.TOTL"]}'
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('mouadapi/world-bank-indicators').call({ indicators: ['SP.POP.TOTL'] });const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Pricing
Pay per event, one data-point event per returned value (export: every value; watch: baseline, new and changed
rows). no_data, failed and unchanged rows are free.
| Plan | Price per 1,000 values |
|---|---|
| Free | $1.50 |
| Bronze | $1.30 |
| Silver | $1.15 |
| Gold (and higher) | $1.00 |
Apify also charges its small per-run start event. There are no usage fees on top.
Limits
- World Development Indicators only (the World Bank's main database, source 2); other World Bank databases are not covered.
- One request at a time, at most one a second (the World Bank asks for "reasonable request volume"): one request per indicator for its licence, one per 1,000 values, plus one for the country list.
- If the API answers HTTP 429 (rate limit), the run pauses 60, 120 and 240 seconds on the same connection, then stops with
free
failedrows. No other IP or proxy is ever tried.
Known issues
- The World Bank API can be slow (single requests sometimes take 20–30 seconds); timeouts are retried.
- Most WDI series are annual; many countries publish the latest year late, so the newest year is often empty for a while.
In watch mode those values come as
newrows when the World Bank publishes them.
Data and licence
- Source: the World Bank Indicators API (api.worldbank.org), documented on datahelpdesk.worldbank.org.
- World Bank Dataset Terms: "Unless specifically labeled otherwise, these Datasets are provided to you under a Creative Commons Attribution 4.0 International License (CC BY 4.0)". This Actor checks each series' label and returns only CC BY 4.0 (or CC0) series, with the attribution on every row.
- This Actor is not affiliated with, endorsed by or provided by the World Bank. It returns the values as published.