You are here: Home // App Development 101 // Where To Get Free Weather Data For Your App

Where To Get Free Weather Data For Your App

If you’re building an app that needs access to the current weather or forecasts, luckily there are a couple of API’s that will allow you to do that. The best thing? They’re absolutely free to use!

WorldWeatherOnline has an awesome weather API. It can be used for commercial or non-commercial projects. You’ll need to register but will let you send a request and receive an XML/JSON response with all kinds of information for the location you’re searching. The interesting thing is the actual search is pretty flexible. You can search by city name, zip code, or latitude/longitude coordinates.

The data in the response is pretty amazing. It brings back the current temperature, wind speed and direction and the 5-day forecast. There are tons of options to play around with to customize it with the information you require.

There are a few minor stipulations. 500 requests max. per hour (though they say that can be increased), and one that could require a bit of work - if a new request for the same location is made within 15 minutes, the data should be cached (so you’re not requesting it again from the server).

They do require a credit but it’s pretty simple. They explain it in their Usage Policy.

Yahoo! Weather is another way to go. Their API lets you request the weather for a locaiton but it does require a bit of work to set up the location codes.

Rather than searching a city name directly, the API needs a location code called a  WOEID. You can find this by going to their weather page and searching for a location then using the code it brings back in the URL as a location when you send a query. It sounds sort of confusing but it’s actually pretty simple. Their site has instructions.

The response includes the current temperature, image (ie. a cloud, a sun or rain), a two day forecast and links to the complete forecast on the Yahoo! site along with a link to the Weather Channel.

It seems to be updated constantly (the WorldWeatherOnline site is updated only every few hours if I remember correctly) so if you’re looking for up-to-date weather, this might be the ideal choice.

However, the location codes can be limiting so it would work better in an app where the locations are already defined (so you can find the locations the users will search ahead of time).

One interesting feature is that it can bring back the result in Farenheit or Celcius for localization purposes (ie. for an app geared to the Canadian market, you could use Celcius in the results).

Either way, it’s awesome that these tools are available and could make even the most boring app a lot more interactive!

Leave a Reply

Copyright © 2011 Take My Ideas. All rights reserved.
Designed by Theme Junkie. Powered by WordPress.