Connecting the Alpha Vantage API to Google Sheets

Alpha Vantage provides enterprise-grade financial market data through a set of powerful and developer-friendly APIs. We can use the Alpha Vantage API to import data from Alpha Vantage into Google Sheets. In this tutorial, I’ll show you how to connect the  Alpha Vantage REST API to Google Sheets in 5 steps:

  1. Install the Apipheny add-on
  2. Obtain an API key
  3. Choose a Alpha Vantage API Endpoint URL
  4. Enter the Alpha Vantage API Request into the Apipheny add-on
  5. Run the Alpha Vantage API Request in your Google Sheets

Step 1.) Install and open the Apipheny add-on in Google Sheets

To pull data from the Alpha Vantage API to Google Sheets, first install and open the Apipheny Google Sheets add-on.

Apipheny is a no-code API integrator for Google Sheets that you can use to make unlimited API requests, connect to unlimited APIs, save API requests, schedule API requests, and more. 

1. Install Apipheny by opening the following link on desktop and then clicking the Install button on the page: https://apipheny.io/install.

2. After you’ve installed Apipheny, open a Google Sheet and then click on the Add-Ons or Extensions option in the top menu. In the add-ons menu, you should see Apipheny.

Click Apipheny > Import API to open the Apipheny sidebar in your Google Sheets.

Opening the Apipheny add-on in Google Sheets
Opening the Apipheny add-on in Google Sheets

Step 2.) Obtain an API key


Go to https://www.alphavantage.co/ and click the GET YOUR FREE API KEY TODAY button:


In the Claim your Free API Key section, complete all the fields and then click the GET FREE API KEY button:


Your API key will be displayed on the net window:

Copy it to a safe location because you’ll need it later.

Step 3.) Choose a Alpha Vantage API Endpoint URL

In this section, I’ll show you how to browse the Alpha Vantage API documentation to find an API endpoint URL that retrieves the specific information you need from your Alpha Vantage account. If you already know your API URL, or you want to use the same example URL as us, just skip to Step 4.

First, open the Alpha Vantage API documentation page: https://www.alphavantage.co/documentation/

The menu on the left contains general information about the Alpha Vantage API and a list of APIs, each with its endpoints:

Alpha Vantage API documentation page
Alpha Vantage API documentation page

For example, the Fundamental Data API has 8 endpoints: Company Overview, Earnings, Income Statement, Balance Sheet, Cash Flow, Listing & Delisting Status, Earnings Calendar and IPO Calendar.

Fundamental Data API
Fundamental Data API

An example endpoint is Company Overview that returns the company information, financial ratios, and other key metrics for the equity specified:

https://www.alphavantage.co/query?function=OVERVIEW&symbol=IBM&apikey=demo

Don’t forget to replace demo with your API key!

The documentation for this endpoint contains the API parameters, the endpoint URL and the Language-specific guides:

Company Overview endpoint documentation
Company Overview endpoint documentation

Step 4.) Enter the Alpha Vantage API Request into the Apipheny add-on

Okay, we’re in the home stretch. Now go back to your Google Sheet and make sure that the Apipheny add-on is open on the “Import” tab. With the Import Tab open, enter these details into the add-on:

Method: At the top of the Apipheny sidebar, select the HTTP method (GET or POST) as required by your Alpha Vantage API endpoint. For this example, we are using the GET method.

API URL: In Step 3, I explained how you can find the Alpha Vantage API endpoint that you need. Now copy the complete API URL into the Apipheny add-on, where it says API URL Path (JSON / CSV), followed by any GET parameters required for your query.

For this example, we are using the TIME_SERIES_INTRADAY endpoint that returns intraday time series of the equity specified, covering extended trading hours where applicable. The corresponding URL for this endpoint is:

https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=IBM&interval=5min&apikey=api_key

Don’t forget to replace api_key with you previously obtained API key at Step 2.)


Headers aren’t required.

  Alpha Vantage API request entered into Apipheny
Alpha Vantage API request entered into Apipheny

Step 5.) Run the Alpha Vantage API Request in your Google Sheets

The last step is to click the Run button at the bottom of the Apipheny add-on and then your Alpha Vantage data will be imported into your Google Sheet.

  Alpha Vantage data imported into Google Sheets
Alpha Vantage data imported into Google Sheets

After making a successful request to the Alpha Vantage API, try querying a different Alpha Vantage API endpoint, or try using one of the more advanced features in the Apipheny add-on, such as:

  • Save and schedule your Alpha Vantage API request
  • Make a POST request to the Alpha Vantage API (if available)
  • Use the custom =APIPHENY() function to call the Alpha Vantage API request inside your spreadsheet
  • Create an API request by referencing the value of a cell in the API URL with three curly braces eg. {{{Sheet1!A1}}}

Related Posts