user1186860
user1186860

Reputation:

Google Weather API Request doesn't work.Gives Request Timed out

I have a simple Gadget which shows weather details.

I am using this google api to get weather details of any area through its zipcode

"https://www.google.com/ig/api?weather=ZipCode"

everything was working fine. But now, same code, gives me 'Request Timed Out' error. I repeat, same code gives me 'Request Timed Out' error.

These are the methods I tried to hit the webservice to get weather details:

1. xmlDoc.Load("https://www.google.com/ig/api?weather=" + ZipCode);

2. using (WebClient client = new WebClient())
                {
                    var data = client.DownloadData("https://www.google.com/ig/api?weather=" + zipcode);
                    MemoryStream theMemStream = new MemoryStream();
                    theMemStream.Write(data, 0, data.Length);
                    xmlDoc.Load(theMemStream);
                }

and couple of other (similar) methods to get response of a webservice(content of a url);

but no matter what, it gives me same "Request Timed Out" message.

Can anyone suggest me..what exactly happened? It all happened after I performed a Performance Testing on my App.(not sure whether this info will help or not).

GUESS:(may be, because of generating toooo many requests for a webservice, from a same IP address, google blocked me out. if that is it..what to do now?? :)

NOTE: When I type the url(with zipcode) in browser address..I get beautiful XML containing all those information that I need )

help me please.. (I chose google apis, for their reliability and "Always-up" nature)

Upvotes: 2

Views: 804

Answers (2)

mitchimus
mitchimus

Reputation: 828

Please see the following regarding Google Weather API 403 Error.

Google has pulled the API completely now.

Upvotes: 1

Trent
Trent

Reputation: 1381

I would also be really suspicious that you passed a usage limit and got flagged, but it would be very hard to know since the Google Weather API is undocumented and unofficial. Are you sure you want to use this in your code? You want to consider switching to an official API. Google's weather API could go away at any time.

National Weather Service as a web service you might want to consider. http://graphical.weather.gov/xml/

Upvotes: 0

Related Questions