$ man weather
/weather(1)
PRICE / CALL
$0.005
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
localeCATEGORY
uncategorized
STATUS
● live
NAME
weather — weather api / weather forecast / current weather / hourly forecast
synonym alias of weather-forecast — reuses the canonical handler.
SYNOPSIS
POST https://x402.org/v1/weather
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
Weather API / weather forecast / current weather / hourly forecast. Returns current conditions plus 1-7 day daily forecast and optional hourly forecast for any latitude/longitude. Daily includes temp max/min, precipitation, sunrise/sunset, UV index. Open-Meteo backend.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| latitude | number | Decimal degrees, range [-90, 90]. Positive north. | required |
| longitude | number | Decimal degrees, range [-180, 180]. Positive east. | required |
| units | string | 'metric' (°C, km/h, mm) or 'imperial' (°F, mph, inch). Default 'metric'. enum: metric · imperial | optional |
| forecast_days | number | Number of forecast days, 1-7. Default 3. | optional |
| hourly | boolean | If true, include hourly temperature, precipitation, and weather code arrays. Default false. | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| location | string | Echo of the requested coordinates with resolved place name, timezone, and elevation for the forecast point. |
| current | string | Current conditions snapshot: temperature, apparent temp, humidity, wind speed/direction, and weather code. |
| daily | string | Array of 1-7 day forecasts with temp max/min, precipitation totals, sunrise/sunset times, and UV index. |
| units | string | Unit labels for each returned field (e.g. temperature in C or F, wind in km/h, precipitation in mm). |
| source | string | Upstream data provider identifier, set to open-meteo for this endpoint. |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.org/v1/weather \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# install once claude mcp add x402 --command "npx x402-deployer-mcp" # then ask Claude Code: # "use the weather tool to ..."
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- weatherlocaleforecastcurrent-conditionshourly-forecastuv-indexopen-meteo
- methods
- POST
- cluster
- locale
- price
- $0.005 USDC per call
ADJACENT — other endpoints in locale
| endpoint | description | price |
|---|---|---|
| iata-airport-info | IATA / ICAO airport code lookup. | $0.005 |
| satellite-tile | Satellite imagery tile / lat-lon to satellite PNG / Sentinel-2 tile API / cloud-free satellite snapshot / agent-callable satellite imagery. | $0.005 |
| vin-decode | VIN decoder / VIN lookup / decode VIN / vehicle identification number / NHTSA vPIC wrapper. | $0.005 |
| visa-requirements | Visa requirements lookup. | $0.005 |
| weather-forecast | Weather forecast / hourly forecast / current weather / temperature / precipitation / UV index / sunrise-sunset / Open-Meteo / weather API. | $0.005 |
| astro-times | sunrise-sunset / golden-hour / civil twilight / nautical dusk / day-length / solar-noon / dawn-dusk / astronomy times. | $0.002 |
| country-info | Country info / ISO 3166 / country code lookup / capital city lookup / currencies by country / population / region resolver. | $0.002 |
| earthquakes-recent | Earthquake feed / seismic activity / USGS / recent quakes / quake monitor / tremor data / fault line activity / tsunami alerts. | $0.002 |
SEE ALSO