WeatherAPI
Weather API with other stuff like Astronomy and Geolocation API
- Authentication
- API Key
- HTTPS
- Yes
- CORS
- Yes
- Category
- Weather
- Documentation / URL
- https://www.weatherapi.com/
Overview
WeatherAPI.com bundles weather with extras: current conditions, forecasts, history, marine weather, astronomy (sun/moon), and a geolocation API — all behind one simple key. CORS-enabled, with a free tier that covers light apps.
Quick Start
Current weather (replace YOUR_KEY):
curl "https://api.weatherapi.com/v1/current.json?key=YOUR_KEY&q=London"
Forecast (up to 14 days on higher tiers):
curl "https://api.weatherapi.com/v1/forecast.json?key=YOUR_KEY&q=Paris&days=3"
Astronomy (sunrise/sunset, moon phase):
curl "https://api.weatherapi.com/v1/astronomy.json?key=YOUR_KEY&q=Tokyo"
Search/lookup locations:
curl "https://api.weatherapi.com/v1/search.json?key=YOUR_KEY&q=berlin"
Authentication
- Register at weatherapi.com for a free key (instant).
- Send it as the
keyquery parameter. qaccepts city,lat,lon, US ZIP, or UK postcode.
Rate Limits & Notes
- Free tier: 100 requests/day (verify on the pricing page — it’s small, paid tiers scale up to 1M+/month).
- The free tier covers current + forecast (up to 3 days) + astronomy + timezone; history and higher forecast days are paid.
aqi=yes/alerts=yesadd air quality and weather alerts (tier-dependent).- CORS is enabled — browser calls work (good for client-side widgets).
FAQ
Is WeatherAPI free? There’s a small free tier (about 100 requests/day); higher limits and history are paid.
What’s included? Current weather, forecasts, astronomy (sun/moon), timezone, marine data, and a geolocation API.
Can I call it from the browser? Yes — CORS is enabled.