81trust / 100

Weather Forecast

by 2s in Weather & location

x402 APIPassing, checked 2 h ago

Official US weather forecast for a coordinate (US land + territories). Pass lat + lon. Returns the National Weather Service forecast as a list of periods — by default ~7 days of day/night periods; pass hourly=true for an hour-by-hour forecast. Each period gives the temperature + unit, wind speed/direction, chance of precipitation, and a short + detailed forecast, plus the resolved city/state and issuing office. Source: US National Weather Service (api.weather.gov), public domain. For active warnings use weather.alerts.

GET https://2s.io/api/weather/forecast

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
156 ms typical, 156 ms slowest 5%
Last check
2 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://2s.io/api/weather/forecast?lat=38.8977&lon=-77.0365"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2F2s.io%2Fapi%2Fweather%2Fforecast
const res = await pay("https://2s.io/api/weather/forecast?lat=38.8977&lon=-77.0365");
console.log(await res.json());

Example input

{
  "lat": 38.8977,
  "lon": -77.0365
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed402172 ms$0.0036
7 h agoPassed402156 ms$0.0036