Get Climate Data
get_climate_dataWorld Bank CCKP climate data for any country: historical observations and CMIP6 climate-model projections. Returns mean temperature, max/min temperature, or precipitation, by emissions scenario. Pass the components as separate args — this tool assembles the brittle composite "indicator code" for you. Values are returned keyed by ISO3 country code; the inner key is "-07" (annual/period) or per-season months.
WORKED EXAMPLES (all verified live):
Historical annual mean temperature for the USA (defaults): {"geography":"USA"} => tas climatology over 1995-2014, ~10.2°C.
Projected warming (anomaly) for the USA mid-century under a high scenario: {"geography":"USA","scenario":"ssp585","period":"2040-2059","product":"anomaly"} => ~2.4°C above baseline.
Historical annual precipitation for all countries: {"geography":"all_countries","variable":"pr","product":"climatology","period":"1995-2014","scenario":"historical"} => mm/year per country.
If assembly ever fails for an exotic combination, pass the full composite string via indicator_code instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | Time period. For historical use "1995-2014" (the default when scenario=historical). For projections use a 20-year window e.g. "2020-2039","2040-2059","2060-2079","2080-2099". Defaults to 1995-2014 (historical) or 2040-2059 (projection). | |
| product | No | What to return: "climatology" (absolute values, verified) or "anomaly" (change vs reference period — use with a projection scenario, verified). Default "climatology". | |
| scenario | No | Emissions/scenario. "historical" for observed past, or a projection SSP: "ssp119","ssp126","ssp245","ssp370","ssp585" (low→high emissions). Default "historical". | |
| variable | No | Climate variable. Verified: "tas" (mean temp °C), "tasmax" (max temp), "tasmin" (min temp), "pr" (precipitation mm/year). Default "tas". | |
| geography | No | ISO3 country code (e.g. "USA", "BRA"), or "all_countries" for every country. Default "all_countries". | |
| collection | No | Dataset collection. Default and only fully API-verified value is "cmip6-x0.25" (model-derived, covers historical + projections). The portal lists "era5-x0.25"/"cru-x0.5" observation collections but those did not return data through this JSON API in testing — prefer cmip6-x0.25. | |
| aggregation | No | "annual" (single value) or "seasonal" (four season values), verified. Default "annual". | |
| indicator_code | No | Optional raw 11-token composite code to pass through verbatim, bypassing assembly. Order: collection_type_variable_product_aggregation_period_percentile_scenario_model_modelCalculation_statistic. Example: "cmip6-x0.25_climatology_tas_climatology_annual_1995-2014_median_historical_ensemble_all_mean". |