GnistAI GnistAI
Log in

World Bank

World Bank development indicators — poverty, health, education, and economic data by country.

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 5 tools tools 5 5 type: api wrapper type type api wrapper api wrapper lifecycle: maintained lifecycle lifecycle maintained maintained Economics

Data source: World Bank Open Data

REST Bridge Endpoint https://context.gnist.ai/rest/worldbank/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (5)

get_indicator

Fetch a time series for a World Bank indicator.

Args:
country_code: ISO 3166-1 alpha-2 or alpha-3 country code (e.g. "US", "USA", "NO").
Use "WLD" for global aggregates or "all" for every country.
indicator_code: World Bank indicator ID (e.g. "NY.GDP.MKTP.CD" for GDP,
"SP.POP.TOTL" for population). Use search_indicators to find codes.
year_from: Start year (inclusive). If omitted, uses mrv instead.
year_to: End year (inclusive). If omitted, uses year_from as single year.
mrv: Most recent values to return (1–50, default 10). Used when year_from/year_to are not set.

Returns:
Time series of indicator values with date, value, and country metadata.
Values may be null for years where data is unavailable.

ParameterTypeRequiredDescription
country_codestringrequiredISO 3166-1 alpha-2 or alpha-3 country code (e.g. "US", "USA", "NO"). Use "WLD" for global aggregates or "all" for every country.
indicator_codestringrequiredWorld Bank indicator ID (e.g. "NY.GDP.MKTP.CD" for GDP, "SP.POP.TOTL" for population). Use search_indicators to find codes.
year_fromanyoptionalStart year (inclusive). If omitted, uses mrv instead.
year_toanyoptionalEnd year (inclusive). If omitted, uses year_from as single year.
mrvintegeroptionalMost recent values to return (1–50, default 10). Used when year_from/year_to are not set. (default: 10)
Request Body
{
  "country_code": "NO",
  "indicator_code": "example"
}
search_indicators

Search the World Bank indicator catalog by keyword.

Covers 1,400+ socioeconomic indicators including GDP, population, health,
education, trade, energy, environment, and more.

Args:
query: Search term (e.g. "gdp", "literacy rate", "co2 emissions").
per_page: Number of results to return (1–50, default 20).

Returns:
List of matching indicators with ID, name, unit, and topic classification.
Use the indicator id field with get_indicator or compare_countries.

ParameterTypeRequiredDescription
querystringrequiredSearch term (e.g. "gdp", "literacy rate", "co2 emissions").
per_pageintegeroptionalNumber of results to return (1–50, default 20). (default: 20)
Request Body
{
  "query": "example"
}
country_profile

Get a snapshot of key development indicators for a country.

Covers: GDP (total and per capita), population, life expectancy, and CO2 emissions.
Data comes from World Bank Open Data (CC-BY-4.0).

Args:
country_code: ISO 3166-1 alpha-2 or alpha-3 country code (e.g. "NO", "USA", "DE").
year: Specific year to retrieve. Defaults to most recent available data.

Returns:
Country profile with GDP, population, life expectancy, and CO2 figures.
Any field may be null if the World Bank has no data for that country/year combination.

ParameterTypeRequiredDescription
country_codestringrequiredISO 3166-1 alpha-2 or alpha-3 country code (e.g. "NO", "USA", "DE").
yearanyoptionalSpecific year to retrieve. Defaults to most recent available data.
Request Body
{
  "country_code": "NO"
}
compare_countries

Compare one indicator across multiple countries for a given year.

Args:
indicator_code: World Bank indicator ID (e.g. "NY.GDP.MKTP.CD").
Use search_indicators to find the right code.
country_codes: List of ISO 3166-1 alpha-2 or alpha-3 codes (e.g. ["US", "DE", "JP"]).
Maximum 20 countries per request.
year: The year to compare (e.g. 2022).

Returns:
Indicator values for each country in the requested year.
Values may be null if data is unavailable for a country/year pair.

ParameterTypeRequiredDescription
indicator_codestringrequiredWorld Bank indicator ID (e.g. "NY.GDP.MKTP.CD"). Use search_indicators to find the right code.
country_codeslist[string]requiredList of ISO 3166-1 alpha-2 or alpha-3 codes (e.g. ["US", "DE", "JP"]). Maximum 20 countries per request.
yearintegerrequiredThe year to compare (e.g. 2022).
Request Body
{
  "indicator_code": "example",
  "country_codes": [
    "example"
  ],
  "year": 1
}
report_feedback

Report a bug, feature request, or general feedback for this data source.

Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.

Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
Request Body
{
  "feedback": "example"
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/rest/worldbank/get_indicator" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"country_code": "example", "indicator_code": "example"}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/rest/worldbank/get_indicator",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={
  "country_code": "example",
  "indicator_code": "example"
},
)
print(resp.json())

Related Toolkits (Economics)

Resources