World Bank API
The World Bank Data API returns economic and development indicators as clean JSON.
🤖 Using an AI assistant? Copy this link into ChatGPT / Claude / Cursor — it reads every endpoint and parameter instantly and tells you if this API fits your use case.
The primary indicator endpoint returns a time series per indicator and country with dated values, a latest value and observation count, and you can pull a country, search indicators, get indicator metadata, a country_profile, topic indicators and reference data. It is built for research, dashboards and data products that need authoritative World Bank indicators without the raw API's paging. One ReefAPI key, one shared credit pool, the standard { ok, data, meta, error } envelope.
Real request and response JSON
Captured from the indexed primary action, indicator, on .
{
"method": "POST",
"url": "https://api.reefapi.com/worldbank/v1/indicator",
"headers": {
"x-api-key": "$REEF_KEY",
"content-type": "application/json"
},
"body": {
"country": "US",
"indicator": "NY.GDP.MKTP.CD",
"date": "2015:2022"
}
}{
"ok": true,
"meta": {
"api": "worldbank",
"endpoint": "indicator",
"mode": "live",
"latency_ms": 10065.8,
"record_count": 8,
"bytes": 1780,
"cache_hit": false,
"completeness_pct": 100,
"requests": 1,
"attribution": "Data source: World Bank — World Development Indicators and related collections (https://data.worldbank.org), licensed under Creative Commons Attribution 4.0 International (CC BY 4.0, https://creativecommons.org/licenses/by/4.0/). The World Bank does not necessarily endorse, and is not responsible for, any derived product or interpretation.",
"observations": 8,
"series_count": 1
},
"data": {
"data": [
{
"indicator_code": "NY.GDP.MKTP.CD",
"indicator_name": "GDP (current US$)",
"metric": "gdp",
"country": "United States",
"country_id": "US",
"countryiso3code": "USA",
"unit": "",
"last_updated": "[redacted-phone]",
"series": [
{
"date": "[trimmed-depth]",
"value": "[trimmed-depth]"
},
{
"date": "[trimmed-depth]",
"value": "[trimmed-depth]"
},
{
"date": "[trimmed-depth]",
"value": "[trimmed-depth]"
}
],
"observations": 8,
"latest_value": 26054614000000,
"latest_date": "2022"
}
],
"series_count": 1,
"indicators": [
"NY.GDP.MKTP.CD"
],
"countries": [
"US"
],
"source": "World Bank"
}
}What the World Bank API does
| Action | Description | Concrete use case | Key params |
|---|---|---|---|
| indicator | time-series for one+ indicators (code or shortcut) across one+ countries/all; date/mrv/mrnev, rank | Fintech apps call indicator to get time-series for one+ indicators (code or shortcut) across one+ countries/all; date/mrv/mrnev,…. | country, indicator, date, mrv, mrnev, ... |
| country | country metadata for codes/all or filtered by region/income_level/lending_type | Portfolio dashboards call country to get country metadata for codes/all or filtered by region/income_level/lending_type. | country, region, income_level, lending_type, exclude_aggregates, ... |
| search_indicators | local keyword search over the indicator catalog (WDI default; full=all sources) | Analysts call search_indicators to get local keyword search over the indicator catalog (WDI default; full=all sources). | query, source, full, topic, limit |
| indicator_metadata | definition/source/organization/topics for one+ indicator codes/aliases | Data teams call indicator_metadata to get definition/source/organization/topics for one+ indicator codes/aliases. | indicator |
| country_profile | one-call headline snapshot (most-recent ~10 key metrics) for one+ countries | Fintech apps call country_profile to get one-call headline snapshot (most-recent ~10 key metrics) for one+ countries. | country, metrics |
| shortcuts | list the metric->indicator-code map, or metric=<key>&country=<code> to fetch directly | Portfolio dashboards call shortcuts to list the metric->indicator-code map, or metric=<key>&country=<code> to fetch directly. | metric, country, date, mrv, mrnev |
| reference | reference lists: regions | income_levels | lending_types | sources | topics | Analysts call reference to get reference lists. | kind |
| topic_indicators | browse every indicator in a World Bank topic (Health, Economy, Climate, etc.) by topic id or name; optional keyword filter | Data teams call topic_indicators to get browse every indicator in a World Bank topic (Health, Economy, Climate, etc.) by topic id or…. | topic, query, limit, per_page, max_pages |
Call indicator from your stack
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"])const res = await fetch("https://api.reefapi.com/worldbank/v1/indicator", {
method: "POST",
headers: {
"x-api-key": process.env.REEF_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"country": "US",
"indicator": "NY.GDP.MKTP.CD",
"date": "2015:2022"
}),
});
const { ok, data, meta, error } = await res.json();Ask your MCP-connected assistant: call reefapi.worldbank.indicator with {"country":"US","indicator":"NY.GDP.MKTP.CD","date":"2015:2022"}.Who uses this API and why
- 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.
Questions developers ask before integrating
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.
Is the World Bank API a World Bank scraper?
It is the managed alternative to a DIY World Bank scraper. Instead of building and maintaining your own scraper — proxies, headless browsers, captcha and constant breakage — you call one ReefAPI endpoint and get the same global economic indicators by country back as clean JSON.
Why does my World Bank scraper keep getting blocked?
Most World Bank scrapers break on anti-bot defenses, rate limits and IP bans that need rotating residential proxies and browser fingerprinting to clear. ReefAPI handles all of that for you — no proxies, no captchas, no maintenance — and returns live JSON. Blocked or failed calls are free.