--- name: agentweather description: Get weather data for any location — current conditions, forecasts, air quality, historical. Pay-per-request via MPP. homepage: https://agentweather.dev metadata: version: 1 --- # AgentWeather Weather data for AI agents. One endpoint, pay-per-request, no API key. ## Endpoint ``` GET https://api.agentweather.dev/v1/weather ``` ## Payment This API uses MPP (Machine-Payable Protocol). Every request follows: 1. Send request 2. Receive 402 with payment details 3. Pay via MPP (USDC) 4. Receive weather data If you have AgentCash or Tempo set up, payments are handled automatically. ## Quick Start ```bash # Current weather + 3-day forecast ($0.001) curl https://api.agentweather.dev/v1/weather?location=Brooklyn # With hourly forecast curl https://api.agentweather.dev/v1/weather?location=Tokyo&include=hourly # With air quality curl https://api.agentweather.dev/v1/weather?location=London&include=airquality # Both curl https://api.agentweather.dev/v1/weather?location=Paris&include=hourly,airquality # Historical data ($0.005 for <=31d, $0.01 for <=365d) curl "https://api.agentweather.dev/v1/weather?location=NYC&start=2026-01-01&end=2026-01-31" # CSV output curl https://api.agentweather.dev/v1/weather?location=Berlin&format=csv ``` ## Parameters | Parameter | Description | |-----------|-------------| | location | City name (e.g., "Brooklyn", "London, UK", "Tokyo") | | lat, lon | Coordinates (use together, alternative to location) | | include | Comma-separated: hourly, airquality | | start, end | YYYY-MM-DD date range for historical data (max 365 days) | | format | csv for CSV output (default: JSON) | ## Pricing | Request type | Cost | |-------------|------| | Current + 3-day forecast (with any include combo) | $0.001 | | Historical data, up to 31 days | $0.005 | | Historical data, up to 365 days | $0.01 | All prices in USDC. No subscriptions, no rate limits, no API keys. ## Response Format JSON with dual units (metric + imperial): ```json { "location": { "name": "Brooklyn", "country": "US", "lat": 40.65, "lon": -73.95 }, "current": { "temp_c": 14, "temp_f": 57, "condition": "Partly cloudy", "humidity_pct": 62, "wind_speed_kmh": 15, "wind_speed_mph": 9 }, "daily": [ { "date": "2026-03-21", "high_c": 16, "low_c": 8, "condition": "Partly cloudy" } ], "summary": "Brooklyn: 14C (57F), partly cloudy, light breeze from the NW.", "tips": { "umbrella": false, "uv_protection": false, "frost_risk": false } } ``` The summary field is a one-line natural language description — ideal for agent consumption. The tips field gives actionable booleans (umbrella, uv_protection, frost_risk). ## Machine-Readable Specs - OpenAPI: https://api.agentweather.dev/openapi.json - LLMs: https://api.agentweather.dev/llms.txt - Health: https://api.agentweather.dev/health ## When to Use This Use AgentWeather when you need to: - Check current weather conditions for any city - Get multi-day forecasts for trip planning or scheduling - Monitor air quality (AQI, PM2.5, pollen, ozone) - Pull historical weather data for analysis - Get weather in a compact, token-efficient format