Skip to content

Forecast stability across runs

$0.005 per callUSDC via x402GET /api/forecast-skill

How the forecast for one date moved across the last 7 daily runs at any place: the high, low and precipitation each run forecast for that date...

Category: Live public dataTags: weather forecast stability previous-runs prediction-markets temperature

Try in playground →

Details

How the forecast for one date moved across the last 7 daily runs at any place: the high, low and precipitation each run forecast for that date, by lead time in days, with the spread across runs and the change from the oldest run to the newest. For dates from 2024-01-01 to 16 days ahead. By coordinates or place name. Cached for up to 15 minutes. ?place=New York&date=2026-12-05. Weather data by Open-Meteo.com (CC BY 4.0).

Parameters

NameTypeRequiredDescription
latnumbernoLatitude, -90 to 90 (with lon; wins over place) The example sends 40.7128.
lonnumbernoLongitude, -180 to 180 (with lat) The example sends -74.006.
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 Up to 100 characters.
datestringnoThe forecast date, YYYY-MM-DD, 2024-01-01 to 16 days ahead (default today, UTC)
unitsstringnocelsius (default) or fahrenheit; precipitation in mm

Example request

curl -i "https://agent402.tools/api/forecast-skill?lat=40.7128&lon=-74.006"

Watch a call get paid

RequestGET /api/forecast-skill
402$0.005 USDC
SignPAYMENT-SIGNATURE
Settleon 14 chains
Answer200 OK
ReceiptAgent402-ReceiptEd25519

Example response

{
  "lat": 40.7128,
  "lon": -74.006,
  "date": "2026-12-01",
  "timezone": "America/New_York",
  "units": "°C",
  "runs": [
    {
      "leadDays": 0,
      "issued": "2026-12-01",
      "tempMax": 6.2,
      "tempMin": 1.4,
      "precipitation": 0
    },
    {
      "leadDays": 3,
      "issued": "2026-11-28",
      "tempMax": 7.9,
      "tempMin": 2.2,
      "precipitation": 1.2
    },
    {
      "leadDays": 7,
      "issued": "2026-11-24",
      "tempMax": 9.1,
      "tempMin": 3.5,
      "precipitation": 3.4
    }
  ],
  "spread": {
    "tempMax": 2.9,
    "tempMin": 2.1,
    "precipitation": 3.4
  },
  "change": {
    "fromLeadDays": 7,
    "toLeadDays": 0,
    "tempMax": -2.9,
    "tempMin": -2.1,
    "precipitation": -3.4
  },
  "method": "leadDays N is the run made N days before the date (0 is the newest). Each value is the day's high, low or total from that run's hourly forecast in the location's time zone. Raw model output at the grid point.",
  "source": "previous-runs-api.open-meteo.com (CC BY 4.0)",
  "attributionText": "Weather data by Open-Meteo.com (CC BY 4.0).",
  "sourceUrl": "https://open-meteo.com/",
  "licenseUrl": "https://creativecommons.org/licenses/by/4.0/"
}
FieldTypeAlways presentIn the example
latnumberyes40.7128
lonnumberyes-74.006
datestringyes2026-12-01
timezonestringyesAmerica/New_York
unitsstringyes°C
runsarray of objectsyes3 items in the example
spreadobjectyes3 fields: tempMax, tempMin and 1 more
changeobjectyes5 fields: fromLeadDays, toLeadDays, tempMax, tempMin and 1 more
methodstringyesleadDays N is the run made N days before the date (0 is the newest). Each val...
sourcestringyesprevious-runs-api.open-meteo.com (CC BY 4.0)
attributionTextstringyesWeather data by Open-Meteo.com (CC BY 4.0).
sourceUrlstringyeshttps://open-meteo.com/
licenseUrlstringyeshttps://creativecommons.org/licenses/by/4.0/

From an MCP client

catalog.call {
  "slug": "forecast-skill",
  "params": {
    "lat": 40.7128,
    "lon": -74.006
  }
}

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

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/forecast-skill?lat=40.7128&lon=-74.006");

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/forecast-skill?lat=40.7128&lon=-74.006", 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

Guides that use this tool

Related tools