Find weather using Java

Jeel Shah picture Jeel Shah · Sep 17, 2012 · Viewed 25.7k times · Source

I was wondering if there is a way to find the weather of specific town/city using Java. I have heard of Google Weather API but that has not yielded any results. I also have heard about using an .xml feed for finding the weather but where can I find that? Therefore, I have two questions, Is there a way to find the weather to find using Java and am I correct about the .xml?

Answer

davek picture davek · Sep 17, 2012

The Google Weather API appears to be no more:

http://thenextweb.com/google/2012/08/28/did-google-just-quietly-kill-private-weather-api/

But you can use others such as

http://www.wunderground.com/weather/api/

Once you have your XML (or JSON) you can parse it as described here:

Using Java to extract data from google Weather API