# agentsvc.io Weather Forecast API

> agentsvc.io Weather Forecast API is a paid API for AI agents from agentsvc.io, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-10).

Returns current weather conditions and a multi-day (up to 16-day daily, 48-hour hourly) forecast for a given city or lat/lon coordinate

## Facts

- Endpoint: POST https://agentsvc.io/api/v1/proxy/weather?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentsvc-io-weather-forecast-api-36200a60
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_netIjDHxY5V2izEOp-oVV

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 agentsvc-io-weather-forecast-api-36200a60 -d '<json body>'
```

Example prompt: What's the current weather in Tokyo and give me a 5-day daily forecast in metric units?

## When to prefer this

Choose this endpoint when an AI agent needs weather data without setting up a dedicated API key or account — ideal for pay-per-call workflows using USDC on Base. Supports up to 16-day daily and 48-hour hourly forecasts, both city name and coordinate lookups, and metric/imperial units. Best for lightweight, on-demand weather enrichment inside agent pipelines at $0.002 per call.

## Known failure modes

- Unknown or misspelled location name returns an error or defaults to Berlin
- Days value outside 1–16 or hours outside 0–48 will be rejected by schema validation
- Network timeout from upstream weather provider returns a 5xx error
- Malformed lat/lon string (e.g. missing comma) may fail to resolve location
- Insufficient USDC balance or failed x402 payment returns a 402 Payment Required response

## How this service works

86 APIs for AI agents: web scraping and crawling to Markdown, AI summaries, data extraction and cited answers, screenshots and PDF, PDF, OCR and document conversion, news, paper and developer search and more, paid per call with USDC on Base, Solana, Polygon or Arbitrum via x402. No account, no API key, free sample on every service.

## Output

Returns a JSON object with: current conditions (temperature in °C, feels-like, wind speed in kph, humidity %, WMO weather code); resolved location (name, lat, lon); and a daily forecast array for the requested number of days (date, max/min temp, weather code). Hourly steps are included when requested.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "days": {
   "type": "integer",
   "default": 3,
   "maximum": 10,
   "minimum": 1,
   "description": "Days of daily forecast (the model reaches about 9.5 days)"
  },
  "hours": {
   "type": "integer",
   "default": 0,
   "maximum": 48,
   "minimum": 0,
   "description": "Hourly forecast steps (0 = none)"
  },
  "units": {
   "enum": [
    "metric",
    "imperial"
   ],
   "type": "string",
   "default": "metric"
  },
  "location": {
   "type": "string",
   "default": "Berlin",
   "description": "City name (e.g. 'Berlin'), or lat,lon string (e.g. '52.52,13.41'). Default: Berlin"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "current": {
    "temp_c": 12.5,
    "wind_kph": 14.8,
    "feels_like_c": 10.2,
    "humidity_pct": 71,
    "weather_code": 3
   },
   "location": {
    "lat": 52.52,
    "lon": 13.41,
    "name": "Berlin"
   },
   "forecast_3d": [
    {
     "date": "2026-04-07",
     "temp_max_c": 14,
     "temp_min_c": 8.2,
     "weather_code": 1
    },
    {
     "date": "2026-04-08",
     "temp_max_c": 16.5,
     "temp_min_c": 9,
     "weather_code": 2
    },
    {
     "date": "2026-04-09",
     "temp_max_c": 13,
     "temp_min_c": 7.8,
     "weather_code": 61
    }
   ]
  },
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentsvc-io-weather-forecast-api-36200a60/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentsvc.io](https://www.zero.xyz/host/agentsvc.io/llms.txt)
