Search for weather using Java

I was wondering if there is a way to find the weather of a specific city / city using Java. I heard about the Google Weather API, but it did not produce any results. I also heard about using the .xml feed to find the weather, but where can I find it? So I have two questions: is there a way to find the weather for a search using Java, and will I fix the .xml about it?

+4
source share
2 answers

The Google Weather API no longer exists:

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

But you can use others like

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

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

Using Java to retrieve data from the Google Weather API

+2
source

you can use openweathermap api for this. Follow this link and download the api, and you can also see some examples of using http://openweathermap.org/api

+2
source

Source: https://habr.com/ru/post/1434634/


All Articles