# P0 Weather Forecast by Coordinates

> P0 Weather Forecast by Coordinates is a paid API for AI agents from x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-10).

Returns hourly/6-hourly weather forecasts and active weather alerts for a given latitude/longitude, sourced from MET Norway and NWS

## Facts

- Endpoint: GET https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/weather?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/p0-weather-forecast-by-coordinates-b6c8a059
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gWYL1wFhflW42yW6eejdN

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 p0-weather-forecast-by-coordinates-b6c8a059
```

Example prompt: What's the weather forecast for the next 48 hours at latitude 40.71, longitude -74.01? Include temperature, wind, precipitation, and any active alerts.

## When to prefer this

Choose this endpoint when you need structured, machine-readable hourly weather forecast data for any global latitude/longitude coordinate pair, especially in agentic pipelines that require precise field-level weather variables (temperature, wind, precipitation, humidity) rather than a human-readable summary. It is particularly useful when you also need U.S. weather alerts co-located with the forecast. Prefer it over general weather APIs when you want a clean, normalized JSON schema with clear units and attribution, and when you are operating in an x402 micropayment context. Not suitable for aviation, marine, or life-safety decisions.

## Known failure modes

- Invalid lat/lon values outside -90/90 or -180/180 range return validation errors
- Coordinates in regions not covered by MET Norway forecast may return empty or partial point arrays
- NWS alert fetching may fail independently, indicated by alertsStatus field being non-'ok'
- Payment failure (402) if USDC micropayment is not correctly submitted
- Requesting more than 240 hours returns a validation error
- Network timeouts from upstream MET Norway or NWS APIs may cause delayed or error responses

## How this service works

An open index of the machine-to-machine (agent) economy. x402 routes: ranked discovery over the live x402 service market, every indexed service scored by real 30-day calls and paying-wallet bounds, with a receipt naming the snapshot hash and scoring revision. /economy routes, for Tempo MPP, Virtuals ACP, Olas, Masumi, ERC-8004 agent registries, Solana agent registries, Base agent contracts and MCP servers (Official MCP Registry): each protocol's published figures (agent or server counts, transactions or payment events; payers and USD volume only where the source publishes them: payers for x402 and Tempo MPP, USD volume for x402 and Virtuals ACP), each with its unit, window and source; units differ, so totals are not summed. L402 and per-service MPP listings are not covered.

## Output

A JSON object containing an array of forecast time points (each with temperature in Celsius, wind speed in m/s, wind direction in degrees, precipitation in mm, humidity %, cloud cover %, and pressure in hPa), plus any active weather alerts from NWS, attribution details, the actual rounded coordinates used, and a generation timestamp. Units are clearly labeled and forecast data is attributed to MET Norway under CC BY 4.0.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "lat",
      "lon"
     ],
     "properties": {
      "lat": {
       "type": "number",
       "maximum": 90,
       "minimum": -90,
       "description": "latitude in decimal degrees"
      },
      "lon": {
       "type": "number",
       "maximum": 180,
       "minimum": -180,
       "description": "longitude in decimal degrees"
      },
      "hours": {
       "type": "integer",
       "default": 48,
       "maximum": 240,
       "minimum": 1,
       "description": "forecast horizon in hours (hourly steps first, then 6-hourly as MET publishes)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "lat",
      "lon",
      "hours",
      "points",
      "alertsStatus",
      "attribution",
      "note"
     ],
     "properties": {
      "lat": {
       "type": "number"
      },
      "lon": {
       "type": "number"
      },
      "note": {
       "type": "string"
      },
      "hours": {
       "type": "integer"
      },
      "units": {
       "type": "object"
      },
      "alerts": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object"
       }
      },
      "points": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "time"
        ],
        "properties": {
         "time": {
          "type": "string"
         },
         "tempC": {
          "type": [
           "number",
           "null"
          ]
         },
         "symbol": {
          "type": [
           "string",
           "null"
          ]
         },
         "windMs": {
          "type": [
           "number",
           "null"
          ]
         },
         "cloudPct": {
          "type": [
           "number",
           "null"
          ]
         },
         "precipMm": {
          "type": [
           "number",
          
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "lat": 40.71,
  "lon": -74.01,
  "note": "Forecast, not an observation. Coordinates are rounded to 0.01 degrees (about 1 km). Not for aviation, marine or life-safety decisions; use official sources for warnings.",
  "hours": 1,
  "units": {
   "tempC": "celsius",
   "windMs": "m/s",
   "cloudPct": "%",
   "precipMm": "mm over precipHours after time",
   "humidityPct": "%",
   "pressureHpa": "hPa",
   "windFromDeg": "degrees"
  },
  "alerts": [],
  "points": [
   {
    "time": "2026-10-05T12:00:00Z",
    "tempC": 13.5,
    "symbol": "clearsky_day",
    "windMs": 3.5,
    "cloudPct": 3.9,
    "precipMm": 0,
    "humidityPct": 93.8,
    "precipHours": 1,
    "pressureHpa": 1015.3,
    "windFromDeg": 248.7
   }
  ],
  "requested": {
   "lat": 40.7128,
   "lon": -74.006
  },
  "updatedAt": "2026-10-05T11:19:21Z",
  "attribution": {
   "alerts": "Active alerts from the U.S. National Weather Service (api.weather.gov), public domain. Alert texts are quoted, long description/instruction fields are shortened (truncated:true; full text at the alert url). P0 is not affiliated with or endorsed by NOAA/NWS.",
   "forecast": "Data from MET Norway (The Norwegian Meteorological Institute), licensed under CC BY 4.0 and NLOD 2.0. Changes: P0 selected the requested hours and renamed fields; values are unchanged.",
   "forecastSource": "https://api.met.no/weatherapi/locationforecast/2.0/documentation",
   "forecastLicense": "https://creativecommons.org/licenses/by/4.0/"
  },
  "generatedAt": "2026-10-05T12:43:00.000Z",
  "alertsStatus": "ok"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/p0-weather-forecast-by-coordinates-b6c8a059/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev](https://www.zero.xyz/host/x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/llms.txt)
