Search code examples
apigoogle-apigoogle-finance

Google API changed for data from google finance


I have a software that extracts intraday data from google finance. However, as API was updated by Google yesterday so the software giving error

Conversion from string HTML HEAD meta http-equiv="con" to type 'Double' is not valid.

I have one ionic.zip.dll file of that software. Can somebody help to update, as to how to resolve the above error


Solution

  • I believe I have found the solution to the problem of Google Finance not downloading intraday prices: the domain name (the part at the beginning of the URL) has changed.

    It seems Google is now serving data from finance.google.com and not www.google.com. If you use the www domain, you are redirected to finance.google.com, BUT in the process they somehow drop the &i query string parameter that determines the time interval. This defaults to 86400, which gets you daily data only.

    So to get 2 days of 1-minute data for Apple, instead of

    https://www.google.com/finance/getprices?p=2d&i=60&f=d,o,h,l,c,v&q=AAPL

    do this instead:

    https://finance.google.com/finance/getprices?p=2d&i=60&f=d,o,h,l,c,v&q=AAPL

    Hope this helps :-)