# AgentUtility Weather API

> AgentUtility Weather API is a paid API for AI agents from x402.agentutility.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns current weather conditions plus a 1–7 day daily forecast (and optional hourly) for any latitude/longitude coordinate, powered by Open-Meteo.

## Facts

- Endpoint: POST https://x402.agentutility.ai/weather
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentutility-weather-api-bee90db6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bXCNkAtFXo3RP0kqIuJoS

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentutility-weather-api-bee90db6 -d '<json body>'
```

Example prompt: What's the current weather and 5-day forecast for latitude 40.7128, longitude -74.0060? Include daily high/low temperatures, precipitation, UV index, and sunrise/sunset times.

## When to prefer this

Choose this endpoint when an agent needs structured weather data (current conditions + multi-day forecast) for an arbitrary coordinate at a low fixed cost of $0.002 USDC per call. Ideal for agents that already have lat/lng from a geocoding step and need forecast data without managing Open-Meteo API keys directly. The x402 USDC micropayment model suits autonomous agents with crypto wallets operating without human-managed API subscriptions.

## Known failure modes

- Invalid or out-of-range latitude/longitude returns a 400 error
- Missing required coordinate parameters returns a validation error
- Upstream Open-Meteo service outage may result in 502/503 response
- Payment authorization failure (insufficient USDC balance) blocks the request via x402 protocol
- Requesting more than 7 forecast days may return an error or be clamped to max range

## How this service works

Current conditions and forecast for any latitude/longitude. Returns present weather plus a 1-7 day daily forecast (temp max/min, precipitation, sunrise/sunset, UV index) and an optional hourly forecast. A simple weather API on the Open-Meteo backend.

## Output

Returns a JSON object with current weather conditions (temperature, wind, precipitation, weather code) and a daily forecast array covering 1–7 days with fields for max/min temperature, precipitation sum, sunrise/sunset times, and UV index. Optionally includes an hourly forecast array with per-hour temperature and precipitation data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "latitude",
      "longitude"
     ],
     "properties": {
      "units": {
       "enum": [
        "metric",
        "imperial"
       ],
       "type": "string",
       "description": "'metric' (°C, km/h, mm) or 'imperial' (°F, mph, inch). Default 'metric'."
      },
      "hourly": {
       "type": "boolean",
       "description": "If true, include hourly temperature, precipitation, and weather code arrays. Default false."
      },
      "latitude": {
       "type": "number",
       "description": "Decimal degrees, range [-90, 90]. Positive north."
      },
      "longitude": {
       "type": "number",
       "description": "Decimal degrees, range [-180, 180]. Positive east."
      },
      "forecast_days": {
       "type": "number",
       "description": "Number of forecast days, 1-7. Default 3."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "daily": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "date": {
          "type": "string"
         },
         "sunset": {
          "type": "string"
         },
         "sunrise": {
          "type": "string"
         },
         "uv_index_max": {
          "type": "number"
         },
         "weather_code": {
          "type": "integer"
         },
         "temperature_max": {
          "type": "number"
         },
         "temperature_min": {
          "type": "number"
         },
         "precipitation_mm": {
          "type": "integer"
         },
         "precipitation_probability_max": {
          "type": "integer"
         }
        }
       }
      },
      "units": {
       "type": "string"
      },
      "source": {
       "type": "string"
      },
      "current": {
       "type
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "daily": [
   {
    "date": "2026-05-06",
    "sunset": "2026-05-06T20:11",
    "sunrise": "2026-05-06T06:08",
    "uv_index_max": 7.5,
    "weather_code": 3,
    "temperature_max": 67.3,
    "temperature_min": 53.1,
    "precipitation_mm": 0,
    "precipitation_probability_max": 5
   }
  ],
  "units": "imperial",
  "source": "https://open-meteo.com",
  "current": {
   "time": "2026-05-06T13:00",
   "is_day": true,
   "wind_speed": 8.2,
   "temperature": 62.1,
   "humidity_pct": 78,
   "weather_code": 3,
   "precipitation": 0,
   "wind_direction_deg": 270,
   "apparent_temperature": 60.4
  },
  "location": {
   "lat": 37.7749,
   "lon": -122.4194,
   "timezone": "America/Los_Angeles",
   "elevation_m": 18
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentutility-weather-api-bee90db6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentutility.ai](https://www.zero.xyz/host/x402.agentutility.ai/llms.txt)
