# WeatherXM Agent API – 7-Day Weather Forecast

> WeatherXM Agent API – 7-Day Weather Forecast is a paid API for AI agents from agent.weatherxm.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns 7-day hourly and daily weather forecasts for any lat/lon coordinate, including temperature, precipitation, humidity, and wind speed

## Facts

- Endpoint: GET https://agent.weatherxm.com/api/forecast
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/weatherxm-agent-api-7-day-weather-forecast-5a5413e6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jvb3pXY6eIxELxntrasGF

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 weatherxm-agent-api-7-day-weather-forecast-5a5413e6
```

Example prompt: What's the 7-day weather forecast for Athens, Greece (37.98°N, 23.73°E) in metric units, using the Europe/Athens timezone? I want hourly and daily breakdowns including temperature, precipitation, and wind.

## When to prefer this

Choose this endpoint when you need structured, machine-readable multi-day (up to 7 days) weather forecast data keyed by geographic coordinates, especially when you require both hourly and daily granularity in a single call. Prefer this over current-conditions or historical endpoints when forward-looking planning is the goal. Well-suited for automation pipelines, travel planning, agricultural scheduling, or any agent workflow that needs upcoming weather at a precise lat/lon.

## Known failure modes

- Missing required lat or lon parameters returns a 400 error
- Latitude out of range (-90 to 90) or longitude out of range (-180 to 180) returns validation error
- Invalid or unrecognized timezone string may cause timezone parsing error
- Payment failure (x402 protocol) results in 402 Payment Required with no forecast data
- Service unavailability or upstream data gap may return 503 or empty forecast arrays

## How this service works

7-day hourly and daily weather forecast

## Output

A JSON object containing 7 days of daily forecasts (date, max/min temperature, precipitation, precipitation probability) and hourly forecasts (timestamp, temperature, humidity, wind speed, precipitation), plus location coordinates, timezone, and unit system used.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "lat",
      "lon"
     ],
     "properties": {
      "tz": {
       "type": "string",
       "description": "IANA timezone (e.g., Europe/Athens) or \"auto\""
      },
      "lat": {
       "type": "number",
       "description": "Latitude (-90 to 90)"
      },
      "lon": {
       "type": "number",
       "description": "Longitude (-180 to 180)"
      },
      "units": {
       "enum": [
        "metric",
        "imperial"
       ],
       "type": "string",
       "description": "Unit system: \"metric\" (default) or \"imperial\""
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "description": "7-day hourly and daily weather forecast data"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "daily": [
   {
    "date": "2025-01-05",
    "precipitation": 0,
    "temperatureMax": 18.5,
    "temperatureMin": 12.3,
    "precipitationProbability": 10
   }
  ],
  "units": "metric",
  "hourly": [
   {
    "time": "2025-01-05T12:00:00+02:00",
    "humidity": 65,
    "windSpeed": 12.5,
    "temperature": 15.2,
    "precipitation": 0
   }
  ],
  "location": {
   "lat": 37.98,
   "lon": 23.73
  },
  "timezone": "Europe/Athens"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/weatherxm-agent-api-7-day-weather-forecast-5a5413e6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent.weatherxm.com](https://www.zero.xyz/host/agent.weatherxm.com/llms.txt)
