# meld402 Weather Context

> meld402 Weather Context is a paid API for AI agents from meld402.vercel.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-14).

Returns aggregated current weather conditions, air quality, and multi-day forecast for a given latitude/longitude by combining OpenWeatherMap and WeatherAPI into a single normalized response.

## Facts

- Endpoint: POST https://meld402.vercel.app/api/weather/context
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/meld402-weather-context-37d88b5e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HXhDOEqd88K42e1GVraTG

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 meld402-weather-context-37d88b5e -d '<json body>'
```

Example prompt: Can you pull current weather conditions and a 5-day forecast for San Francisco (37.7749, -122.4194), including air quality data, using the weatherapi source?

## When to prefer this

Choose this endpoint when you need normalized weather data from multiple sources in a single call with a stable schema, without managing individual API keys for OpenWeatherMap or WeatherAPI. Ideal for autonomous agents that need current conditions plus a short forecast (up to 7 days) with air quality in one request, billed per-call in USDC via x402. Prefer it over direct provider APIs when you want redundancy across sources and a consistent output format regardless of which provider responds.

## Known failure modes

- Invalid latitude/longitude values outside allowed ranges return validation errors
- Requested weather provider unavailable or rate-limited may trigger degraded mode or fallback to auto
- Coordinates in remote oceanic areas may return no place name or limited data
- x402 payment failure blocks the request before any data is returned
- days parameter out of 1-7 range returns a schema validation error

## How this service works

14 paid data endpoints for autonomous agents and developers. Covers crypto intelligence (token, chain, Solana, gas), markets (FX, market pulse), location (weather), and research (news, brief). Each route aggregates multiple public sources into one stable schema with a single USDC payment over x402 on Base.

## Output

Returns a JSON object with place metadata (name, region, country, timezone), current conditions (temperature, feels-like, humidity, wind, UV index, pressure, visibility, air quality with EPA index and pollutant readings), and a daily forecast array (up to 7 days with high/low temps, sunrise/sunset, precipitation, wind, condition). Also includes meta block with source attribution, data freshness timestamp, and degraded-source flags.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "lat": {
   "type": "number",
   "maximum": 90,
   "minimum": -90,
   "description": "Latitude"
  },
  "lon": {
   "type": "number",
   "maximum": 180,
   "minimum": -180,
   "description": "Longitude"
  },
  "days": {
   "type": "integer",
   "default": 5,
   "maximum": 7,
   "minimum": 1,
   "description": "Forecast days"
  },
  "source": {
   "enum": [
    "openweathermap",
    "weatherapi",
    "auto"
   ],
   "type": "string",
   "default": "auto",
   "description": "Weather provider"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "place": {
    "lat": 37.7749,
    "lon": -122.4194,
    "name": "San Francisco",
    "region": "California",
    "country": "United States",
    "timezone": "America/Los_Angeles"
   },
   "source": "weatherapi",
   "current": {
    "is_day": false,
    "uv_index": 0,
    "wind_kph": 15.5,
    "condition": "partly cloudy",
    "air_quality": {
     "co": 0.3,
     "o3": 45.2,
     "no2": 12.5,
     "so2": 2.1,
     "pm10": 12.7,
     "pm2_5": 8.3,
     "epa_index": 2
    },
    "observed_at": "2026-08-23T21:00:00.000Z",
    "wind_degree": 280,
    "feels_like_c": 18,
    "pressure_hpa": 1013,
    "temperature_c": 18.5,
    "visibility_km": 10,
    "condition_code": 801,
    "wind_direction": "W",
    "humidity_percent": 72,
    "precipitation_mm": 0
   },
   "forecast": [
    {
     "date": "2026-08-24",
     "sunset": "2026-08-25T02:15:00.000Z",
     "sunrise": "2026-08-24T13:45:00.000Z",
     "uv_index": 5,
     "condition": "partly cloudy",
     "avg_temp_c": 17.3,
     "max_temp_c": 20.5,
     "min_temp_c": 14.2,
     "max_wind_kph": 18.2,
     "condition_code": 801,
     "humidity_percent": 68,
     "precipitation_mm": 0
    },
    {
     "date": "2026-08-25",
     "sunset": "2026-08-26T02:15:00.000Z",
     "sunrise": "2026-08-25T13:45:00.000Z",
     "uv_index": 6,
     "condition": "clear sky",
     "avg_temp_c": 18,
     "max_temp_c": 21,
     "min_temp_c": 15,
     "max_wind_kph": 12.5,
     "condition_code": 800,
     "humidity_percent": 65,
     "precipitation_mm": 0
    }
   ]
  },
  "meta": {
   "as_of": "2026-08-24T00:00:00.000Z",
   "sources": [
    "weatherapi",
    "openweathermap"
   ],
   "degraded": [],
   "attribution": [
    "Weather data by WeatherAPI (weatherapi.com)",
    "Weather data by OpenWeatherMap (openweathermap.org)"
   ]
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/meld402-weather-context-37d88b5e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from meld402.vercel.app](https://www.zero.xyz/host/meld402.vercel.app/llms.txt)
