Google Finance API: Essential Tips for 2024 | Updated Guide

Meet The Ultimate Excel Solution for Investors
- Live Streaming Prices Prices in your Excel
- All historical (intraday) data in your Excel
- Real time option greeks and analytics in your Excel
- Leading data in Excel service for Investment Managers, RIAs, Asset Managers, Financial Analysts, and Individual Investors.
- Easy to use with formulas and pre-made sheets

Table of Contents
- What is Google Finance API?
- Is Google Finance API Free?
- How Do I Use Google Finance API in Excel?
- Approach 1: Using Excel’s Web Query with Google Finance API
- Approach 2: Using VBA to Pull Data from Google Finance
- Approach 3: Google Sheets Integration with Excel
- Approach 4: Using MarketXLS for Excel
- MarketXLS has a google sheets plugin?

What is Google Finance API?
Google Finance API is a tool that allows users to obtain real-time and historical financial data. It provides information on stocks, market trends, and company specifics. This API helps developers create custom financial solutions and applications. Users can access data for various financial instruments across global markets. However, Google Finance API is no longer officially supported. Consequently, many developers have turned to alternative financial data sources. It remains popular due to its ease of use and comprehensive data coverage.
Is Google Finance API Free?
Yes, the GOOGLEFINANCE API is free to use. It allows users to retrieve stock information within Google Sheets. There are no direct costs associated with using it, making it accessible for personal or educational purposes. However, users should be aware that it may not support all financial instruments or indices. The data provided might also have some limitations in terms of accuracy and real-time updates. Overall, it’s a reliable and cost-effective tool for basic financial data needs.
How Do I Use Google Finance API in Excel?
To use the GOOGLEFINANCE API in Excel, you can follow different methods to integrate the data, as Google Finance functions (like those available in Google Sheets) are not natively supported in Excel. Below are steps to various approaches:
Approach 1: Using Excel’s Web Query with Google Finance API
- Open Excel and go to the Data tab.
- Select Get & Transform Data, then From Web.
- Enter the URL of the Google Finance query, such as:
https://www.google.com/finance/quote/AAPL:NASDAQ
- Follow the prompts to import the data into your Excel sheet.
Approach 2: Using VBA to Pull Data from Google Finance
- Open Excel and press
ALT + F11
to open the VBA editor. - Insert a new module by right-clicking VBAProject (YourWorkbook) then Insert > Module.
-
Use the following sample VBA code: `
“vba - Sub GetGoogleFinanceData() Dim xmlHttp As Object Dim url As String Dim response As String Dim ticker As String ticker = “AAPL” ‘ Replace with your desired ticker
- symbol url = “https://www.google.com/finance/quote/” & ticker & “:NASDAQ” Set xmlHttp = CreateObject(“MSXML2.XMLHTTP”) xmlHttp.Open “GET”, url, False xmlHttp.send response = xmlHttp.responseText ‘ Parse the response (you might need to adjust this depending on the response structure)
ActiveSheet.Cells(1, 1).Value = response
End Sub
“ 4. **Run the VBA macro** by pressing F5 or going back to Excel and running it fromDeveloper > Macros`.
Approach 3: Google Sheets Integration with Excel
If you manage the data in Google Sheets using the GOOGLEFINANCE function and then link that Google Sheet to Excel:
1. Create your Google Sheet and use GOOGLEFINANCE functions to get the desired data.
2. Save the Google Sheet.
3. Share the Google Sheet and get the published URL to CSV.
4. In Excel, go to Data > From Web and enter the CSV URL.
5. Follow the steps to import the CSV data into Excel.
Approach 4: Using MarketXLS for Excel
MarketXLS can be a robust alternative to integrate diverse financial data into Excel. If you prefer a streamlined approach:
1. Install MarketXLS and activate your license.
2. Use available MarketXLS functions to get desired financial data. For example, to get historical prices:
excel =Close_Historical(“AAPL”, “2022-11-19”)
3. MarketXLS provides several functions like:
– Historical data functions
– Real-time data functions
– Financial statement data
For instance, from one of the queries:
– For getting historical data, you may use:
excel =Close_Historical(“MSFT”,”2020-11-19″)
This will fetch the historical closing price of Microsoft on the given date.
MarketXLS has a google sheets plugin?
Yes, MarketXLS does have a Google Sheets plugin. Here is how you can install it:
- Open any Google Sheet using the same Gmail account for which you bought the MarketXLS subscription.
- Click on “Add-ons” in the Google Sheets menu and select “Get add-ons.”
- Search for “MarketXLS” in the Google App Store and install the plugin.
- Once installed, go to “Add-ons” in Google Sheets and click on “MarketXLS.” A sidebar will appear.
- Click on “Create a Demo Sheet” in the sidebar. This will create a new sheet in your Google Workbook, showing all the functions with a demo symbol “MSFT.”
I invite you to book a demo with me or my team to save time, enhance your investment research, and streamline your workflows.