Search code examples
webfinancegoogle-finance

How to get cid from market and symbol from google finance


I would like to fetch the historical data from google finance.

Url should be like this, this is the link for Apple.

http://www.google.com/finance/historical?cid=22144&startdate=Jan+1%2C+2000&enddate=Jul+30%2C+2017&num=30&ei=bNl9WZC7MNCe0wSR8bw4&output=csv

It requires cid

I have symbol name AAAPL and market name NASDAQ though, I couldn't find how to get the cid 22144 from symbol and market name.

Google finance API is already closed.

How can I get cid number ???


Solution

  • Are you certain you need the cid? I just tried this request to Google Finance:

    https://www.google.co.uk/finance/historical?q=NASDAQ%3AAAPL&ei=k-99WaD9NMSYUsu_moAC&output=csv

    This request returned a csv file.