data
World Bank CLI for AI Agents
Use the World Bank CLI from KosmoKrator to call World Bank tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.World Bank CLI Setup
World Bank can be configured headlessly with `kosmokrator integrations:configure worldbank`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure worldbank --enable --read allow --write ask --json
kosmokrator integrations:doctor worldbank --json
kosmokrator integrations:status --json Credentials
Authentication type: No credentials none. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
No credentials are required.
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call worldbank.worldbank_countries '{"query":"example_query","region":"example_region","income_level":"example_income_level"}' --json kosmo integrations:worldbank worldbank_countries '{"query":"example_query","region":"example_region","income_level":"example_income_level"}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs worldbank --json
kosmo integrations:docs worldbank.worldbank_countries --json
kosmo integrations:schema worldbank.worldbank_countries --json
kosmo integrations:search "World Bank" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
worldbank.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).
read - Parameters
- query, region, income_level
kosmo integrations:call worldbank.worldbank_countries '{"query":"example_query","region":"example_region","income_level":"example_income_level"}' --json kosmo integrations:worldbank worldbank_countries '{"query":"example_query","region":"example_region","income_level":"example_income_level"}' --json worldbank.worldbank_country_info
Get detailed information for a specific country by ISO code, including region, income level, lending type, capital city, and coordinates.
read - Parameters
- code
kosmo integrations:call worldbank.worldbank_country_info '{"code":"example_code"}' --json kosmo integrations:worldbank worldbank_country_info '{"code":"example_code"}' --json worldbank.worldbank_regions
List World Bank aggregate regions and region codes used for filtering country and aggregate data.
read - Parameters
- page, per_page
kosmo integrations:call worldbank.worldbank_regions '{"page":1,"per_page":1}' --json kosmo integrations:worldbank worldbank_regions '{"page":1,"per_page":1}' --json worldbank.worldbank_income_levels
List World Bank income level codes such as HIC, UMC, LMC, and LIC.
read - Parameters
- none
kosmo integrations:call worldbank.worldbank_income_levels '{}' --json kosmo integrations:worldbank worldbank_income_levels '{}' --json worldbank.worldbank_lending_types
List World Bank lending type codes such as IBD, IDX, IDB, and LNX.
read - Parameters
- none
kosmo integrations:call worldbank.worldbank_lending_types '{}' --json kosmo integrations:worldbank worldbank_lending_types '{}' --json worldbank.worldbank_sources
List World Bank data sources, including source IDs needed for source-specific and multi-indicator queries.
read - Parameters
- page, per_page
kosmo integrations:call worldbank.worldbank_sources '{"page":1,"per_page":1}' --json kosmo integrations:worldbank worldbank_sources '{"page":1,"per_page":1}' --json worldbank.worldbank_source_indicators
List indicator series available in a World Bank data source. Source 2 is World Development Indicators.
read - Parameters
- source_id, page, per_page
kosmo integrations:call worldbank.worldbank_source_indicators '{"source_id":"example_source_id","page":1,"per_page":1}' --json kosmo integrations:worldbank worldbank_source_indicators '{"source_id":"example_source_id","page":1,"per_page":1}' --json worldbank.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}
read - Parameters
- query
kosmo integrations:call worldbank.worldbank_indicators '{"query":"example_query"}' --json kosmo integrations:worldbank worldbank_indicators '{"query":"example_query"}' --json worldbank.worldbank_indicator_info
Get metadata for a World Bank indicator code, including source, source note, source organization, and topics.
read - Parameters
- indicator
kosmo integrations:call worldbank.worldbank_indicator_info '{"indicator":"example_indicator"}' --json kosmo integrations:worldbank worldbank_indicator_info '{"indicator":"example_indicator"}' --json worldbank.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.
read - Parameters
- topic_id
kosmo integrations:call worldbank.worldbank_topics '{"topic_id":"example_topic_id"}' --json kosmo integrations:worldbank worldbank_topics '{"topic_id":"example_topic_id"}' --json worldbank.worldbank_languages
List global and local language codes supported by the World Bank API v2.
read - Parameters
- none
kosmo integrations:call worldbank.worldbank_languages '{}' --json kosmo integrations:worldbank worldbank_languages '{}' --json worldbank.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.
read - Parameters
- indicator, countries, date_range, mrnev, per_page
kosmo integrations:call worldbank.worldbank_get_data '{"indicator":"example_indicator","countries":"example_countries","date_range":"example_date_range","mrnev":"example_mrnev","per_page":"example_per_page"}' --json kosmo integrations:worldbank worldbank_get_data '{"indicator":"example_indicator","countries":"example_countries","date_range":"example_date_range","mrnev":"example_mrnev","per_page":"example_per_page"}' --json worldbank.worldbank_multi_indicator_data
Fetch data for multiple semicolon-separated indicators from a single World Bank source. The V2 API allows up to 60 indicators.
read - Parameters
- indicators, countries, source, date_range, footnote, per_page
kosmo integrations:call worldbank.worldbank_multi_indicator_data '{"indicators":"example_indicators","countries":"example_countries","source":"example_source","date_range":"example_date_range","footnote":true,"per_page":1}' --json kosmo integrations:worldbank worldbank_multi_indicator_data '{"indicators":"example_indicators","countries":"example_countries","source":"example_source","date_range":"example_date_range","footnote":true,"per_page":1}' --json worldbank.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.
read - Parameters
- indicator, countries, date_range
kosmo integrations:call worldbank.worldbank_compare_data '{"indicator":"example_indicator","countries":"example_countries","date_range":"example_date_range"}' --json kosmo integrations:worldbank worldbank_compare_data '{"indicator":"example_indicator","countries":"example_countries","date_range":"example_date_range"}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
worldbank.worldbank_countries 3 parameters
kosmo integrations:schema worldbank.worldbank_countries --json | Parameter | 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). |
worldbank.worldbank_country_info 1 parameters
kosmo integrations:schema worldbank.worldbank_country_info --json | Parameter | Type | Required | Description |
|---|---|---|---|
code | string | yes | ISO country code (e.g. "US", "CN", "DE"). |
worldbank.worldbank_regions 2 parameters
kosmo integrations:schema worldbank.worldbank_regions --json | Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Optional page number. |
per_page | integer | no | Optional page size. Defaults to 100. |
worldbank.worldbank_income_levels 0 parameters
kosmo integrations:schema worldbank.worldbank_income_levels --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
worldbank.worldbank_lending_types 0 parameters
kosmo integrations:schema worldbank.worldbank_lending_types --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
worldbank.worldbank_sources 2 parameters
kosmo integrations:schema worldbank.worldbank_sources --json | Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Optional page number. |
per_page | integer | no | Optional page size. Defaults to 100. |
worldbank.worldbank_source_indicators 3 parameters
kosmo integrations:schema worldbank.worldbank_source_indicators --json | Parameter | Type | Required | Description |
|---|---|---|---|
source_id | string | yes | World Bank source ID, such as 2 for World Development Indicators. |
page | integer | no | Optional page number. |
per_page | integer | no | Optional page size. Defaults to 100. |
worldbank.worldbank_indicators 1 parameters
kosmo integrations:schema worldbank.worldbank_indicators --json | Parameter | Type | Required | Description |
|---|---|---|---|
query | string | no | Search keyword for indicators (e.g. "GDP", "inflation", "education"). If omitted, returns common indicators. |
worldbank.worldbank_indicator_info 1 parameters
kosmo integrations:schema worldbank.worldbank_indicator_info --json | Parameter | Type | Required | Description |
|---|---|---|---|
indicator | string | yes | World Bank indicator code, such as NY.GDP.MKTP.CD. |
worldbank.worldbank_topics 1 parameters
kosmo integrations:schema worldbank.worldbank_topics --json | Parameter | Type | Required | Description |
|---|---|---|---|
topic_id | string | no | Topic ID to list indicators for that topic. Omit to see all available topics. |
worldbank.worldbank_languages 0 parameters
kosmo integrations:schema worldbank.worldbank_languages --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
worldbank.worldbank_get_data 5 parameters
kosmo integrations:schema worldbank.worldbank_get_data --json | Parameter | Type | Required | Description |
|---|---|---|---|
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.worldbank_multi_indicator_data 6 parameters
kosmo integrations:schema worldbank.worldbank_multi_indicator_data --json | Parameter | Type | Required | Description |
|---|---|---|---|
indicators | string | yes | Semicolon-separated indicator codes, such as SI.POV.DDAY;SP.POP.TOTL. |
countries | string | no | Semicolon-separated country codes. Defaults to all. |
source | string | no | Source ID. Defaults to 2 for World Development Indicators. |
date_range | string | no | Date range such as 2000:2010. |
footnote | boolean | no | Include footnote detail when true. |
per_page | integer | no | Optional page size. Defaults to 100. |
worldbank.worldbank_compare_data 3 parameters
kosmo integrations:schema worldbank.worldbank_compare_data --json | Parameter | Type | Required | Description |
|---|---|---|---|
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. |
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.