GET /v1/forecast/san-francisco

dynamic ($0.01 for hours ≤ 48, $0.03 beyond)realtimetier: datacache 900sEngine B — Weather Intelligence

Hourly weather forecast for San Francisco: temperature, precipitation probability, and wind, up to 168 hours out. NWS-derived series, bias-blended with our calibrated station model where covered — every response labels the method that produced it. Same shape as /v1/forecast/point with the San Francisco coordinates built in.

Pricing: $0.01 for hours ≤ 48, $0.03 beyond

Parameters

NameInTypeRequiredNotes
hoursqueryintegerno (default: 48)
unitsquerystringno (default: "imperial") — one of "metric", "imperial"

Example

curl "https://x402-factory.com/v1/forecast/san-francisco?hours=24"

Central Park, next 24h — $0.01.

Example response

{
  "data": {
    "hourly": [
      {
        "t": "2026-07-18T12:00:00.000Z",
        "temp": 83.3,
        "feels_like": 83.3,
        "precip_prob": 0.08,
        "precip_amount": 0,
        "wind": 6.2,
        "gust": 10.3,
        "humidity_pct": 45,
        "cloud_pct": 17
      },
      {
        "t": "2026-07-18T13:00:00.000Z",
        "temp": 81.3,
        "feels_like": 81.3,
        "precip_prob": 0.08,
        "precip_amount": 0,
        "wind": 5.8,
        "gust": 10.3,
        "humidity_pct": 37,
        "cloud_pct": 12
      },
      {
        "t": "2026-07-18T14:00:00.000Z",
        "temp": 80.8,
        "feels_like": 80.8,
        "precip_prob": 0.07,
        "precip_amount": 0,
        "wind": 5.7,
        "gust": 11.5,
        "humidity_pct": 49,
        "cloud_pct": 9
      },
      {
        "t": "2026-07-18T15:00:00.000Z",
        "temp": 78.6,
        "feels_like": 78.6,
        "precip_prob": 0.06,
        "precip_amount": 0,
        "wind": 13.4,
        "gust": 21.6,
        "humidity_pct": 41,
        "cloud_pct": 18
      },
      {
        "t": "2026-07-18T16:00:00.000Z",
        "temp": 77.7,
        "feels_like": 77.7,
        "precip_prob": 0.05,
        "precip_amount": 0,
        "wind": 13.4,
        "gust": 21.7,
        "humidity_pct": 43,
        "cloud_pct": 21
      },
      {
        "t": "2026-07-18T17:00:00.000Z",
        "temp": 75.6,
        "feels_like": 75.6,
        "precip_prob": 0.05,
        "precip_amount": 0,
        "wind": 13.5,
        "gust": 22.7,
        "humidity_pct": 40,
        "cloud_pct": 18
      },
      {
        "t": "2026-07-18T18:00:00.000Z",
        "temp": 73.6,
        "feels_like": 73.6,
        "precip_prob": 0.05,
        "precip_amount": 0,
        "wind": 13.9,
        "gust": 22.4,
        "humidity_pct": 46,
        "cloud_pct": 20
      },
      {
        "t": "2026-07-18T19:00:00.000Z",
        "temp": 70.9,
        "feels_like": 70.9,
        "precip_prob": 0.05,
        "precip_amount": 0,
        "wind": 14.2,
        "gust": 22.9,
        "humidity_pct": 36,
        "cloud_pct": 12
      },
      {
        "t": "2026-07-18T20:00:00.000Z",
        "temp": 68.2,
        "feels_like": 68.2,
        "precip_prob": 0.05,
        "precip_amount": 0,
        "wind": 14.7,
        "gust": 22.6,
        "humidity_pct": 46,
        "cloud_pct": 30
      },
      {
        "t": "2026-07-18T21:00:00.000Z",
        "temp": 67.1,
        "feels_like": 67.1,
        "precip_prob": 0.06,
        "precip_amount": 0,
        "wind": 8.1,
        "gust": 13.9,
        "humidity_pct": 47,
        "cloud_pct": 10
      },
      {
        "t": "2026-07-18T22:00:00.000Z",
        "temp": 65.1,
        "feels_like": 65.1,
        "precip_prob": 0.06,
        "precip_amount": 0,
        "wind": 8.6,
        "gust": 14.4,
        "humidity_pct": 35,
        "cloud_pct": 31
      },
      {
        "t": "2026-07-18T23:00:00.000Z",
        "temp": 66.6,
        "feels_like": 66.6,
        "precip_prob": 0.06,
        "precip_amount": 0,
        "wind": 9.1,
        "gust": 15,
        "humidity_pct": 43,
        "cloud_pct": 9
      },
      {
        "t": "2026-07-19T00:00:00.000Z",
        "temp": 73,
        "feels_like": 73,
        "precip_prob": 0.08,
        "precip_amount": 0,
        "wind": 12.2,
        "gust": 20.8,
        "humidity_pct": 49,
        "cloud_pct": 12
      },
      {
        "t": "2026-07-19T01:00:00.000Z",
        "temp": 71.8,
        "feels_like": 71.8,
        "precip_prob": 0.08,
        "precip_amount": 0,
        "wind": 12.6,
        "gust": 19.9,
        "humidity_pct": 35,
        "cloud_pct": 29
      },
      {
        "t": "2026-07-19T02:00:00.000Z",
        "temp": 75.2,
        "feels_like": 75.2,
        "precip_prob": 0.08,
        "precip_amount": 0,
        "wind": 12.7,
        "gust": 21.4,
        "humidity_pct": 35,
        "cloud_pct": 18
      },
      {
        "t": "2026-07-19T03:00:00.000Z",
        "temp": 75,
        "feels_like": 75,
        "precip_prob": 0.31,
        "precip_amount": 0,
        "wind": 8.3,
        "gust": 15,
        "humidity_pct": 49,
        "cloud_pct": 33
      },
      {
        "t": "2026-07-19T04:00:00.000Z",
        "temp": 76.8,
        "feels_like": 76.8,
        "precip_prob": 0.32,
        "precip_amount": 0,
        "wind": 8.2,
        "gust": 14.4,
        "humidity_pct": 37,
        "cloud_pct": 43
      },
      {
        "t": "2026-07-19T05:00:00.000Z",
        "temp": 80.4,
        "feels_like": 80.4,
        "precip_prob": 0.32,
        "precip_amount": 0,
        "wind": 8.1,
        "gust": 14.5,
        "humidity_pct": 39,
        "cloud_pct": 40
      },
      {
        "t": "2026-07-19T06:00:00.000Z",
        "temp": 81.9,
        "feels_like": 81.9,
        "precip_prob": 0.32,
        "precip_amount": 0,
        "wind": 7.8,
        "gust": 14.5,
        "humidity_pct": 41,
        "cloud_pct": 42
      },
      {
        "t": "2026-07-19T07:00:00.000Z",
        "temp": 84.4,
        "feels_like": 84.4,
        "precip_prob": 0.32,
        "precip_amount": 0,
        "wind": 7.4,
        "gust": 13.4,
        "humidity_pct": 42,
        "cloud_pct": 40
      },
      {
        "t": "2026-07-19T08:00:00.000Z",
        "temp": 85.3,
        "feels_like": 85.3,
        "precip_prob": 0.32,
        "precip_amount": 0,
        "wind": 7,
        "gust": 11.9,
        "humidity_pct": 46,
        "cloud_pct": 40
      },
      {
        "t": "2026-07-19T09:00:00.000Z",
        "temp": 87.8,
        "feels_like": 87.8,
        "precip_prob": 0.08,
        "precip_amount": 0,
        "wind": 6.5,
        "gust": 12.7,
        "humidity_pct": 40,
        "cloud_pct": 33
      },
      {
        "t": "2026-07-19T10:00:00.000Z",
        "temp": 86.7,
        "feels_like": 86.7,
        "precip_prob": 0.07,
        "precip_amount": 0,
        "wind": 6,
        "gust": 10.4,
        "humidity_pct": 41,
        "cloud_pct": 26
      },
      {
        "t": "2026-07-19T11:00:00.000Z",
        "temp": 88.9,
        "feels_like": 88.9,
        "precip_prob": 0.07,
        "precip_amount": 0,
        "wind": 5.6,
        "gust": 10.3,
        "humidity_pct": 38,
        "cloud_pct": 23
      }
    ],
    "model_run_at": "2026-07-18T12:00:00.000Z",
    "units": "imperial"
  },
  "meta": {
    "endpoint": "/v1/forecast/san-francisco",
    "version": "1.0.0",
    "generated_at": "2026-09-13T09:52:16.484Z",
    "freshness": "realtime",
    "sources": [
      "stub-model"
    ],
    "request_id": "req_00000000",
    "docs": "https://x402-factory.com/docs/weather.forecast.san-francisco",
    "data_mode": "live"
  }
}

Response schema (data payload)

{
  "type": "object",
  "properties": {
    "hourly": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "t": {
            "type": "string"
          },
          "temp": {
            "type": "number"
          },
          "feels_like": {
            "type": "number"
          },
          "precip_prob": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "precip_amount": {
            "type": "number"
          },
          "wind": {
            "type": "number"
          },
          "gust": {
            "type": "number"
          },
          "humidity_pct": {
            "type": "number"
          },
          "cloud_pct": {
            "type": "number"
          }
        },
        "required": [
          "t",
          "temp",
          "feels_like",
          "precip_prob",
          "precip_amount",
          "wind",
          "gust",
          "humidity_pct",
          "cloud_pct"
        ],
        "additionalProperties": false
      }
    },
    "model_run_at": {
      "type": "string"
    },
    "units": {
      "type": "string",
      "enum": [
        "metric",
        "imperial"
      ]
    }
  },
  "required": [
    "hourly",
    "model_run_at",
    "units"
  ],
  "additionalProperties": false
}

The platform wraps every payload in an envelope: { "data": …, "meta": { endpoint, version, generated_at, freshness, sources, request_id, docs, data_mode } }.

Payment (x402)

Unpaid requests receive 402 with payment requirements (accepts). Pay dynamic ($0.01 for hours ≤ 48, $0.03 beyond) 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.

Errors

StatusCodeMeaning
400INVALID_PARAMSInput failed validation; message lists the offending fields.
404NOT_FOUNDNo matching resource; suggestion may point to a sibling endpoint.
410RESOLVEDMarket/event settled; body includes a resolution summary.
503STALE_DATAUpstream feed down; stale data is never silently served beyond 2× cache TTL.
500INTERNALOur bug. The request_id helps us find it.