Knowledge Base | How to Load Historical Stock Prices from Google Finance to CSV

How to Load Historical Stock Prices from Google Finance to CSV

Updated: August 28, 2019

This article is archived. Google stopped publishing finance data via API in 2018.

You have free alternatives: MSN Money and Yahoo Finance.

If you are looking for historical stock prices in Microsoft Excel, try MARKET.RTD.


You will find workbook samples that show how to load historical and intraday prices, financial data and statistics, US stock options.

If you are looking for CSV data, you can read these articles:

Also, you can try the command-line tool, gsqlcmd.

Download gsqlcmd

Its package also includes a lot of examples to load historical prices, financial data, and options.


Historical Prices at Google Finance

You can open, search a ticker like GOOGL, and click the 'Historical prices' link on the left panel.

You can use URLs like to open pages with historical prices directly.

You can download the historical prices to a CSV file using the 'Download to spreadsheet' link on the right panel.

You can download data for the required selected period.
Unfortunately, Google allows loading historical prices using download utilities for the one last year only.

URLs to Download Historical Prices from Google Finance

You can download historical prices from Google Finance with download utilities using URLs like this:

You can use any free tool like CURL to download data.

We recommend you try gsqlcmd, a specialized download and parser utility.

For example, you can download data using the command like this:

gsqlcmd convert "" googl.csv /add=Symb=GOOGL /quoteChar=

gsqlcmd has special useful options like /add and /quoteChar to convert loaded data.

For example, the source data look like this:


The result of gsqlcmd looks like this:


So, you can get CSV data suitable for further import to a database without additional conversions.

Loading Historical Prices from Google Finance with Batch Files

You can create a simple batch file to load historical prices for a list of tickers with any command line download utility.

Create a text file like 'tickers.txt' and place tickers one by line like:


Create a batch file like 'load.cmd' with the following commands:

@echo off

@for /F %%i in (tickers.txt) do (
    gsqlcmd convert "" %%i.CSV ^
        /add=Symb=%%i /quoteChar= /delay=200 /echoOutputFileName

Run it. You will see the result:

AAPL.CSV - 251 rows
FB.CSV - 251 rows
GOOGL.CSV - 251 rows

Pay attention to the /delay parameter. Use the delay to avoid banning your IP due to frequent multiple automatic requests.

Undocumented URLs to Download Historical Prices from Google Finance

Google has an undocumented web service that returns historical and intraday prices in a specific text format.

You can download data. However, you need a special parser like MARKET.CSV to convert results to CSV.

URLs for daily and weekly historical prices:,c,v,o,h,l,c,v,k,o,h,l

URLs for 1, 5, 15, 30, and 60-minute intraday prices:,c,v,o,h,l,c,v,o,h,l,c,v,o,h,l,c,v,o,h,l,c,v,o,h,l

Downloading Historical Prices from Google Finance using MARKET.CSV

MARKET.CSV is a specialized tool for loading data from Yahoo Finance, Google Finance, and MSN Money.

You place the required tickers to a file like tickers.txt.


Then you execute commands to download data using the required data providers:

market.csv.exe download GoogleHistoricalPricesDaily
market.csv.exe download GoogleHistoricalPricesWeekly
market.csv.exe download GoogleIntradayPrices1m
market.csv.exe download GoogleIntradayPrices5m
market.csv.exe download GoogleIntradayPrices15m
market.csv.exe download GoogleIntradayPrices30m
market.csv.exe download GoogleIntradayPrices60m

The tool downloads data, archives the data to zip files, and converts the data to CSV.

You can get results in the output files like GoogleHistoricalPricesDaily.csv, GoogleHistoricalPricesWeekly.csv, etc.

Moreover, MARKET.CSV includes ready-to-use SQL codes and format files to import CSV data into a Microsoft SQL Server database.


Products for Traders and Investors
The app loads data from Yahoo Finance and MSN Money to CSV and SQL Server
Version: 2.24 | 08/23/2023 | 1.5MB | Getting Started | What's New | Edition Comparison
This tool downloads, converts, and imports data from Yahoo Finance and MSN Money
Version: 6.10 | 10/10/2023 | 14.6MB |


Google Finance is a logo and registered trademark of Google Inc.