Skip to content

Weather risk brief (many sites)

quoted per request from $0.018USDC via x402POST /api/weather-risk-brief

One 7-day weather risk read for up to 50 sites in one call: per site the daily forecast, hour-by-hour checks for frost, heat, high gusts, intense rain and snow over the next 168 hours, current air quality, the same dates a year earlier, and the ensemble probability of 10 mm or more of rain on the wettest forecast day; each site gets a 0-100 risk score from the signals present and the sites are ranked. Send POST /api/weather-risk-brief with the required field sites and pay quoted per request from $0.018 over x402 or MPP (there is no free tier). It returns a JSON object with product, generatedAt, units, sites, portfolio and 6 more.

Priced per site: the five weather tools it runs (weather-daily, weather-thresholds, weather-air-quality, weather-history, weather-probability) less 10%, $0.018 a site, quoted in the 402 for the sites you send. A site is {"lat","lon"} or {"place"} with an optional "name". Deterministic code over the forecast data, no model. Weather data by Open-Meteo.com (CC BY 4.0).

Category: Live public dataTags: weather risk portfolio sites logistics insurance forecast bundle

Try in playground →

Parameters

NameTypeRequiredDescription
sitesarray of objectyes1 to 50 sites, each {"lat","lon"} or {"place"} with an optional "name" (a place name string also works)
unitsstringnocelsius (default; wind km/h) or fahrenheit (wind mph); rain is always mm

Example request

curl -i -X POST https://agent402.tools/api/weather-risk-brief \
  -H "Content-Type: application/json" \
  -d '{"sites":[{"name":"Chicago DC","lat":41.88,"lon":-87.63},{"name":"Houston DC","lat":29.76,"lon":-95.37},{"name":"Denver DC","lat":39.74,"lon":-104.99},{"name":"Miami DC","lat":25.76,"lon":-80.19},{"name":"Seattle DC","lat":47.61,"lon":-122.33},{"name":"Phoenix DC","lat":33.45,"lon":-112.07}]}'

Without payment this returns HTTP 402 Payment Required with the exact price for weather-risk-brief; any x402 v2 or MPP client pays it and retries.

Watch a call get paid

RequestPOST /api/weather-risk-brief
402from $0.018 USDC
SignPAYMENT-SIGNATURE
Settleon 14 chains
Answer200 OK
ReceiptAgent402-ReceiptEd25519

Example response

{
  "product": "weather-risk-brief",
  "generatedAt": "2026-11-18T23:40:00.000Z",
  "units": "celsius",
  "sites": 6,
  "portfolio": {
    "sitesWithFlag": {
      "frost": 2,
      "heat": 0,
      "highGusts": 1,
      "intenseRain": 1,
      "snow": 1,
      "heavyRainLikely": 1,
      "poorAir": 0
    },
    "highestRisk": {
      "index": 2,
      "site": "Denver DC",
      "riskScore": 55,
      "flags": [
        "frost",
        "highGusts",
        "snow"
      ]
    },
    "meanRiskScore": 20.8
  },
  "ranking": [
    {
      "index": 2,
      "site": "Denver DC",
      "riskScore": 55,
      "flags": [
        "frost",
        "highGusts",
        "snow"
      ]
    },
    {
      "index": 0,
      "site": "Chicago DC",
      "riskScore": 30,
      "flags": [
        "frost",
        "heavyRainLikely"
      ]
    }
  ],
  "rows": [
    {
      "site": {
        "name": "Denver DC",
        "lat": 39.74,
        "lon": -104.99
      },
      "riskScore": 55,
      "flags": [
        "frost",
        "highGusts",
        "snow"
      ],
      "forecast": {
        "from": "2026-11-18",
        "to": "2026-11-24",
        "days": 7,
        "tempMax": 14.2,
        "tempMin": -9.1,
        "precipTotal": 6.3,
        "wettestDay": {
          "date": "2026-11-21",
          "precipSum": 4.8,
          "precipProbability": 61
        },
        "gustiestDay": {
          "date": "2026-11-21",
          "windGusts": 74.2
        },
        "uvMax": 3.1,
        "unit": "°C",
        "windUnit": "km/h"
      },
      "risks": {
        "frost": {
          "rule": "temperature < 0 °C",
          "met": true,
          "firstAt": "2026-11-19T03:00",
          "hoursMet": 41
        },
        "highGusts": {
          "rule": "wind_gusts >= 70 km/h",
          "met": true,
          "firstAt": "2026-11-21T13:00",
          "hoursMet": 3
        }
      },
      "heavyRain": {
        "date": "2026-11-21",
        "thresholdMm": 10,
        "probability": 0.0732,
        "members": 82
      },
      "airQuality": {
        "usAqi": 41,
        "category": "Good",
        "pm25": 6.2,
        "at": "2026-11-18T23:00"
      },
      "vsLastYear": {
        "from": "2025-11-19",
        "to": "2025-11-25",
        "tempMaxMeanDelta": -2.4,
        "precipTotalDelta": 3.1
      }
    }
  ],
  "method": "riskScore adds frost 15, heat 20, highGusts 25, intenseRain 15, snow 15, heavyRainLikely 15, poorAir 10 points (capped at 100) for each signal present.",
  "pricing": {
    "units": 6,
    "unitPartsUsd": 0.019,
    "priceUsd": 0.103,
    "rule": "the sum of each unit's tools (weather-daily, weather-thresholds, weather-air-quality, weather-history, weather-probability) times the units, less 10%, rounded up to $0.001"
  },
  "source": "computed from Open-Meteo forecast, air quality, archive and ensemble data (CC BY 4.0)",
  "credits": [
    "Weather data by Open-Meteo.com (CC BY 4.0)."
  ]
}
FieldTypeAlways presentIn the example
productstringyesweather-risk-brief
generatedAtstringyes2026-11-18T23:40:00.000Z
unitsstringyescelsius
sitesnumberyes6
portfolioobjectyes3 fields: sitesWithFlag, highestRisk, meanRiskScore
rankingarray of objectsyes2 items in the example
rowsarray of objectsyes1 item in the example
methodstringyesriskScore adds frost 15, heat 20, highGusts 25, intenseRain 15, snow 15, heav...
pricingobjectyes4 fields: units, unitPartsUsd, priceUsd, rule
sourcestringyescomputed from Open-Meteo forecast, air quality, archive and ensemble data (CC...
creditsarray of stringyes1 item in the example

From an MCP client

catalog.call {
  "slug": "weather-risk-brief",
  "params": {
    "sites": [
      {
        "name": "Chicago DC",
        "lat": 41.88,
        "lon": -87.63
      },
      {
        "name": "Houston DC",
        "lat": 29.76,
        "lon": -95.37
      },
      {
        "name": "Denver DC",
        "lat": 39.74,
        "lon": -104.99
      },
      {
        "name": "Miami DC",
        "lat": 25.76,
        "lon": -80.19
      },
      {
        "name": "Seattle DC",
        "lat": 47.61,
        "lon": -122.33
      },
      {
        "name": "Phoenix DC",
        "lat": 33.45,
        "lon": -112.07
      }
    ]
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for weather-risk-brief; the stdio package pays it from a wallet or from an AGENT402_CREDITS_KEY issued earlier. Local install: npx -y agent402-mcp@0.14.0.

Errors and behavior

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.855" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/weather-risk-brief", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "sites": [
      {
        "name": "Chicago DC",
        "lat": 41.88,
        "lon": -87.63
      },
      {
        "name": "Houston DC",
        "lat": 29.76,
        "lon": -95.37
      },
      {
        "name": "Denver DC",
        "lat": 39.74,
        "lon": -104.99
      },
      {
        "name": "Miami DC",
        "lat": 25.76,
        "lon": -80.19
      },
      {
        "name": "Seattle DC",
        "lat": 47.61,
        "lon": -122.33
      },
      {
        "name": "Phoenix DC",
        "lat": 33.45,
        "lon": -112.07
      }
    ]
  }),
});

Related tools

Sharpe ratio

FREE w/ computeor $0.001POST /api/sharpe-ratio

Risk-adjusted return: (mean return - risk-free rate) / sample standard deviation of returns (n-1).

Daily forecast (global)

$0.002GET /api/weather-daily

7-day daily weather forecast for any location: high/low temp, precipitation sum and probability, max wind, UV index.

Weather forecast (US)

$0.001GET /api/weather-forecast

Multi-period weather forecast for a US location from api.weather.gov (NWS, public domain).

Hourly forecast (global)

$0.002GET /api/weather-hourly

48-hour hourly weather forecast for any location: temperature, precipitation probability and amount, wind, cloud cover.

Weather probability (ensemble)

$0.01GET /api/weather-probability

Probability that a day's weather meets a condition, from up to 82 ensemble members (ECMWF IFS and NOAA GEFS): a high.

Weather threshold check

$0.003POST /api/weather-thresholds

Check the hourly forecast against your own rules: for each rule (a variable, a comparison, a value) get whether it is.