WeatherAPI
APIComprehensive weather API with astronomy and geolocation data
Overview
WeatherAPI provides RESTful endpoints for current weather, 1-14 day forecasts (hourly/daily), astronomy data (sunrise/sunset, moon phases), and geolocation (search by city, ZIP, or coordinates). Responses are in JSON format. Key endpoints include /current.json (real-time conditions), /forecast.json (predictive data), /astronomy.json (celestial events), and /search.json (location lookup). Ideal for integrating into mobile apps, travel platforms, agricultural tools, or location-based services to deliver weather insights plus related astronomical and geospatial context.
Example Integration (JavaScript)
fetch('https://www.weatherapi.com/')
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err)); Key Features
- RESTful API
- JSON Responses
- Current & 14-Day Forecasts
- Astronomy Data
- Geolocation Search
- Historical Weather (Paid Tiers)
Frequently Asked Questions
? Is WeatherAPI free to use?
Yes, WeatherAPI offers a free tier with limited monthly API calls, plus paid tiers for higher usage and advanced features like historical weather data.
? Does it require an API Key?
Yes, all requests need an API key, which you can get by signing up for an account on the WeatherAPI website.
? What is the response format?
WeatherAPI returns all responses in JSON format for consistency and ease of integration.
Top Alternatives
People Also Ask about WeatherAPI
Tool Info
Pros
- ⊕ All-in-one data (weather + astronomy + geolocation)
- ⊕ Easy-to-integrate endpoints
- ⊕ Flexible pricing (free tier available)
- ⊕ Reliable real-time updates
Cons
- ⊖ Free tier has rate limits
- ⊖ Historical data requires paid plan
- ⊖ No XML support
- ⊖ Limited calls in free tier