Skip to content

Weather window finder

$0.004 per callUSDC via x402GET /api/weather-window

Find the hours in the next 1-16 days that meet your limits for an outdoor plan: rain chance, rain amount, wind, gusts, a temperature range, daylight only. Send GET /api/weather-window with no required fields (13 optional) and pay $0.004 per call over x402 or MPP (there is no free tier). It returns a JSON object with lat, lon, timezone, days, minHours and 8 more.

Returns each stretch of consecutive qualifying hours from now on, longest first, with its temperature range, rain chance and wind, or names the limit that ruled out the most hours when none fits. Any place by coordinates or name. ?place=Austin, TX&days=10&minHours=4&maxPrecipProbability=20. Weather data by Open-Meteo.com (CC BY 4.0).

Category: Live public dataTags: weather forecast window planning outdoor schedule

Try in playground →

Parameters

NameTypeRequiredDescription
latnumbernoLatitude, -90 to 90 (with lon; wins over place)
lonnumbernoLongitude, -180 to 180 (with lat)
placestringnoA city, town or region name instead of lat/lon, for example "Paris" or "Austin, TX" (not a street address); the answer echoes the place it resolved to
daysnumbernoForecast days to search, 1-16 (default 7)
minHoursnumbernoShortest stretch to report, 1-24 hours (default 3)
maxPrecipProbabilitynumbernoHighest rain chance allowed in any hour, 0-100 percent (default 20)
maxPrecipitationnumbernoHighest precipitation allowed in any hour, mm (no limit by default)
maxWindnumbernoHighest wind speed allowed, km/h (mph with units=fahrenheit)
maxGustsnumbernoHighest wind gust allowed, km/h (mph with units=fahrenheit)
tempMinnumbernoLowest temperature allowed
tempMaxnumbernoHighest temperature allowed
daylightOnlybooleannoOnly daylight hours (default true)
unitsstringnocelsius (default; wind in km/h) or fahrenheit (wind in mph)

Example request

curl -i "https://agent402.tools/api/weather-window?lat=30.2672&lon=-97.7431&days=10&minHours=4&maxPrecipProbability=30"

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

Example response

{
  "lat": 30.2672,
  "lon": -97.7431,
  "timezone": "America/Chicago",
  "days": 10,
  "minHours": 4,
  "limits": {
    "maxPrecipProbability": 30,
    "maxPrecipitation": null,
    "maxWind": null,
    "maxGusts": null,
    "tempMin": null,
    "tempMax": null,
    "daylightOnly": true
  },
  "units": {
    "temperature": "°C",
    "wind": "km/h",
    "precipitation": "mm"
  },
  "found": true,
  "count": 9,
  "windows": [
    {
      "start": "2026-11-18T07:00",
      "end": "2026-11-18T17:00",
      "hours": 11,
      "tempMin": 12.4,
      "tempMax": 22.9,
      "maxPrecipProbability": 3,
      "precipitation": 0,
      "maxWind": 14.2,
      "maxGusts": 27.4
    }
  ],
  "hoursSearched": 240,
  "hoursMeetingLimits": 96,
  "source": "computed from Open-Meteo forecast data, api.open-meteo.com (CC BY 4.0)"
}
FieldTypeAlways presentIn the example
latnumberyes30.2672
lonnumberyes-97.7431
timezonestringyesAmerica/Chicago
daysnumberyes10
minHoursnumberyes4
limitsobjectyes7 fields: maxPrecipProbability, maxPrecipitation, maxWind, maxGusts and 3 more
unitsobjectyes3 fields: temperature, wind, precipitation
foundbooleanyestrue
countnumberyes9
windowsarray of objectsyes1 item in the example
hoursSearchednumberyes240
hoursMeetingLimitsnumberyes96
sourcestringyescomputed from Open-Meteo forecast data, api.open-meteo.com (CC BY 4.0)

From an MCP client

catalog.call {
  "slug": "weather-window",
  "params": {
    "lat": 30.2672,
    "lon": -97.7431,
    "days": 10,
    "minHours": 4,
    "maxPrecipProbability": 30
  }
}

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

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.004" }); // 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-window?lat=30.2672&lon=-97.7431&days=10&minHours=4&maxPrecipProbability=30");

Related tools

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.

Amortization schedule

FREE w/ computeor $0.001POST /api/amortization

Build the full per-period amortization schedule for a fully-amortizing loan.