GET /v1/forecast/window$0.02realtimetier: datacache 900sEngine B — Weather Intelligence
Summarizes a ≤12-hour window at a coordinate into decision-ready numbers (rain probability, expected precip, temp range in °C, max gust, comfort index) plus a one-sentence plain-English verdict. Built for agents planning events, deliveries, and travel.
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
lat | query | number | yes | |
lon | query | number | yes | |
start | query | string | yes | |
end | query | string | yes |
curl "https://x402-factory.com/v1/forecast/window?lat=40.7829&lon=-73.9654&start=2026-07-19T16%3A00%3A00Z&end=2026-07-19T22%3A00%3A00Z"
An evening event window in Central Park.
{
"data": {
"rain_probability": 0.12,
"expected_precip_mm": 0,
"temp_range": {
"low": 18.1,
"high": 20.6
},
"wind_max": 29.3,
"comfort_index": 0.86,
"severity_flags": [],
"verdict": "Looks good: mild, highs near 69.1°F, low rain risk."
},
"meta": {
"endpoint": "/v1/forecast/window",
"version": "1.0.0",
"generated_at": "2026-08-18T22:54:16.977Z",
"freshness": "realtime",
"sources": [
"stub-model"
],
"request_id": "req_00000000",
"docs": "https://x402-factory.com/docs/weather.forecast-window",
"data_mode": "live"
}
}data payload){
"type": "object",
"properties": {
"rain_probability": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"expected_precip_mm": {
"type": "number"
},
"temp_range": {
"type": "object",
"properties": {
"low": {
"type": "number"
},
"high": {
"type": "number"
}
},
"required": [
"low",
"high"
],
"additionalProperties": false
},
"wind_max": {
"type": "number"
},
"comfort_index": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"severity_flags": {
"type": "array",
"items": {
"type": "string"
}
},
"verdict": {
"type": "string"
}
},
"required": [
"rain_probability",
"expected_precip_mm",
"temp_range",
"wind_max",
"comfort_index",
"severity_flags",
"verdict"
],
"additionalProperties": false
}
The platform wraps every payload in an envelope: { "data": …, "meta": { endpoint, version, generated_at, freshness, sources, request_id, docs, data_mode } }.
Unpaid requests receive 402 with payment requirements (accepts). Pay $0.02 in USDC on Base per call via an X-PAYMENT header — see docs.x402.org. With PAYMENT_MODE=disabled (local dev) the endpoint is open.
| Status | Code | Meaning |
|---|---|---|
| 400 | INVALID_PARAMS | Input failed validation; message lists the offending fields. |
| 404 | NOT_FOUND | No matching resource; suggestion may point to a sibling endpoint. |
| 410 | RESOLVED | Market/event settled; body includes a resolution summary. |
| 503 | STALE_DATA | Upstream feed down; stale data is never silently served beyond 2× cache TTL. |
| 500 | INTERNAL | Our bug. The request_id helps us find it. |