Get World Bank country indicators as clean JSON
The World Bank Data API returns economic and development indicators as clean JSON.
8 active endpoints, on 1 and 2 credit tiers.
- POST/worldbank/v1/indicator
- POST/worldbank/v1/country
- POST/worldbank/v1/search_indicators
- POST/worldbank/v1/indicator_metadata
- POST/worldbank/v1/country_profile
- POST/worldbank/v1/shortcuts
- POST/worldbank/v1/reference
- +1 more
What World Bank endpoints does ReefAPI ship?
8 live read endpoints. Read-only data API: no writes, no account actions, no dashboard access on the target site.
World Bank API
3 of 8 endpoints, ready to run
One indicator for one or many countries as a dated series, with the database revision date attached and the observation count per country.
{ "ok": true, "meta": { "api": "worldbank", "endpoint": "indicator", "mode": "live", "latency_ms": 332.2, "record_count": 15, "cache_hit": false, "completeness_pct": 100 }, "data": { "data": [ { "indicator_code": "NY.GDP.MKTP.CD", "indicator_name": "GDP (current US$)", "metric": "gdp", "country": "India", "country_id": "IN", "countryiso3code": "IND", "unit": "", "last_updated": "2026-07-13", "series": [ { "date": "2021", "value": 3167270623260.47 }, { "date": "2022", "value": 3249938492013.47 }, { "date": "2023", "value": 3500906030644.76 } ], "observations": 5, "latest_value": 3956067115771.63, "latest_date": "2025" }, { "indicator_code": "NY.GDP.MKTP.CD", "indicator_name": "GDP (current US$)", "metric": "gdp", "country": "Nigeria", "country_id": "NG", "countryiso3code": "NGA", "unit": "", "last_updated": "2026-07-13", "series": [ { "date": "2021", "value": 609147716965.348 }, { "date": "2022", "value": 646950257575.455 }, { "date": "2023", "value": 487387801877.803 } ], "observations": 5, "latest_value": 290794361542.112, "latest_date": "2025" }, { "indicator_code": "NY.GDP.MKTP.CD", "indicator_name": "GDP (current US$)", "metric": "gdp", "country": "United States", "country_id": "US", "countryiso3code": "USA", "unit": "", "last_updated": "2026-07-13", "series": [ { "date": "2021", "value": 23725645000000 }, { "date": "2022", "value": 26054614000000 }, { "date": "2023", "value": 27811517000000 } ], "observations": 5, "latest_value": 30769700000000, "latest_date": "2025" } ], "series_count": 3, "indicators": [ "NY.GDP.MKTP.CD" ], "countries": [ "US", "IN", "NG" ], "source": "World Bank" } }
How the World Bank API works
World Bank is a normal ReefAPI surface — the same four rules that hold for every other engine on the key.
No OAuth app, no request signing, no per-site account. One key covers all 185 engines.
Every route is a POST with a JSON body. Parameters are validated against the published schema before anything is charged.
Credits, not seats. Failed and blocked calls are never charged, and cache hits cost nothing.
One envelope everywhere. meta carries latency_ms, record_count and the endpoint that answered.
Find the code, pull the countries together, then read the year
Two traps sit between a question and a chart here: the indicator code you cannot remember, and the assumption that the last row in a series has a number in it.
{"query": "inflation", "limit": 10}Codes with names, topics and source database. Or call shortcuts once and cache the 31 friendly names it maps.
{"country": "US;IN;NG", "indicator": "FP.CPI.TOTL.ZG", "mrv": 6}One call, three countries, six years each. Every series carries last_updated, latest_value and latest_date.
{"country": "US;IN;NG", "indicator": "SI.POV.GINI", "mrnev": 1}For a latest-figure dashboard use mrnev, not mrv. It counts only years that carry a number, so each country comes back with its own real latest reading instead of an empty recent row.
One credit for a multi-country series that is dated, attributed and comparable. The country, metadata and topic actions cover the reference data around it.
curl -X POST https://api.reefapi.com/worldbank/v1/indicator \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"country":"US","indicator":"NY.GDP.MKTP.CD","date":"2015:2022"}'{
"ok": true,
"data": { … },
"meta": {
"api": "worldbank",
"endpoint": "indicator",
"mode": "live",
"latency_ms": …,
"record_count": …
},
"error": null
}Codes you pass in, codes you get back
You can pass a two-letter or three-letter country code, an aggregate, or a friendly metric alias, and the response echoes back World Bank's own identifiers rather than yours. Aggregate rows in particular come back under codes you never sent. Values below are live August 2026 reads.
| What you pass | What comes back | Measured |
|---|---|---|
| country US (ISO2) | country_id US, countryiso3code USA | GDP series for United States |
| country USA (ISO3) | The same row; the two forms are interchangeable | countryiso3code USA either way |
| country WLD (aggregate) | country_id 1W and countryiso3code null | Population, total 8,215,424,893 for 2025 |
| country EUU (aggregate) | country_id EU | European Union population 451,127,411 for 2025 |
| country HIC (income group) | country_id XD, countryiso3code null | High income population 1,423,739,902 for 2025 |
| indicator NY.GDP.MKTP.CD | indicator_code echoed plus indicator_name GDP (current US$). Real codes are case sensitive | United States 2022 value 26,054,614,000,000 |
| indicator gdp (alias) | Resolves to NY.GDP.MKTP.CD and sets metric to gdp. Aliases are case insensitive | 31 aliases in total, listed by the shortcuts action |
| country US;CN;DE | One data[] entry per indicator and country pair; separate with a semicolon, comma or space | series_count reflects the pair count, not the country count |
| date 2015:2022 | series[] with one row per year, date returned as a string | 8 observations for the range |
unit is an empty string on the indicator, indicator_metadata and search_indicators actions — the unit is embedded in indicator_name instead. Only the shortcuts map and country_profile fill it properly, with values such as current US$, annual % and people.
How current is 'the latest', and does the last row have a number in it
Measured on 2026-08-28 across eight indicators and three countries on three continents, plus the full country list with and without regional aggregates.
Every series carried the same last_updated stamp, six weeks before the day we measured. That is when the World Bank last revised the database, and it is the honest answer to 'how fresh is this' — not the day you called.
Measured in late August, the newest year with a value was the PREVIOUS year for GDP, population, unemployment and inflation, and the year before that for life expectancy and emissions. That is the correct shape for national accounts and it is not a fault, but it means this is a structural series, not a market feed.
The inequality indicator returned a row for the most recent year on all three countries, and the value in it was null for two of them — their real latest figure was two years earlier. And latest_value does NOT rescue you: it follows the last row of the window you asked for, not the last row with a number in it. Measured at mrv 6 and again at mrv 8, two countries came back latest_date 2024 with latest_value null while the 2022 row held a real figure. The fix is mrnev, which counts only years that have a value: the same two countries then returned latest_date 2022 with the figure attached.
On consumer-price inflation, two of the three countries had a value for the most recent year and the third did not. Comparing 'the latest' across countries silently compares different years unless you check each series' own latest_date.
Asking for everything returns 295 entries; excluding aggregates returns 217. The other 78 are regions and income groups — World, Euro area, Sub-Saharan Africa, Upper middle income. They are legitimate series and they will quietly double-count if you sum the list.
Country codes are semicolon-separated and come back as separate series with the country name, both ISO codes and its own observation count. A shortcuts call returns 31 named metrics — gdp, inflation, population, unemployment and so on — each mapped to its code and unit, which is what country_profile uses.
What people build with World Bank
The jobs this data is most often used for.
endpoints
credits per call
Research dashboards call indicator to chart GDP, population or inflation for a country over time.
Data products use country_profile to pull a full snapshot of a country's development indicators.
Analysts use search_indicators and topic_indicators to find the right series for a study.
What World Bank data costs
The cheapest call here is 1 credit, so $15/mo (Pro) buys 10,000 of them — $1.50 per 1,000 credits. Credits roll over and never expire, and failed or blocked calls are not charged.
Full pricing →- 1,000 free credits on signup, no card
- One key, all 185 APIs, one credit pool
- Failed and blocked calls are never charged
- Credits roll over and never expire
Call it in two lines
Sign up, get 1,000 credits and one key that works on every engine. Then this is the whole protocol.
curl -X POST https://api.reefapi.com/worldbank/v1/indicator \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"country":"US","indicator":"NY.GDP.MKTP.CD","date":"2015:2022"}'import requests
r = requests.post(
"https://api.reefapi.com/worldbank/v1/indicator",
headers={"x-api-key": REEF_KEY},
json={
"country": "US",
"indicator": "NY.GDP.MKTP.CD",
"date": "2015:2022"
},
)
print(r.json()["data"])Have a question? We got answers.
The questions people actually ask before wiring up World Bank.
Get a free key →Why is value null for the most recent years?▾
Because the World Bank has not published that year for that country yet, and the gap is preserved rather than hidden. Syria's GDP over 2018:2025 returned real values through 2022 and then value null for 2023, 2024 and 2025. Two parameters fix this: drop_nulls true removes the empty rows, taking that series from 8 observations to 5, and mrnev N asks for the latest N non-empty points instead.
Why is latest_value null when the series clearly has values?▾
latest_value follows the last row of the range you asked for, not the last row that has a number. The Syria query above returned latest_date 2025 and latest_value null even though 2022 held 23.7 billion. If you want the last real reading, request it with mrnev 1 or filter series yourself. A measured mrnev 3 on Türkiye inflation returned 2023, 2024 and 2025, all populated.
Does completeness_pct 100 mean the data is complete?▾
No. It reports that every row the World Bank offered was returned, not that every row has a value. The Syria series with three null years still reported completeness_pct 100.0. Count the non-null entries in series[] yourself, or use drop_nulls and compare observations before and after.
Can I query regions and income groups, not just countries?▾
Yes, aggregate codes go in the country parameter like any other code, but the identifiers change on the way back. WLD returned country_id 1W, EUU returned EU, and the income group HIC returned XD, with countryiso3code null on both aggregates. The reference action lists what is available: 43 regions, each with a three-letter code and a two-character iso2code, and 7 income levels including LMY for low and middle income combined.
Where is the unit for an indicator?▾
Not in the unit field, most of the time. indicator, indicator_metadata and search_indicators all returned unit as an empty string or null even for NY.GDP.MKTP.CD, and the only statement of units sits inside indicator_name, GDP (current US$). Two places do carry it: the shortcuts map, which returns unit current US$ for gdp and people for population, and country_profile, whose indicator entries include unit alongside value and date.
How current is the data, and how do I cite it?▾
Each series carries last_updated, which is the vintage of the underlying collection rather than the latest year of data — measured 2026-07-13 on both a GDP and a poverty series. The latest year that actually holds a number varies per indicator and country: France's profile reported 2025 across its headline metrics while Syria's GDP stopped at 2022. Every response also carries meta.attribution naming the World Bank and CC BY 4.0, which the licence requires you to reproduce.
I do not know the indicator code. How do I find it?▾
Three ways, cheapest first. shortcuts lists 31 friendly aliases mapped to codes, names and units. search_indicators does a keyword search that defaults to World Development Indicators, source 2, and takes full true to search every source — a search for 'gdp growth' returned exactly 2 matches with their topics attached. topic_indicators browses a whole topic by id or by name such as health or climate.
What is the difference between mrv and mrnev?▾
mrv counts calendar points backwards from the most recent year, nulls included. mrnev counts only the points that carry a value. On a sparse series the two return different years for the same N, which is why a most-recent-value dashboard should use mrnev and a fixed-grid chart should use mrv or an explicit date range. gapfill true is a third option that carries the last observed value forward into gaps, and it is off by default.
What is the World Bank API?▾
World Bank API is a ReefAPI endpoint group for global economic indicators by country. It returns live JSON through POST requests under /worldbank/v1.
Is the World Bank API free to try?▾
Yes. ReefAPI starts with 1,000 free credits, no card required. World Bank calls use the same shared credit balance as every other ReefAPI engine.
Do I need a World Bank login or account?▾
No login to World Bank is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.
How fresh is the World Bank data?▾
The page example is captured from a live indicator call, and production requests fetch live data through ReefAPI rather than a static sample.
How many credits does the World Bank API use?▾
World Bank actions currently cost 1-2 credits per successful call. Failed or blocked calls are free, and all APIs draw from one credit pool.
Can I call World Bank from an AI assistant or MCP client?▾
Yes. Connect ReefAPI once through MCP and your assistant can call worldbank actions with the same key, credit pool and JSON envelope used by normal REST requests.
5 Finance & Data APIs on the same key
One key, one credit pool, one response envelope. If you are pulling World Bank, you are one call away from the rest of the category — no second contract, no second integration.
Need something this API does not do?
Name the endpoint, the field, or a source we do not carry yet. We ship new APIs every week and you would be first to get the key. Real people read every message and reply the same day.
Try it on your own data before you pay anything
The call above is the real endpoint, not a recording. A free key gives you 1,000 credits, the other 184 APIs, and the same envelope everywhere.
Endpoints, parameters and credit costs on this page are read from the live catalog and cannot drift from what the API accepts. Field notes were captured on 2026-08-28.