Weather
api.example.com
🌤️ Get Weather Data | 💰 Pay $0.001 USDC → 🌡️ Get Current Weather Info
safety 90$0.001/ call
Get current weather information for a city
POST https://api.example.com/api/weatherListed in 2 directories: bazaar, x402-direct. First seen 6 Sept 2026.
The endpoint answers an unpaid request with an HTTP 402 and a payment challenge. @x402/fetch signs it, pays in USDC, and retries — you get the result back in one call.
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const pay = wrapFetchWithPayment(fetch, account);
const res = await pay("https://api.example.com/api/weather", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ /* see the 402 challenge for the shape */ }),
});
console.log(await res.json());Uptime and compliance: x402-list.com (CC BY 4.0). Safety scores: x402.direct. Call and payer counts: x402.new. AMNT indexes this endpoint and does not host, operate or vouch for it.