1
votes

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?

1

1 Answers

0
votes

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: