I had been using the following google weather api in my iPhone apps to get 4 day weather forecast.
NSString *address = @"http://www.google.com/ig/api?weather=Chicago";
NSString *request = [NSString stringWithFormat:@"%@",address];
NSLog(@"request: %@", request);
NSURL *URL = [NSURL URLWithString:request];
NSError *error;
NSString *XML = [NSString stringWithContentsOfURL:URL encoding:NSASCIIStringEncoding error:&error];
NSLog(@"XML: %@", XML);
NSLog(@"XML lenght: %d", [XML length]);
As of yesterday Aug 25th, 2012 I get absolutely nothing back! I don't get any results back. When did this happen? Did Has anyone else experience this same problem?
This is a really critical issue as I have multiple weather / clock apps that look for google weather api and they all are crashing as I expect some results back in my XML string!
The Google Weather API seems to be "officially" dead, which is ironic to say, because it was never officially a supported API to begin with. There has been no official announcement from Google, but it should be noted that iGoogle is now using Wunderground's API for weather data.
http://igoogle.wunderground.com/US/CA/Mountain_View.html
So no, you're not seeing things. The Google Weather API is gone. I experienced the same thing. It's time to move on and find a suitable replacement.
If anyone is interested in getting XML that looked and felt like google weather api then use this MSN weather API list of conditions?
Google stopped their weather API, i found another one from the website yr.no and i use it in my website weathercase.net via PHP which is wonderful
The Google weather API was shut down in 2012.
If you're looking for an alternative to the google weather API, these are the three most popular weather APIs at the moment :
Check their respective documentation pages for more info on how to use them!
来源:https://stackoverflow.com/questions/12145820/google-weather-api-gone