Recently Weather Underground announced that they’re no longer supporting their free API plans.
I really liked WUnderground and used it in several projects, but if you’re relaying on external services you have to remember that your API provider can change. So don’t tie yourself with specific solution.
Are there better alternatives?
I switched into OpenWeatherMap recently. The main reason is excellent API and huge amount of stations in desired area (check it out for yourself). Other great advantage is that it has a free plan if you don’t have big need for weather data. You can use current weather condition data as well as forecasts. But there’s plenty of other data to use – of course there are endpoints with weather layers for maps among other resources such as historical weather data, air pollution or UV index.
How can you start?
- Register and create an API key
- Get the list of the stations and find interesting stations
- Get familiar with API documentation – it’s well documented and very straightforward
- Get current weather data in multiple locations using single request.
The units are in metric standard (which means Celsius grades, meters and hPa) and you can choose your language (it’s used for weather conditions description):
- Get current weather data using exact coordinates
- Get weather forecast for given station id. The forecasts are for 5 days every 3 hours
Alternative weather data providers
Choosing your weather API provider you should consider another popular APIs: Yahoo Weather, World Weather Online or AccuWeather.
The main thing to consider is data quality in selected area or the amount of available stations. Another important thing is to prepare your software architecture for possible future provider changes.