1

I am using This yql query to get data from yahoo finance but apprently I am getting null value.

The query I am using is

http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22GOOG%22)&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&format=json

The result I was supposing to get data for GOOG company for all available data in json format.

but instead I am getting response as

{
"query": {
    "count": 0,
    "created": "2017-12-11T21:00:10Z",
    "lang": "en-US",
    "results": null
}
}

I checked with https://developer.yahoo.com/yql/guide/usage_info_limits.html

but seems like the website is not working properly. Its currently displaying error for

The requested page was not found.

Is there anything wrong I am doing here?

Ashim Dahal
  • 1,097
  • 13
  • 15

1 Answers1

0

The response:

The requested page was not found

is about the page - not about your YQL results.

In the YQL you supplied in your question, you forgot add the following paramenter:

&diagnostics=true

So, your original YQL with the missing paramenter added is as follows:

http://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.quotes where symbol in ("GOOG")&env=store://datatables.org/alltableswithkeys&format=json&diagnostics=true

Change the YQL Query as follows:

https://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.quotes where symbol in ("GOOGL")&format=json&diagnostics=true&env=store://datatables.org/alltableswithkeys

Here is the results:

Mauricio Arias Olave
  • 2,259
  • 4
  • 25
  • 70
  • I received this message from the download Data. "It has come to our attention that this service is being used in violation of the Yahoo Terms of Service. As such, the service is being discontinued. For all future markets and equities data research, please refer to finance.yahoo.com." I needed finance data for stock. Any way I can get data using yahoo apis? can someone share the query to get data? – Ashim Dahal Dec 16 '17 at 03:19
  • @AshimDahal, my honest opinion is that you have to check other way for get such information. See this [answer](https://stackoverflow.com/a/44092983/4092887) and you'll see why. – Mauricio Arias Olave Dec 16 '17 at 14:38