Stack OverflowBest Weather APIs?
[+131] [20] Soviut
[2009-02-03 15:05:12]
[ api weather web-api weather-api ]

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: - 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]


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


(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: - 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
[+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 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 : - VinnyG
[+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).


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

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


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
[+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-

(3) Really? Did you discuss it with them first? - 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] [2009-02-03 15:09:59] J.J.

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


[+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.

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.

[+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


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

Radarmatic has a JSON API for doppler radar base reflectivity data:

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

FYI: The link for PHP Weather is

(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
[+2] [2009-02-03 15:18:20] Cal

yahoo provides weather rss feeds that work quite well:

[+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.

(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
[+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*%20from%20geo.places%20where%20text%3D%22Barrie%20CA%22&format=xml

STEP 2. Get Weather by WOEID

Completed tutorial for this solution avaialble at:


Yahoo Weather API WOEID retrieval. [2]

Regards, DatNQ


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

I found a google weather API.

Just a simple link to access: (Macau is the city's name)

You can see introduction here:

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

Weather Underground just released a new JSON Weather API.

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

[+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.

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

Download weather widget:

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


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


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

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

it uses the google weather api.

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

I actually created a website for a PocketPC application ( 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

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.

[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

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