# AgentBit Weather Forecast API

> AgentBit Weather Forecast API is a paid API for AI agents from agentbit.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Returns current weather conditions plus an hourly forecast (up to 48 hours) for any global coordinates, including temperature, wind, humidity, precipitation, and a will-it-rain summary, powered by MET Norway model data.

## Facts

- Endpoint: POST https://agentbit.app/v1/data/weather
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentbit-weather-forecast-api-d594d188
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Tht-oYffeHsSKg5yylvA_

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 agentbit-weather-forecast-api-d594d188 -d '<json body>'
```

Example prompt: What's the current weather and will it rain in the next 12 hours at latitude 48.8566, longitude 2.3522? Give me temperature, wind, and humidity too.

## When to prefer this

Choose this endpoint when you need reliable, globally-applicable weather forecasts backed by a reputable national meteorological institute (MET Norway, behind yr.no), especially when commercial use and attribution compliance matter. It is ideal for agents needing structured hourly data at arbitrary GPS coordinates without geographic restrictions, and when a concise will-it-rain boolean is needed alongside raw forecast data. Prefer it over consumer weather APIs when you need clear licensing terms (NLOD/CC BY 4.0) and predictable per-call pricing.

## Known failure modes

- Invalid coordinates (lat outside -90..90 or lon outside -180..180) may return a 400 error
- Hours parameter outside 1-48 range may be rejected or clamped
- MET Norway upstream API unavailability causes service errors
- Payment failure (insufficient USDC balance or x402 protocol error) blocks the request
- Very remote or ocean coordinates may return data but with limited station density

## How this service works

Weather forecast for any coordinates worldwide: current conditions plus a condensed hourly forecast (temperature, wind, humidity, precipitation, condition codes) and a will-it-rain summary. Official MET Norway model data (the institute behind yr.no) — commercial use permitted, attribution included. $0.002 per call.

## Output

A JSON object containing: (1) a 'current' block with time, condition code, temperature in Celsius, wind speed in m/s, humidity percent, and precipitation in mm for the next hour; (2) an 'hourly' array of the same fields for each requested hour; (3) a 'summary' block with will_rain boolean, temp max/min, total precipitation, and hours covered; (4) a 'location' echo of the input coordinates; and (5) an attribution string crediting MET Norway.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "lat": {
   "type": "number",
   "description": "Latitude -90..90"
  },
  "lon": {
   "type": "number",
   "description": "Longitude -180..180"
  },
  "hours": {
   "type": "integer",
   "description": "Hourly entries to return (1-48, default 24)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hourly": [
   {
    "time": "2026-09-06T15:00:00Z",
    "conditions": "clearsky_day",
    "temperature_c": 23.6,
    "wind_speed_ms": 3,
    "humidity_percent": 50.1,
    "precipitation_mm_next_1h": 0
   }
  ],
  "current": {
   "time": "2026-09-06T14:00:00Z",
   "conditions": "clearsky_day",
   "temperature_c": 24.1,
   "wind_speed_ms": 3.2,
   "humidity_percent": 48.5,
   "precipitation_mm_next_1h": 0
  },
  "summary": {
   "hours": 12,
   "will_rain": false,
   "temp_max_c": 24.1,
   "temp_min_c": 14.8,
   "total_precipitation_mm": 0
  },
  "location": {
   "lat": 46.771,
   "lon": 23.624
  },
  "attribution": "Weather data from MET Norway (api.met.no), licensed NLOD/CC BY 4.0 — attribute when republishing."
 }
}
```

## More

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