KosmoKrator

data

World Bank Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the World Bank KosmoKrator integration.

6 functions 6 read 0 write No credentials auth

Lua Namespace

Agents call this integration through app.integrations.worldbank.*. Use lua_read_doc("integrations.worldbank") inside KosmoKrator to discover the same reference at runtime.

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

Search indicators by keyword within World Development Indicators (source 2) — Lua API Reference

worldbank_compare_data

Compare a single economic indicator across multiple countries. Returns the most recent value for each country side-by-side. Use worldbank_indicators to find indicator codes..

Parameters

NameTypeRequiredDescription
indicatorstringyesWorld Bank indicator code (e.g.
countriesstringyesSemicolon-separated ISO country codes (e.g.
date_rangestringnoDate range filter (e.g.

Example

local result = app.integrations.worldbank.worldbank_compare_data({
  indicator = ""
  countries = ""
  date_range = ""
})

worldbank_countries

List or search countries from the World Bank. Optional query filters by name. Filter by region (EAS, ECS, LCN, MEA, NAC, SAS, SSF) or income level (HIC, UMC, LMC, LIC)..

Parameters

NameTypeRequiredDescription
querystringnoSearch query — country name or ISO code to filter results.
regionstringnoFilter by region code: EAS (East Asia), ECS (Europe & Central Asia), LCN (Latin America), MEA (Middle East), NAC (North America), SAS (South Asia), SSF (Sub-Saharan Africa).
income_levelstringnoFilter by income level: HIC (High), UMC (Upper Middle), LMC (Lower Middle), LIC (Low).

Example

local result = app.integrations.worldbank.worldbank_countries({
  query = ""
  region = ""
  income_level = ""
})

worldbank_country_info

Get detailed information for a specific country by ISO code, including region, income level, lending type, capital city, and coordinates..

Parameters

NameTypeRequiredDescription
codestringyesISO country code (e.g.

Example

local result = app.integrations.worldbank.worldbank_country_info({
  code = ""
})

worldbank_get_data

Fetch economic indicator data for one or more countries from the World Bank. Supports date ranges and most-recent-value mode. Use worldbank_indicators to find indicator codes and worldbank_countries to find ISO codes..

Parameters

NameTypeRequiredDescription
indicatorstringyesWorld Bank indicator code (e.g.
countriesstringnoSemicolon-separated ISO country codes (e.g.
date_rangestringnoDate range filter (e.g.
mrnevstringnoNumber of most recent non-empty values to return per country (default:
per_pagestringnoNumber of results per page (default:

Example

local result = app.integrations.worldbank.worldbank_get_data({
  indicator = ""
  countries = ""
  date_range = ""
})

worldbank_indicators

No description.

Parameters

NameTypeRequiredDescription
querystringnoSearch keyword for indicators (e.g.

Example

local result = app.integrations.worldbank.worldbank_indicators({
  query = ""
})

worldbank_topics

List the 21 World Bank topic categories (e.g., Education, Health, Economy). Optionally provide a topic ID to list indicators in that topic..

Parameters

NameTypeRequiredDescription
topic_idstringnoTopic ID to list indicators for that topic. Omit to see all available topics.

Example

local result = app.integrations.worldbank.worldbank_topics({
  topic_id = ""
})
Raw agent markdown
# Search indicators by keyword within World Development Indicators (source 2) — Lua API Reference

## worldbank_compare_data

Compare a single economic indicator across multiple countries. Returns the most recent value for each country side-by-side. Use `worldbank_indicators` to find indicator codes..

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `indicator` | string | yes | World Bank indicator code (e.g.  |
| `countries` | string | yes | Semicolon-separated ISO country codes (e.g.  |
| `date_range` | string | no | Date range filter (e.g.  |

### Example

```lua
local result = app.integrations.worldbank.worldbank_compare_data({
  indicator = ""
  countries = ""
  date_range = ""
})
```

## worldbank_countries

List or search countries from the World Bank. Optional query filters by name. Filter by region (EAS, ECS, LCN, MEA, NAC, SAS, SSF) or income level (HIC, UMC, LMC, LIC)..

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `query` | string | no | Search query — country name or ISO code to filter results. |
| `region` | string | no | Filter by region code: EAS (East Asia), ECS (Europe & Central Asia), LCN (Latin America), MEA (Middle East), NAC (North America), SAS (South Asia), SSF (Sub-Saharan Africa). |
| `income_level` | string | no | Filter by income level: HIC (High), UMC (Upper Middle), LMC (Lower Middle), LIC (Low). |

### Example

```lua
local result = app.integrations.worldbank.worldbank_countries({
  query = ""
  region = ""
  income_level = ""
})
```

## worldbank_country_info

Get detailed information for a specific country by ISO code, including region, income level, lending type, capital city, and coordinates..

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `code` | string | yes | ISO country code (e.g.  |

### Example

```lua
local result = app.integrations.worldbank.worldbank_country_info({
  code = ""
})
```

## worldbank_get_data

Fetch economic indicator data for one or more countries from the World Bank. Supports date ranges and most-recent-value mode. Use `worldbank_indicators` to find indicator codes and `worldbank_countries` to find ISO codes..

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `indicator` | string | yes | World Bank indicator code (e.g.  |
| `countries` | string | no | Semicolon-separated ISO country codes (e.g.  |
| `date_range` | string | no | Date range filter (e.g.  |
| `mrnev` | string | no | Number of most recent non-empty values to return per country (default:  |
| `per_page` | string | no | Number of results per page (default:  |

### Example

```lua
local result = app.integrations.worldbank.worldbank_get_data({
  indicator = ""
  countries = ""
  date_range = ""
})
```

## worldbank_indicators

No description.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `query` | string | no | Search keyword for indicators (e.g.  |

### Example

```lua
local result = app.integrations.worldbank.worldbank_indicators({
  query = ""
})
```

## worldbank_topics

List the 21 World Bank topic categories (e.g., Education, Health, Economy). Optionally provide a topic ID to list indicators in that topic..

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `topic_id` | string | no | Topic ID to list indicators for that topic. Omit to see all available topics. |

### Example

```lua
local result = app.integrations.worldbank.worldbank_topics({
  topic_id = ""
})
```

Metadata-Derived Lua Example

local result = app.integrations.worldbank.worldbank_countries({
  query = "example_query",
  region = "example_region",
  income_level = "example_income_level"
})
print(result)

Functions

worldbank_countries

List or search countries from the World Bank. Optional query filters by name. Filter by region (EAS, ECS, LCN, MEA, NAC, SAS, SSF) or income level (HIC, UMC, LMC, LIC).

Operation
Read read
Full name
worldbank.worldbank_countries
ParameterTypeRequiredDescription
query string no Search query — country name or ISO code to filter results.
region string no Filter by region code: EAS (East Asia), ECS (Europe & Central Asia), LCN (Latin America), MEA (Middle East), NAC (North America), SAS (South Asia), SSF (Sub-Saharan Africa).
income_level string no Filter by income level: HIC (High), UMC (Upper Middle), LMC (Lower Middle), LIC (Low).

worldbank_indicators

Search economic indicators by keyword. If no query is provided, returns common indicators. Use the indicator code with `worldbank_get_data` to fetch data. Common indicator codes: {$indicators}

Operation
Read read
Full name
worldbank.worldbank_indicators
ParameterTypeRequiredDescription
query string no Search keyword for indicators (e.g. "GDP", "inflation", "education"). If omitted, returns common indicators.

worldbank_topics

List the 21 World Bank topic categories (e.g., Education, Health, Economy). Optionally provide a topic ID to list indicators in that topic.

Operation
Read read
Full name
worldbank.worldbank_topics
ParameterTypeRequiredDescription
topic_id string no Topic ID to list indicators for that topic. Omit to see all available topics.

worldbank_country_info

Get detailed information for a specific country by ISO code, including region, income level, lending type, capital city, and coordinates.

Operation
Read read
Full name
worldbank.worldbank_country_info
ParameterTypeRequiredDescription
code string yes ISO country code (e.g. "US", "CN", "DE").

worldbank_get_data

Fetch economic indicator data for one or more countries from the World Bank. Supports date ranges and most-recent-value mode. Use `worldbank_indicators` to find indicator codes and `worldbank_countries` to find ISO codes.

Operation
Read read
Full name
worldbank.worldbank_get_data
ParameterTypeRequiredDescription
indicator string yes World Bank indicator code (e.g. "NY.GDP.MKTP.CD", "SP.POP.TOTL"). Use worldbank_indicators to find codes.
countries string no Semicolon-separated ISO country codes (e.g. "US;CN;DE"). Use "all" for global data (default).
date_range string no Date range filter (e.g. "2020:2023", "2023", "2000:2023"). Omit to use mrnev (most recent value).
mrnev string no Number of most recent non-empty values to return per country (default: "1" when no dateRange).
per_page string no Number of results per page (default: "100", max: 500).

worldbank_compare_data

Compare a single economic indicator across multiple countries. Returns the most recent value for each country side-by-side. Use `worldbank_indicators` to find indicator codes.

Operation
Read read
Full name
worldbank.worldbank_compare_data
ParameterTypeRequiredDescription
indicator string yes World Bank indicator code (e.g. "NY.GDP.MKTP.CD", "SP.POP.TOTL"). Use worldbank_indicators to find codes.
countries string yes Semicolon-separated ISO country codes (e.g. "US;CN;DE;JP").
date_range string no Date range filter (e.g. "2020:2023"). Omit to get most recent value per country.