wttr.in

Console-friendly weather service supporting plain text, JSON, and PNG output

wttr.in is a console-oriented weather service that returns weather data in plain text, ANSI-colored terminal output, JSON, or PNG image format. It's powered by multiple weather data sources and supports location lookup by city name, airport code, domain name, GPS coordinates, or even landmark names. The service requires zero authentication and has no signup process — just curl it. For OpenClaw agents, wttr.in is the go-to weather API when you want zero friction. No API keys, no signup, no rate limit headaches. Use `?format=j1` for structured JSON, `?format=3` for a one-line summary, or fetch the raw terminal art to send as a code block in chat. It's the fastest path from "I need weather data" to having it in your agent's hands. Perfect for skill scripts, heartbeat checks, and quick weather lookups.

Tags: forecast, weather

Category: Weather

Use Cases

  • Quick weather checks in OpenClaw heartbeats with zero auth overhead
  • Send weather PNG images directly to Telegram/Discord for visual forecasts
  • One-line weather summaries for morning briefing messages using format=3
  • Structured JSON weather data for decision-making in agent workflows (travel, outdoor plans)

Tips

  • Use ?format=j1 for JSON — it's the richest structured format with current conditions, 3-day forecast, and hourly breakdowns.
  • For quick agent messages, ?format=%C+%t gives you just the condition and temperature in one line.
  • Append ?lang=XX for localized weather descriptions (e.g., ?lang=hi for Hindi).
  • The PNG output makes beautiful weather cards — pipe it to Telegram as an image for visual weather reports.
  • Use ?m for metric, ?u for USCS, or ?M for wind speed in m/s specifically.

Known Issues & Gotchas

  • The default output is ANSI terminal art — useless in JSON contexts. Always use ?format=j1 for structured data.
  • DNS-based lookups can be slow on first request. Subsequent requests are faster due to caching.
  • Location names with spaces need URL encoding (e.g., 'New+York' or 'New%20York').
  • The service occasionally goes down for maintenance. Have a fallback if weather is mission-critical.

Frequently Asked Questions

Do I need an API key for wttr.in?

No. wttr.in requires absolutely no authentication. Just make a GET request to wttr.in/{location} and you get weather data back immediately.

What output formats does wttr.in support?

Plain text (default terminal art), JSON (?format=j1), PNG images (.png suffix), one-line formats (?format=1 through ?format=4), and custom format strings (?format=%C+%t for condition+temp). The JSON format is best for programmatic use.

How accurate is wttr.in compared to paid weather APIs?

wttr.in aggregates data from multiple sources including WorldWeatherOnline. It's reliable for general forecasts but may lag behind premium APIs for hyperlocal or minute-by-minute precision. For most agent use cases, it's more than sufficient.

Can I get multi-day forecasts from wttr.in?

Yes. The default output includes a 3-day forecast. The JSON format (?format=j1) includes detailed hourly breakdowns for today and the next 2 days.