Skip to content
mike-henderson edited this page Jul 9, 2012 · 19 revisions

Currently yahoo.finance.quotes.xml gives YQL the ability to get stock price information via Yahoo Finance. I have added a few Open Data Tables to the Yahoo / Finance directory to give YQL access to basic summary information about stocks.

Ironically, while YQL is designed to make it easy to convert Web Service API’s to a SQL-like language, no such API exists per se for Yahoo Finance (for example the quotes data table relies on parsing csv data). Currently there doesn’t seem to be any easy way to:

  • Get a list of industry Sectors
  • Get a list of Industries
  • Get a list of Companies within each Industry
  • Get a stock’s Company Name, Exchange, Sector, Industry, # employees, and Historical Price Start & End dates all in a single HTTP request

Therefore I have written the following Open Data Tables which rely on Javascript (and the YQL ability to process HTML) to extract the necessary information:

Open Data Table Description
yahoo.finance.sectors.xml Scrapes the Yahoo Finance Industry Index to get a list of sectors and industries within those sectors (along with the industry IDs)
yahoo.finance.industry.xml Given an industry ID, scrapes the associated “Public” Industry page of the Yahoo Finance Industry Center to get a list of company names and stock symbols
yahoo.finance.stock.xml Given a stock symbol scrapes the Yahoo Finance Profile, Quote Summary, and Historical Price pages to get summary information for the stock

See the following pages for more details:

Example Queries
Implementation Issues

Clone this wiki locally