iosxcodeweatherweather-apigoogle-weather-api

Google Weather API gone?


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!


Solution

  • 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.