World Bank indicator for the Philippines
get_world_bank_indicatorRetrieve Philippine World Bank macro and social indicators by code or alias, with validation and clear error reporting.
Instructions
World Bank macroeconomic and social indicator for the Philippines.
Accepts a World Bank indicator code, such as "NY.GDP.MKTP.CD", or a friendly alias, such as "gdp", "poverty_ratio", "inflation", or "urban_population_pct". The tool checks the indicator code shape before it reaches the URL, so a bad value cannot redirect the request to another country's data. Examples:
get_world_bank_indicator("gdp") # GDP, latest 20 years get_world_bank_indicator("NY.GDP.MKTP.CD", per_page=5) # same indicator, 5 years get_world_bank_indicator("poverty_ratio") # poverty headcount ratio
On failure: an indicator code or alias that fails the shape check returns data_status "invalid_request", with validation_error true and observations []. An upstream fetch failure returns data_status "unavailable", with upstream_error true, observations [], and the real error text in caveats. A row with a non-numeric or non-finite value (NaN, inf) is skipped and counted in caveats. A response where every row is non-numeric or non-finite returns data_status "unavailable" instead of a false empty answer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| per_page | No | Number of observations to return (latest first, default 20). | |
| indicator | Yes | WB code or alias. See INDICATOR_ALIASES in source for the curated list of common indicators. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||