{"x402Version":2,"service":{"name":"Weather Data API","description":"Global weather: current conditions, forecasts, historical data, air quality","version":"1.0.0","homepage":"https://github.com/chetparker/x402-weather-api"},"payment":{"payTo":"0xFFc458dB291b4ABcE020fE3de4f91F2770E537b1","network":"eip155:8453","scheme":"exact","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"},"endpoints":[{"method":"POST","path":"/current","price":"0.001","description":"Current weather conditions","extensions":{"bazaar":{"info":{"input":{"type":"http","method":"POST","bodyType":"json","body":{"location":"London"}},"output":{"type":"json","example":{"location":{"name":"London","country":"United Kingdom","latitude":51.50853,"longitude":-0.12574},"current":{"temperature_c":12.4,"feels_like_c":10.1,"humidity_pct":78,"precipitation_mm":0.0,"rain_mm":0.0,"wind_speed_kmh":14.3,"wind_direction_deg":230,"weather_code":2,"weather_description":"Partly cloudy","time":"2026-05-02T10:00","timezone":"Europe/London"},"cached":false}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST","PUT","PATCH"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"type":"object","properties":{"location":{"type":"string","description":"City or place name to fetch weather for (e.g. 'London', 'New York')."},"latitude":{"type":["number","null"],"description":"Optional latitude override (decimal degrees, -90 to 90)."},"longitude":{"type":["number","null"],"description":"Optional longitude override (decimal degrees, -180 to 180)."}},"required":["location"]}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"location":{"type":"object"},"current":{"type":"object","description":"Temperature, feels-like, humidity, precipitation, wind, weather code/description."},"cached":{"type":"boolean"}}}},"required":["type"]}},"required":["input"]}}}},{"method":"POST","path":"/forecast","price":"0.001","description":"Multi-day weather forecast (1-16 days)","extensions":{"bazaar":{"info":{"input":{"type":"http","method":"POST","bodyType":"json","body":{"location":"London","days":7}},"output":{"type":"json","example":{"location":{"name":"London","country":"United Kingdom","latitude":51.50853,"longitude":-0.12574},"days":7,"forecast":[{"date":"2026-05-02","temp_max_c":17.2,"temp_min_c":9.4,"precipitation_mm":0.4,"rain_mm":0.4,"wind_max_kmh":22.7,"weather_code":61,"weather_description":"Slight rain","sunrise":"2026-05-02T05:24","sunset":"2026-05-02T20:31"}],"cached":false}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST","PUT","PATCH"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"type":"object","properties":{"location":{"type":"string","description":"City or place name to forecast weather for."},"days":{"type":"integer","minimum":1,"maximum":16,"description":"Number of forecast days to return (1-16). Defaults to 7."}},"required":["location"]}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"location":{"type":"object"},"days":{"type":"integer"},"forecast":{"type":"array","description":"Daily forecast entries with min/max temp, precipitation, wind, weather code, sunrise/sunset."},"cached":{"type":"boolean"}}}},"required":["type"]}},"required":["input"]}}}},{"method":"POST","path":"/historical","price":"0.001","description":"Historical weather data","extensions":{"bazaar":{"info":{"input":{"type":"http","method":"POST","bodyType":"json","body":{"location":"London","start_date":"2024-01-01","end_date":"2024-01-07"}},"output":{"type":"json","example":{"location":{"name":"London","country":"United Kingdom","latitude":51.50853,"longitude":-0.12574},"days":7,"history":[{"date":"2024-01-01","temp_max_c":9.8,"temp_min_c":4.2,"precipitation_mm":1.6,"rain_mm":1.6,"wind_max_kmh":19.8,"weather_code":61,"weather_description":"Slight rain"}],"cached":false}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST","PUT","PATCH"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"type":"object","properties":{"location":{"type":"string","description":"City or place name to fetch historical weather for."},"start_date":{"type":"string","description":"Start date in YYYY-MM-DD format."},"end_date":{"type":"string","description":"End date in YYYY-MM-DD format."}},"required":["location","start_date","end_date"]}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"location":{"type":"object"},"days":{"type":"integer"},"history":{"type":"array","description":"Daily historical weather records with temp, precipitation, wind, weather code."},"cached":{"type":"boolean"}}}},"required":["type"]}},"required":["input"]}}}},{"method":"POST","path":"/air-quality","price":"0.001","description":"Air quality index","extensions":{"bazaar":{"info":{"input":{"type":"http","method":"POST","bodyType":"json","body":{"location":"London"}},"output":{"type":"json","example":{"location":{"name":"London","country":"United Kingdom","latitude":51.50853,"longitude":-0.12574},"air_quality":{"european_aqi":38,"us_aqi":47,"aqi_category":"Good","pm10":14.2,"pm2_5":8.7,"carbon_monoxide":210.0,"nitrogen_dioxide":22.4,"sulphur_dioxide":1.6,"ozone":64.1,"time":"2026-05-02T10:00"},"cached":false}}},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"type":"object","properties":{"type":{"type":"string","const":"http"},"method":{"type":"string","enum":["POST","PUT","PATCH"]},"bodyType":{"type":"string","enum":["json","form-data","text"]},"body":{"type":"object","properties":{"location":{"type":"string","description":"City or place name to fetch air quality for."}},"required":["location"]}},"required":["type","method","bodyType","body"],"additionalProperties":false},"output":{"type":"object","properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"location":{"type":"object"},"air_quality":{"type":"object","description":"European/US AQI, category, PM10, PM2.5, CO, NO2, SO2, O3 readings."},"cached":{"type":"boolean"}}}},"required":["type"]}},"required":["input"]}}}}]}