0

Below code was working fine few days back. Suddenly stopped working and throws error.

String endPoint = 'https://query.yahooapis.com/v1/public/yql?q=';
String queryUrl = 'select item.condition from weather.forecast where woeid in (select woeid from geo.places(1) where text=Bangalore) and u=c';
HttpRequest req = new HttpRequest();
Http httpProtocol  = new Http();
req.setMethod('GET');
req.setEndpoint(endPoint + EncodingUtil.urlEncode(queryUrl, 'UTF-8'));
HttpResponse res = httpProtocol.send(req);
System.debug(res);

Getting callout exception:

System.CalloutException: Unable to tunnel through proxy. Proxy returns "HTTP/1.0 404 Not Found"

When I tried this in Chrome REST Client getting different error:

The requested URL can't be reached

The service's server DNS address could not be found.

Search Google for chrome network error 105

net::ERR_NAME_NOT_RESOLVED

3
  • 1
    Hi reshma, I am not able to reach from my browser https://query.yahooapis.com/v1/public/yql?q . Am sure SF wont be able to reach as well Commented Jan 22, 2019 at 11:35
  • Is this issue related to yahoo's api server? It was working few days back.
    – Reshma
    Commented Jan 22, 2019 at 11:37
  • 1
    Yes.. Even this link from their doc is not working. I believe its yahoo's issue. developer.yahoo.com/yql/guide/… Commented Jan 22, 2019 at 11:39

2 Answers 2

5

I have the same issue right now and just found out Yahoo retired the API.

On Jan. 3, 2019, YQL service at http://query.yahooapis.com will be retired. YQL based services that use http://query.yahooapis.com , including users of http://datatables.org , will no longer operate. Yahoo Weather API users see the tweet below for info about continuing your service.

From: https://twitter.com/ydn/status/1079785891558653952

1
  • Thanks Frank for the update. Posted the updated api documentation as answer. Please refer if needed.
    – Reshma
    Commented Jan 24, 2019 at 5:46
0

I have got documentation on updated yahoo api to use instead of the retired one. Official announcement says:

As of Thursday, Jan. 3, 2019, the YQL service at query.yahooapis.com will be retired. This will impact users of datatables.org as well as developers who creates features using this YQL service. To continue using our free Yahoo Weather APIs, use https://weather-ydn-yql.media.yahoo.com/forecastrss. Follow instructions here to get credentials and onboard to this free Yahoo Weather API service

For doing callout to the updated API requires to do oAuth and get API keys. Here is the detailed documentation on Yahoo Weather API for your apps, Yahoo Query Language (YQL) and Yahoo Weather API Documentation

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .