Climate projection by year, 1950-2050
GET /api/climate-projectionClimate model projection for any point on land, 1950 to 2050: for each year, the median and range across seven CMIP6 high-resolution models of one measure...
Details
Climate model projection for any point on land, 1950 to 2050: for each year, the median and range across seven CMIP6 high-resolution models of one measure (mean, high or low temperature with hot or frost days, or precipitation with heavy-rain days and the longest dry spell), plus each model's mean over the period. Up to 10 years a call, by coordinates, read at the 0.25 degree cell. Model output on a high-emissions pathway, not a forecast or advice. ?lat=41.88&lon=-87.63&startYear=2041&endYear=2050&variable=temperature_max. Weather data by Open-Meteo.com (CC BY 4.0). Climate model data from the CMIP6 program (CC BY 4.0).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
lat | number | yes | Latitude, -90 to 90 Also accepted as latitude. The example sends 41.8781. |
lon | number | yes | Longitude, -180 to 180 Also accepted as lng, long, longitude. The example sends -87.6298. |
startYear | integer | no | First year, 1950 to 2050 (default: 9 years before endYear) The example sends 2041. |
endYear | integer | no | Last year, 1950 to 2050 (default 2050); at most 10 years in all The example sends 2050. |
variable | string (one of: temperature_mean, temperature_max, temperature_min, precipitation) | no | The measure: temperature_mean (default), temperature_max (with hot days), temperature_min (with frost days) or precipitation (with heavy-rain days and the longest dry spell) One of temperature_mean, temperature_max, temperature_min, precipitation. |
units | string | no | celsius (default) or fahrenheit for temperatures; precipitation in mm |
Example request
curl -i "https://agent402.tools/api/climate-projection?lat=41.8781&lon=-87.6298&startYear=2041&endYear=2050&variable=temperature_max"
Watch a call get paid
GET /api/climate-projection$0.005 USDCPAYMENT-SIGNATUREon 14 chains200 OKAgent402-ReceiptEd25519Example response
{
"lat": 41.8781,
"lon": -87.6298,
"cell": {
"lat": 42,
"lon": -87.75
},
"variable": "temperature_max",
"startYear": 2041,
"endYear": 2050,
"units": "°C",
"metrics": {
"mean": "annual mean of the daily high",
"hotDays": "days with a high of 30 °C (86 °F) or more"
},
"summary": {
"models": 6,
"mean": {
"median": 15.6,
"min": 15.3,
"max": 16
},
"hotDays": {
"median": 44.4,
"min": 37.1,
"max": 48.2
}
},
"years": [
{
"year": 2041,
"models": 7,
"mean": {
"median": 15.3,
"min": 15,
"max": 16.7
},
"hotDays": {
"median": 43,
"min": 31,
"max": 61
}
}
],
"models": [
{
"model": "CMCC-CM2-VHR4",
"institution": "Fondazione Centro Euro-Mediterraneo sui Cambiamenti Climatici (Italy)",
"years": 10,
"mean": 16,
"hotDays": 41.7
}
],
"coverage": {
"returned": 69,
"matched": 70,
"complete": false,
"truncated": true,
"missing": [
{
"model": "EC-Earth3P-HR",
"years": [
2050
]
}
]
},
"kind": "climate model output",
"note": "Climate model output, not a forecast, a measurement or advice: seven CMIP6 HighResMIP model runs on a high-emissions pathway (close to RCP8.5), downscaled and bias-corrected by Open-Meteo. A single year is one model's weather, not a prediction for that year; compare multi-year periods and read the range across models.",
"source": "climate-api.open-meteo.com (CC BY 4.0)",
"credit": "Climate model data from the CMIP6 program of the World Climate Research Programme (HighResMIP runs by the modeling groups named in this answer, CC BY 4.0), downscaled by Open-Meteo and aggregated by year for this answer. The modeling groups and data providers make no warranty, express or implied.",
"attributionText": "Weather data by Open-Meteo.com (CC BY 4.0).",
"sourceUrl": "https://open-meteo.com/",
"licenseUrl": "https://creativecommons.org/licenses/by/4.0/"
}| Field | Type | Always present | In the example |
|---|---|---|---|
lat | number | yes | 41.8781 |
lon | number | yes | -87.6298 |
cell | object | yes | 2 fields: lat, lon |
variable | string | yes | temperature_max |
startYear | number | yes | 2041 |
endYear | number | yes | 2050 |
units | string | yes | °C |
metrics | object | yes | 2 fields: mean, hotDays |
summary | object | yes | 3 fields: models, mean, hotDays |
years | array of objects | yes | 1 item in the example |
models | array of objects | yes | 1 item in the example |
coverage | object | yes | 5 fields: returned, matched, complete, truncated, missing |
kind | string | yes | climate model output |
note | string | yes | Climate model output, not a forecast, a measurement or advice: seven CMIP6 Hi... |
source | string | yes | climate-api.open-meteo.com (CC BY 4.0) |
credit | string | yes | Climate model data from the CMIP6 program of the World Climate Research Progr... |
attributionText | string | yes | Weather data by Open-Meteo.com (CC BY 4.0). |
sourceUrl | string | yes | https://open-meteo.com/ |
licenseUrl | string | yes | https://creativecommons.org/licenses/by/4.0/ |
From an MCP client
catalog.call {
"slug": "climate-projection",
"params": {
"lat": 41.8781,
"lon": -87.6298,
"startYear": 2041,
"endYear": 2050,
"variable": "temperature_max"
}
}Hosted connector (https://agent402.tools/mcp): paid in the call. Stdio package (npx -y agent402-mcp@0.19.2): pays from a wallet or AGENT402_CREDITS_KEY.
Errors and behavior
- Pay $0.005 per call over x402 or MPP. Wallet-only: this tool reaches the network or stored state, so it has no proof-of-work tier. A prepaid card-credits key (
Authorization: Bearer a402_...) also pays it. - Required:
latandlon; a rejected input answers 4xx witherror,tool,expected,requiredandexample. - On this route, a call ending in any status of 400 or above is not charged over x402, MPP or a credits key. A Tempo push credential pays before the call; a failure is a refund owed.
- A
POSTwith a JSON body is served as this GET. - An
Idempotency-Keyreplays the first 200 uncharged (an answer larger than 1 MB is not replayed).
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.005" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.AGENT_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/climate-projection?lat=41.8781&lon=-87.6298&startYear=2041&endYear=2050&variable=temperature_max");Get a wallet or run npx -y agent402-mcp@0.19.2 wallet new.
The quote (Python)
import base64, json, urllib.error, urllib.request
req = urllib.request.Request("https://agent402.tools/api/climate-projection?lat=41.8781&lon=-87.6298&startYear=2041&endYear=2050&variable=temperature_max", method="GET", headers={})
try:
urllib.request.urlopen(req)
except urllib.error.HTTPError as e:
quote = json.loads(base64.b64decode(e.headers["PAYMENT-REQUIRED"]))
print(e.code, [(a["network"], a["amount"]) for a in quote["accepts"]]) # the price, per chain, in base units