How can I get stock quotes using Google Finance API?

There's a whole API for managing portfolios. *Link removed. Google no longer provides a developer API for this.

Getting stock quotes is a little harder. I found one article where someone got stock quotes using Google Spreadsheets.

You can also use the gadgets but I guess that's not what you're after.

The API you mention is interesting but doesn't seem to be documented (as far as I've been able to find anyway).

Here is some information on historical prices, just for reference sake.


I found this site helpful.

http://benjisimon.blogspot.com/2009/01/truly-simple-stock-api.html

It links to an API yahoo seems to offer that is very simple and useful.

For instance:

http://finance.yahoo.com/d/quotes.csv?s=GOOG+AAPL&f=snl1

Full details here:

http://www.gummy-stuff.org/Yahoo-data.htm


The Google Finance Gadget API has been officially deprecated since October 2012, but as of April 2014, it's still active. It is completely dead as of March 2022.

http://www.google.com/finance/info?q=NASDAQ:GOOG http://www.google.com/finance/info?q=CURRENCY:GBPUSD http://finance.google.com/finance/info?client=ig&q=AAPL,YHOO

You can also get charts: https://www.google.com/finance/getchart?q=YELP

Note that if your application is for public consumption, using the Google Finance API is against Google's terms of service.

Check google-finance-get-stock-quote-realtime for the complete code in python