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 2010. All rights reserved.
Terms of Service | Privacy Policy
8 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.