Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting data from Yahoo Finance [closed]

I read about the YQL, but I didn't understand how can I get some simple data (like company ticker, market cap, stock price, etc.), for ALL COMPANIES?

And an additional question, how can I get all Yahoo Finance tables and theirs fields that can be queried by YQL?

like image 741
Ilan Avatar asked Feb 10 '13 07:02

Ilan


People also ask

Can you scrape data from Yahoo Finance?

You can scrape Yahoo Finance web source for currencies; you just have to identify the tags with the needed information. As there are no certain attributes in the HTML code of the Yahoo Finance page, we retrieved the data using a data ID.

Is there an API for Yahoo Finance?

The Yahoo Finance API is a RESTful API that provides access to financial data. This data includes stock quotes, historical prices, and company information. The API is free to use and does not require an API key. The Yahoo Finance API is available in both JSON and XML format.


2 Answers

To your first question, you can't really do any query through YQL to get data for all companies. It's more oriented towards obtaining data for a smaller query. (I.e., it's not going to give you a full data dump of the whole Yahoo! Finance database.)

To your second question, here's how you can get started exploring the Yahoo! Finance tables in YQL:

  1. Start at the YQL Console
  2. In the upper left corner, make sure Show Community Tables is checked
  3. Type finance in the search field
  4. You'll see all the Yahoo Finance tables (about 15)

Then you can try some example queries like the following:

select * from yahoo.finance.quote where symbol in ("YHOO","AAPL","GOOG","MSFT")

Update 2016-04-04: Here's a current screenshot showing the location of the Show Community Tables checkbox which must be clicked to see these finance tables: enter image description here

like image 61
BrianC Avatar answered Oct 04 '22 15:10

BrianC


As from the answer from BrianC use the YQL console. But after selecting the "Show Community Tables" go to the bottom of the tables list and expand yahoo where you find plenty of yahoo.finance tables:

Stock Quotes:

  • yahoo.finance.quotes
  • yahoo.finance.historicaldata

Fundamental analysis:

  • yahoo.finance.keystats
  • yahoo.finance.balancesheet
  • yahoo.finance.incomestatement
  • yahoo.finance.analystestimates
  • yahoo.finance.dividendhistory

Technical analysis:

  • yahoo.finance.historicaldata
  • yahoo.finance.quotes
  • yahoo.finance.quant
  • yahoo.finance.option*

General financial information:

  • yahoo.finance.industry
  • yahoo.finance.sectors
  • yahoo.finance.isin
  • yahoo.finance.quoteslist
  • yahoo.finance.xchange

2/Nov/2017: Yahoo finance has apparently killed this API, for more info and alternative resources see https://news.ycombinator.com/item?id=15616880

like image 42
ronnydw Avatar answered Oct 04 '22 16:10

ronnydw