Weather Forecast
Global weather for agents, from MET Norway's Locationforecast — the official API of the Norwegian Meteorological Institute (the model behind yr.no), free for commercial use with proper identification and attribution, both of which this tool handles. Give it lat/lon (coordinates, not place names — pair with your own geocoding) and get: current conditions (temperature °C, wind m/s, humidity, precipitation next hour, condition code like 'partlycloudy_day'), a condensed hourly forecast for the next 1-48 hours, and a decision-ready summary: min/max temperature, total expected precipitation and a will_rain boolean. Responses are cached per rounded location for 30 minutes per MET's terms, so repeated checks are instant. Comparable x402 weather feeds have dozens of paying buyers — this one runs on official meteorological model data with zero markup pressure.
Call with x402
1. Send the request. 2. Receive 402 with accepts[]. 3. Sign the payment and retry with the X-PAYMENT header.
curl -X POST https://agentbit.app/v1/data/weather \
-H 'Content-Type: application/json' \
-d '{"lat":46.7712,"lon":23.6236,"hours":12}'
Input schema
{
"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)"
}
},
"required": [
"lat",
"lon"
]
}Output schema
{
"type": "object",
"properties": {
"location": {
"type": "object",
"properties": {
"lat": {
"type": "number"
},
"lon": {
"type": "number"
}
}
},
"current": {
"type": "object",
"properties": {
"time": {
"type": "string"
},
"temperature_c": {
"type": [
"number",
"null"
]
},
"wind_speed_ms": {
"type": [
"number",
"null"
]
},
"humidity_percent": {
"type": [
"number",
"null"
]
},
"precipitation_mm_next_1h": {
"type": [
"number",
"null"
]
},
"conditions": {
"type": [
"string",
"null"
]
}
}
},
"summary": {
"type": "object",
"properties": {
"hours": {
"type": "integer"
},
"temp_min_c": {
"type": [
"number",
"null"
]
},
"temp_max_c": {
"type": [
"number",
"null"
]
},
"total_precipitation_mm": {
"type": "number"
},
"will_rain": {
"type": "boolean"
}
}
},
"hourly": {
"type": "array"
},
"attribution": {
"type": "string"
}
}
}Code examples
// JavaScript (x402-fetch)
import { wrapFetchWithPayment } from "x402-fetch";
const fetchWithPay = wrapFetchWithPayment(fetch, wallet);
const r = await fetchWithPay("https://agentbit.app/v1/data/weather", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"lat":46.7712,"lon":23.6236,"hours":12})
});
console.log(await r.json());
# Python (x402 client)
from x402.clients.requests import x402_requests
s = x402_requests(account)
r = s.post("https://agentbit.app/v1/data/weather",
json={"lat":46.7712,"lon":23.6236,"hours":12})
print(r.json())
// PHP
$r = Http::withHeaders(['X-PAYMENT' => $signedPayment])
->post('https://agentbit.app/v1/data/weather',
array (
'lat' => 46.7712,
'lon' => 23.6236,
'hours' => 12,
));
$data = $r->json();