share
Stack OverflowBest Weather APIs?
[+131] [20] Soviut
[2009-02-03 15:05:12]
[ api weather web-api weather-api ]
[ http://stackoverflow.com/questions/507441/best-weather-apis ] [DELETED]

What weather services have APIs? Out of the handful or so, which ones are easiest to tie into? Do they use "raw" HTTP requests or web services? Are there wrapper APIs for Python, .NET, Java, etc. Which have you had the best experience with?

FWIW you may be interested in my weather site that uses the NOAA NDFD weather API: weathermole.com - Julien Chastang
Which ones cover which subsets of the world would also be useful. - hippietrail
[+73] [2009-02-03 15:18:07] Bill the Lizard [ACCEPTED]

Update:

ProgrammableWeb is currently listing 13 weather APIs [5] in their directory.

[1] http://www.nws.noaa.gov/forecasts/xml/
[2] http://developer.yahoo.com/weather/
[3] http://www.codeplex.com/awAPI
[4] http://animaonline.blogspot.com/2007/07/google-weather-api.html
[5] http://www.programmableweb.com/apitag/weather

(7) The Google Weather API however is undocumented and unofficial so it may be turned off at some point. But it is certainly the fastest of the three to get started with. - jtyost2
(6) Just as an update to this, the NWS has a RESTful API now, too: weather.gov/forecasts/xml/rest.php - notJim
(2) Yahoo's looks very good, but is for non-commercial use.. - Tom Brito
So, if we use these weather API with Google Maps, which is the best? - anticafe
@anticafe: I can't say which is best, but I'd have to give some advantage to Google’s Secret Weather API if I were trying to integrate with another Google API. Also, check out my update to see if any of the other APIs listed at ProgrammableWeb appeal to you. - Bill the Lizard
I've used the NWS SOAP service for quite a while, but it's a bear. Heavy and unpleasant. I haven't tried that REST API yet, hopefully it's a bit nicer to work with. - Kelly
1
[+25] [2009-02-03 15:13:51] SilentGhost

weather underground has xml api [1], i haven't used it, but judging by their website the service is quite useful in general.

[1] http://wiki.wunderground.com/index.php/API_-_XML

+1 weather underground is very useful. I work for a company with a strong interest in meteorology, we sometimes use their data. - MarkJ
(1) google uses it too ;) - SilentGhost
(3) I've used this, however it does time out quite frequently. - Frederico
(1) It now also support JSON : wunderground.com/weather/api - VinnyG
2
[+11] [2009-06-12 14:03:23] ideasasylum

Not sure if it was just free services that you were after? Free data (except NOAA) usually means that you can only use it on free sites: no subscriptions or even Google ads! It's usually quite basic (although fine for general use). Commercial-use data is more expensive and the providers don't tend to be very open about pricing etc. I've also found several sites claiming to provide commercial weather data who don't reply to contact emails. Very few data providers provide or support any programming libraries and generally just provide an XML, CSV or plain text data file -- though third-party libraries exist.

HAMweather have a raw data service [1], although it's not free. They provide an XML file in response to a simple HTTP call. They also provide a database dump of place names (so you can build a browseable interface) or you can query by long/lat and they support international locations. There's a Ruby api available on github (third-party, I haven't used it) and I'm sure there are other examples out there (I can't post more than one link)

HAMweather also have a PHP-based library ("HAMweather 3") for retrieving / displaying weather forecasts (free, with some conditions). The website is quite lacking in information but ping them an email and they can provide examples, pricing, documentation etc (I'm only a user of their services).

[1] http://www.hamweather.com/

(2) +1 good points about the commercial aspects. - Soviut
3
[+11] [2009-11-19 10:50:40] Den

Found World Weather Online [1] for weather api search on google

[1] http://www.worldweatheronline.com

I used it and i like it. To bad that the forecast is only on 5 days max(i need longer forecasts right now..) - Quamis
4
[+6] [2010-07-08 06:33:07] Prasanta

I would suggest Wunderground It is free and the basic set of API that they provide is simple to use and developer friendly.

I have developed one Weather Forecast application based on their API for Android- http://code.google.com/p/cityweather/


(3) Really? Did you discuss it with them first? wiki.wunderground.com/index.php/API_-_XML - funkybro
(1) It's definitely NOT free, and they require you to cite them even if you pay tons of money. Someone told me. - dontWatchMyProfile
5
[+5] [2009-02-03 15:09:59] J.J.

I know of 1 company that has used Weather.gov [1]'s in the past.

[1] http://www.programmableweb.com/api/noaa-weather-service

6
[+4] [2009-02-06 22:24:51] Darren Griffith

PyMETAR is a python-based API that fetches and decodes METAR (text-based aviation weather) reports. I enjoy using it for my projects.

http://www.schwarzvogel.de/software-pymetar.shtml

METARs give temperature, dew point (humidity), wind, current conditions (rain, snow, fog, sunny), atmospheric pressure, etc.

Note that METARs do not include forecast information; TAFs are used for this. But PyMETAR does not handle TAFs.


7
[+4] [2009-06-12 13:58:28] ideasasylum

Accuweather have an API [1] similar to HAMweather (i.e. XML files over HTTP or FTP) but again it's not free and you'll need to contact them for information/pricing

[1] http://www.accuweather.com/promo-ad.asp?partner=accuweather&traveler=0&dir=aw&page=forecastfox

8
[+4] [2010-09-06 20:51:46] roland

Radarmatic has a JSON API for doppler radar base reflectivity data: http://radarmatic.com/api.html


9
[+3] [2009-10-18 00:10:58] meme

FYI: The link for PHP Weather is http://phpweather.sourceforge.net/


(2) One issue with PHP Weather is the code there is very old (from 2004) as of writing and makes use of deprecated PHP abilities, such as $HTTP_GET_VARS. - jtyost2
10
[+2] [2009-02-03 15:18:20] Cal

yahoo provides weather rss feeds that work quite well:

http://developer.yahoo.com/weather/


11
[+2] [2009-02-03 16:30:30] thorncp

The Weather Channel also provides a web based API that allows searching by city or zip code. IIRC, it was pretty straightforward to use.

http://www.weather.com/services/xmloap.html


(5) the weather channel api requires a long and unfriendly user registration. They also try to trick you into accepting a lot of spammy offers. I was very disappointed with using this service. - Iggy
Agreed - then once you get through the spammy offers it limits your use extensively (no use of weather data on mobile websites or apps, for example) - GavinR
Yeah, I had been using their API for a while (after making it through the tedious registration process), just to have them recently turn this into an expensive paid service. I emailed them to complain, and they told me to use their RSS feed instead...which is pretty much useless. Now I'm using the Google API and it works great. - Jonathan
12
[+2] [2011-05-10 17:08:00] nguyendat

I have litter experiment with YAHOO WEATHER [1] API,

Weather ScreenShot

and it work fine following solution:

STEP 1. Get WOEID by location

http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20text%3D%22Barrie%20CA%22&format=xml

STEP 2. Get Weather by WOEID

http://weather.yahooapis.com/forecastrss?w=%s&u=c

Completed tutorial for this solution avaialble at: http://www.anddev.org/advanced-tutorials-f21/android-weather-forecast-yahoo-weather-api-t52949.html

References:

Yahoo Weather API WOEID retrieval. [2]

Regards, DatNQ

[1] http://developer.yahoo.com/weather/
[2] http://stackoverflow.com/questions/1822650/yahoo-weather-api-woeid-retrieval

13
[+2] [2011-05-23 10:05:41] terenf

I found a google weather API.

Just a simple link to access: http://www.google.co.uk/ig/api?weather=Macau (Macau is the city's name)


You can see introduction here:
http://blog.programmableweb.com/2010/02/08/googles-secret-weather-api/


14
[+2] [2011-09-09 21:01:57] Matthew Gregory

Weather Underground just released a new JSON Weather API.

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

However to do more than token testing you will have to pay.


15
[+1] [2009-02-03 15:22:03] Aputsiaq

There is a project at Sourceforge called "PHP Weather" that makes use of METAR-data in a neat way.


16
[+1] [2011-03-15 20:45:27] Roko C. Buljan

Download weather widget:

I played around Google's API xml, you can try THIS:

WEATHER WEB WIDGET [1]

(The only problem: I was not able to fetch local time and add night icons. Give it a try and let me know! ;)

[1] http://roxon.in/weather/

17
[+1] [2011-06-20 01:35:27] jfrez

I recently develop a weather page with geolocalitation (HTML5), try this api:

http://www.theweathernow.net/api/

it uses the google weather api.


18
[+1] [2011-07-29 20:57:27] Dave

I actually created a website for a PocketPC application (StocksAndWeatherToday.com). The application was, as the name implies, an application which displayed weather to the user.

At one point in time it was the top selling application on Handango.

In its early stages it would go directly to NOAA and do screen scrapes. This was painful and required updating the app every time NOAA changed the format.

A website was created to do this so the PocketPC application could go to the website and get the data.

This greatly reduced the complexity of the application and the number of updates required. In fact, people are still using the application and it has not been updated in years.

The weather site has been around since 2005 but I have not really advertised it.

I used to have a forum but it got bombarded by spammers so I shut it down.

If interested in the site go to http://www.XmlWeather-USA.com

I just put up a simple main page which gives you an example.

Although the site implies it is only for the USA, I also put in the capability to get weather for many international cities.


19
[0] [2011-06-23 12:25:03] Vera

RP5.US [1] - Weather for 243 countries including 35'747 locations in United States of America.
The service is free.
XML for example: XML [2]
RSS for example: RSS [3]
RP5.US give Cloudiness; Precipitation; Pressure; Temperature; Humidity; Wind; Sun, sunrise/sunset; Moon, moonrise/moonset; Moon, phase.

[1] http://RP5.US
[2] http://rp5.us/xml/720/en
[3] http://rp5.us/rss/259235/en

Links don't work - looks like it's not hosted anymore. - Owen
20