It’s 54 degrees today in Mountain View, which any Googler could tell you by looking outside… or by using the company’s undocumented weather API. The service was created for use with iGoogle, but the interface is easily discoverable and covers a handful of other features, in addition to weather.
Dennis Delimarsky compared several weather APIs and decided that Google’s is best, despite having no documentation or support from the company. One reason Delimarsky found it useful is that Google left little work to the developer:
Unlike many others, the XML response for Google Weather API calls is quite explicit. No need to figure out what a specific abbreviation means or whatever a code means to a developer. There is either a positive response (with conditions) or a response notifying of an error.
Indeed, you just simply pass a city name or postal code, such as this Mountain View query:
http://www.google.com/ig/api?weather=Mountain+View
to get an XML response like this:

And the reason for the human-readable XML goes back to the original purpose of this API. The iGoogle dashboard simply consumes the feed and styles it for users. If the XML was complicated, so would be the weather on the iGoogle page.
The API has been accessible for some time, but it’s as unofficial as can be. Tom Fitzgerald provided some documentation and PHP source back in August. And almost two years ago someone asked about it on a Google message board, with Googler Jeff Fisher stating that it is “for gadget use only.”
There are a handful of official weather APIs. And, as we noted in our weather APIs post in April, there is a lot of developer interest. ProgrammableWeb lists 83 weather mashups, but only 8 weather APIs.
For those willing to skirt the line and use Google’s unofficial weather API, you’re in for an additional treat. The iGoogle interface can also access Google’s secret stock API and a strange abbreviated movies API, in addition to a news feed that goes beyond the top three items usually provided by the Google News RSS.





©ProgrammableWeb.com 2013. All rights reserved.
Terms of Service | Privacy Policy
68 Responses to “Google’s Secret Weather API”
at 1:14 pm
I was looking for something like this while building a YOS application. However, I couldn’t find a weather API that output non-english text. Do you know what parameter would allow the user to switch languages? I tried lang=fr and intl=fr with no luck. The api still works, but it is in English.
at 12:06 pm
hl=ISO 639-1 Language Code
For example, to get the weather for Paris, France in French, one would use the following URL:
http://www.google.com/ig/api?weather=paris,france&hl=fr
at 4:52 am
Where does the weather information come from? Is it the official government weather bureau? The Weather channel?
at 8:18 pm
Well after waiting 4 days for a response, none has been forthcoming. I know why.
Google has the wrong weather information.
The observations dont match the official government observations, and the forecasts dont either. They dont match the Weather Channel’s either.
This means that Google’s API might be easy to use, but the information it provides appears to be useless, since it’s wrong. IF you put weather information on your web site and someone acts on that information, and it subsequently turns out to be disastrously wrong, you can end up with a liability. IN our case we’re a radio station, and we carry the official weather forecasts on the air. We can’t have different forecasts and observations on our web site.
It’s a pity Google cant see fit to identify who’s making up the information they’re giving out, and give their information some credibility.
at 11:05 am
[...] Google’s Secret Weather API GoogleのSecretAPIが便利そう 天気API 株価API ニュースAPI [...]
at 12:25 pm
@MikeKear it seems Google gets the data from Weather Underground http://stackoverflow.com/questions/507441/best-weather-apis
at 11:38 am
We have been using http://www.worldweatheronline.com/weather-api.aspx . It’s free and seems to be really good and has a forum too.
at 3:03 am
Is anyone aware of an api like this but to be used to search for information such as hottest or wettest place ? Thanks in advance for any help.
at 4:07 am
[...] dataerne er hentes fra google’s “secret weather service“, som jeg i øvrigt heller ikke har kunnet finde nogen dokumentation på fra googles side af, [...]
at 3:59 pm
[...] Google’s secret weather API: [...]
at 12:16 pm
[...] What are we going to update the DNS with? As an example, I'm going to add a DNS resource record called city.temp.aa, with city being the name of the town I'd like to be in. The resource record will be a TXT record containing the current temperature. But where do I get that from? I'm going to use the Yahoo! Weather API to retrieve the current temperature of the location(s) I'm interested in. I could also use Google's not-very-well-documented (a.k.a. secret) weather API. (Read about that here.) [...]
at 5:39 am
I think the criteria for choosing the “Best” API should not be how easy is it for the developer to implement but how accurate data it provides and how stable it is from the inside, so that a developer doesn’t needs to update his code every time google update its own.
at 2:31 pm
I implemented this weather function on eXorithm. You can see the source code (and run it) at:
http://www.exorithm.com/algorithm/view/weather_forecast
at 8:54 am
Any know if this would take long and lat points and give you the forecast according to them?
at 9:18 am
I don’t think so, Bob. Since it’s undocumented, it’s hard to say for sure. However, you could use a reverse geocoder to determine the city from lat/long. Then pass the city name to the Google Weather API.
See a list of geocoders here:
http://www.programmableweb.com/apitag/geocoding
at 12:13 am
Windspeed on homepage is very different from weather page
at 11:51 am
Hi Adam,
I just finished a javascript library to get the data from Google. Check it out: http://blog.hohmann.nu/google-weather-library
Cheers!
at 7:20 am
[...] is a component that uses Google’s weather API to display the weather of a city as shown in the following [...]
at 4:43 am
[...] This is how a Public Sector API should work Yesterday I blogged about why the Public Sector should shift their focus from websites to webservices and apps. In order to give all of you who are not developers an idea how such an API should work, have a look at the Google Weather API. [...]
at 8:06 am
I have found the weather data is totaly off base. The temp. forecasts for my city are out by 8-10 Degrees C. This api is useless.
at 2:24 am
Hi Guys..I am new to these APIs. Can you please help me selecting paid/free in the following to cover important cities all over the world:
a. Weather
b. Currency conversion
c. Distance between cities
d. Distance between Airport
e. Translator tool
at 8:36 pm
[...] I’ve tried a few solutions but all of them suck due to poor documentation (PHP Weather I’m looking at you), jingoistic support for only USA airports (PHPWeatherLib) or being otherwise perfect but too simplistic (Google Weather API). [...]
at 3:51 am
Google recently changed their API, as far as the icon data, anyway. The API changed the location of the icons to a sub-directory at gstatic.com. Most apps (including the one I wrote) hard-coded the main URL and used forecast->icon['data'] to grab the current image.
Since the full URL of the icon location is in the API, now, simply removing the “http://google.com” from the code will restore working icons to the apps that they seem to have went missing on.
at 11:40 am
Thank you Tom. I just noticed that my icons had disappeared, and was trying to figure out why. Your solution solved my issue!
at 2:45 pm
I prefer the old icons, cause the new white background looks bad on non-white boxes, maybe if they were transparent. However the old icons are still there so i tryed to change the new url with the old one with regex but new names are different, like: partycludy instead of party_cloudy so I couldn’t do that
at 4:36 am
Well, man, it looks like they saw your comment about the old icons. They actually just changed everything back to the way it was, earlier this morning. Had to add the base URL back into the code to get it working again. No idea why it was changed to begin with, then changed back, though.
at 12:37 pm
Yes Tom, the old icons are back! I just hope that they are not going to change them again soon cause I’m getting tired of add and remove the base url! ahah
at 3:19 pm
[...] Vorhersage per XML zurück. Die Funktionsweise und Nutzung ist im Netz ja inzwischen hinlänglich dokumentiert (oder auch [...]
at 6:37 pm
I recently develop a weather page with geolocalitation (HTML5), try this api:
http://www.theweathernow.net/api/
it uses the google weather api.
at 10:46 am
iOS and Mac developers, you can use an API that I have created for Google’s weather service. It basically does all the parsing and stores everything in NSStrings, NSDates, NSURLs, and NSNumbers.
http://iphonecodesamples.wordpress.com/2011/07/21/an-iphone-api-for-accessing-googles-secret-weather-service/
at 5:18 pm
[...] as how we were experimenting with the google weather API we thought, “Why not combine [...]
at 9:38 am
[...] is one of 16 weather APIs in the index, which does not include Google’s Secret Weather API. Related ProgrammableWeb ResourcesLearn more Weather Underground (Wunderground) API [...]
at 7:42 am
[...] serwisów pogodowych udostępnia swoje API, my początkowo wybraliśmy „sekretne” api google weather, jednak mimo dobrej dokumentacji jeszcze niedawno było całkiem mało stabilne i często nie [...]
at 9:06 am
You can ask the google weather for multiple places like below:
$xml = simplexml_load_file(‘http://www.google.com/ig/api?weather=Amsterdam&weather=Cambodja’);
//$information = $xml->xpath(“/xml_api_reply/weather/forecast_information”);
$current = $xml->xpath(“/xml_api_reply/weather/current_conditions”);
echo ‘
icon['data'].’” alt=”weather”>
‘.$current[0]->temp_c['data'].’° C
‘;
$city["Name"] = “Amsterdam”;
$city["GMT"] = 1.0;
$city["actualDST"] = 0.0; //Because it’s summer time
$gmt_diff = $city["GMT"]+$city["actualDST"]; //your functions for getting the hour difference betweer the city and the GMT
$city_time = time()+($gmt_diff*3600); //sum the timestamps
//echo ”.gmdate(“”,$city_time); //echo the formatted date
echo ‘ ’.gmdate(“H:i”,$city_time).’ ’;
echo ‘
icon['data'].’” alt=”weather2″>
‘.$current[1]->temp_c['data'].’° C
‘;
$city["Name"] = “Phnom Penh”;
$city["GMT"] = 7.0;
$city["actualDST"] = 0.0; //Because it’s summer time
$gmt_diff = $city["GMT"]+$city["actualDST"]; //your functions for getting the hour difference betweer the city and the GMT
$city_time = time()+($gmt_diff*3600); //sum the timestamps
//echo ”.gmdate(“”,$city_time); //echo the formatted date
echo ‘ ’.gmdate(“H:i”,$city_time).’ ’;
echo ‘
at 2:23 pm
[...] weather plugin say Invalid license key What about Google Google’s Secret Weather API WeatherBug WeatherBug API Profile Accuweather AccuWeather API Profile Weather Central Weather [...]
at 5:40 am
I just noticed that Google went from the default 5-day forecast to a 4-day forecast. It changed within the past 24 hours, and I don’t know if they’ll bring the 5-day back.
Not sure what kids of display problems this may bring for others, but the vertical listing that I have, now has some extra space at the bottom. I’ll have to fill it with something if they leave it this way.
at 5:00 pm
[...] (unofficial?) Google Weather API: Free but not sure if allowed to use on iOS. XML. Takes city name or ZIP code as input. Therefore requires multiple requests (Reverse Geocoding upfront). Therefore probably slow. (Tutorial) [...]
at 9:01 pm
[...] (unofficial?) Google Weather API: Free but not sure if allowed to use on iOS. XML. Takes city name or ZIP code as input. Therefore requires multiple requests (Reverse Geocoding upfront). Therefore probably slow. (Tutorial) [...]
at 9:30 pm
[...] for the upcoming ‘weather’ feature in the OpenSprinkler software. It makes use of the Google Weather API to obtain current weather data in your local area. The Google Weather API returns data in XML [...]
at 11:45 am
HAMweather just released their own Aeris weather API recently that appears to be considerably better than many of the major ones out there like TWC and Google. It’s not free, but provides more data and is a lot more flexible based on your needs. They also have a series of toolkits to integrate their API with custom applications built for the web or mobile (including iOS).
http://www.hamweather.com/products/aeris-api/
at 12:17 pm
Thank you Sebastian.
at 11:50 am
[...] we list 19 unofficial APIs. And the search giant is no stranger to the idea, since it maintains an unofficial, secret weather API. Related ProgrammableWeb ResourcesLearn more Google Translate API [...]
at 12:52 pm
[...] been about two years since we wrote about Google’s Secret Weather API, when we pegged the number of official weather APIs at just 8. The directory has certainly expanded [...]
at 1:00 pm
[...] Below is the full list of Weather APIs in the ProgrammableWeb directory. Not included? Google’s secret weather API. [...]
at 10:25 am
[...] Google intern Joey Scarr had a busy first month at the search giant’s Sydney office, home of much of the Google Maps API engineering team. Scarr added the weather layer, available on the Google Maps website, as an optional layer in the API. The resulting feature even gets you at some of the data, making it close to an official Google Weather API. [...]
at 12:21 pm
[...] layer in the API. The resulting feature even gets you at some of the data, making it close to an official Google Weather API. Read more: [...]
at 12:32 pm
[...] layer in the API. The resulting feature even gets you at some of the data, making it close to an official Google Weather API. Read more: [...]
at 4:36 pm
[...] layer in the API. The resulting feature even gets you at some of the data, making it close to an official Google Weather API. Read more: [...]
at 5:05 pm
[...] layer in the API. The resulting feature even gets you at some of the data, making it close to an official Google Weather API. Read more: [...]
at 8:56 pm
[...] layer in the API. The resulting feature even gets you at some of the data, making it close to an official Google Weather API. Read more: [...]
at 5:42 pm
[...] 16-04-2012 Google's weather api is an undocumented weather api for all major cities in the world (programmable web google's secret weather api). The api was specifically designed for creating apps (programmable web – google's web api [...]
at 11:47 am
I like this… http://www.weather.unisys.com/forexml.cgi?YOUR_ZIP_HERE
it gives you a lot more info
at 5:54 pm
Hi Adam, and whoever else may read these comments.
I’m currently using the Google Weather API… if you’d like to see my site, it’s at toyweather.herokuapp.com
It’s just a novelty web app that loads images based on the xml data.
Anyway, in order to really customize the site, I’d need to know what the possible values are for the weather conditions…
I know the API is undocumented, but has anyone written down a list of what the “Conditions” can be? I’ve seen the regulars like Overcast, Cloudy, Clear, Light Rain… but am wondering what other possibilities there are.
Thanks!
at 6:30 am
All of Google’s goodness now is available from your nearest Asterisk telephone. http://t.co/9cPYz3Pf
at 3:05 am
[...] of Google’s latest news, weather, and stock feeds. Read all about the Google XML feeds here. As with most of Google’s experimental projects, there’s no guarantee that these feeds [...]
at 2:58 am
This morning it looks like this feed is blocking requests from some browsers (403 forbidden error). For me it works ok in firefox and IE8, but not in IE9 or using whatever user agent string IIS provides when making requests. Anyone else found this problem? Thanks
at 9:16 am
I am also seeing 403 responses since August 7th 2012. See my answer on stackoverflow here http://stackoverflow.com/questions/11878143/google-weather-api-403-error
at 6:02 pm
[...] Now some of you may be new to this app so I’ll tell you what it does. This is a weather app for the DS which displays the current weather conditions; like the current temperatures, humidity, ect. For the most part everything in this app works perfectly, but due to some bugs in the pretty much outdated Wifi libraries you may encounter a few small bugs that may require a restart. All weather comes from Google Weather API, more info can be found here. http://blog.programmableweb.com/2010/02/08/googles-secret-weather-api/ [...]
at 1:44 am
Please note that as of mid-August 2012, this API doesn’t work anymore…
at 11:26 am
[...] curious popularity of the Google Weather API appears to be coming to a close. The search giant never officially supported the feature, but [...]
at 4:35 am
[...] flera år har Google haft ett inofficiellt väder-API. Själva använde de APIet för väderwidgeten i iGoogle, men nästa år ska Google pensionera [...]
at 7:04 am
[...] at least the last four years, Google has maintained a not-so-secret Weather API that let hobbyists and people like us build weather applications for the rest of the world to use. [...]
at 10:51 am
Oh… The infamous Google API that is so secret (NOT)! That offers ease-of-use with flawed data to be exhibited on anyone’s page.
The mysterious API that provides +/- 10 degree variances of temperature. All the sudden, it is 95 degrees when actual temperature outside is 86. When weatherbug, wunderground, weather.com provide temperature for the day to be at 85-87, Google’s weather API is at 94 (!).
What a WASTE – Google weather API… It seems the dumber the world is becoming – Google is at the forefront of such dumb developments…
at 7:21 am
To replace the Google Weather API, Previmeteo has developed the same API with its weather forecast.
You only have to ask for an API key and replace the google.com url with Previmeteo’s one
More info at : http://en.previmeteo.com/professionals/google-weather-api.php
at 6:31 am
http://www.google.com/ig/api?weather=Mountain+View
Not open, error.
at 9:48 pm
Same error
We’re sorry…
… but your computer or network may be sending automated queries. To protect our users, we can’t process your request right now.
at 8:23 pm
Google axed iGoogle and along with it the weather API. I’ve found the published and supported RSS weather feeds at Yahoo provide what I need. You may want to check it out.
at 3:45 am
[...] that may require a restart. All weather comes from Google Weather API, more info can be found here. http://blog.programmableweb.com/2010/02 … ather-api/ Also, you can check out what the raw data looks like here: [...]