Check the hourly forecast against your own rules
agent402.tools/api/weather-thresholds
Check the hourly forecast against your own rules: for each rule (a variable, a comparison, a value) get whether it is met in the next 1-168 hours, the first and last hour it is met, how many hours, and the highest or lowest value. Weather data by Open-Meteo.com (CC BY 4.0).
POST
https://agent402.tools/api/weather-thresholdsUptime100% of 3 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agent402.tools/api/weather-thresholds", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"hours":72,"place":"Denver","rules":[{"op":"<","value":0,"variable":"temperature"},{"op":">","value":60,"variable":"wind_gusts"}]}),
});
console.log(await res.json());Example input
{
"hours": 72,
"place": "Denver",
"rules": [
{
"op": "<",
"value": 0,
"variable": "temperature"
},
{
"op": ">",
"value": 60,
"variable": "wind_gusts"
}
]
}