Alpha Vantage provides enterprise-grade financial market data such as stock data, forex and cryptocurrency data feeds, technical and economic indicators, and also market news and sentiments through its easy-to-use APIs. Using its APIs, we can import real-time as well as historical global market data into Google Sheets.
This tutorial will guide you through how to import data from Alpha Vantage to Google Sheets using a simple and easy-to-use Google Sheets extension–Amigo Data.
Follow these steps on how to import data from Alpha Vantage to Google Sheets using API.
- Install the Amigo Data add-on
- Get your Alpha Vantage API key
- Choose the data endpoint to import
- Import the data to Google Sheets
How to import data from Alpha Vantage to Google Sheets
Let’s see how to get Alpha Vantage data to Google Sheets in four simple steps.
1. Install the Amigo Data extension
Get the Amigo Data add-on from Google Workspace Marketplace.
Click here to install.
2. Get your Alpha Vantage API key
Go to alphavantage.co and click GET YOUR FREE API KEY TODAY.
Fill in the details and click the GET FREE API KEY button.
Upon clicking the button, the API key will be generated and displayed underneath the button.
Note the key. We’ll be using it to make API calls to the Alpha Vantage.
3. Choose the endpoint for the data to import
An API endpoint is a digital location where the API receives requests and sends out responses. Each endpoint is a URL that provides the location of a resource on the API server.
To get an endpoint, go to the API documentation page by clicking Documentation. You can also click the link to go to the page.
On the left of the screen is a list of the available APIs. Click on the one for which you want to import the data into Google Sheets. Eg. Weekly Adjusted to get the weekly adjusted time series data–last trading of each week, weekly open, weekly close, weekly high, weekly low, weekly volume and weekly dividend–for a specified ticker.
Scroll to the part where examples API endpoint URLs are given. We can modify the endpoint using the parameters mentioned immediately above.
For example, to retrieve the weekly adjusted time series data for Tesla, we use the following endpoint URL.
The endpoints by default return only the latest 100 results. To retrieve all the available historical data, specify it by using the outputsize parameter, ie, outputsize=full.
So the modified endpoint URL becomes
Note: Each query parameter must be separated by an ampersand (&).
Do not forget to replace YOUR_API_KEY in the URL with your own key.
4. Import the data to Google Sheets
Open Google Sheets and launch Amigo Data from the Extensions tab.
Select Custom API from the list of sources.
Paste the complete endpoint URL in the API URL field.
Click the PREVIEW button. The preview of the data will appear in a short while depending on the size of the dataset.
Flatten and expand the nested data points. Then click IMPORT.
Upon clicking the import button, the data for the selected endpoint will be imported from Alpha Vantage to Google Sheets.
To import data for a different company, change the ticker symbol to that for the particular company. To import the data for a company listed outside of the US, we need to specify the exchange symbol too.
For example, to retrieve the intraday data with 5 minutes interval for Shell which is listed primarily in the London Stock Exchange, we’d use the formula endpoint URL. (SHEL is the ticker symbol and LON is the exchange symbol)
Check the Alpha Vantage API documentation for all the various data that you can retrieve and other details.
The imported data can be updated automatically, if you set it so, at regular intervals–hourly, daily, weekly, or on certain days of the week. To learn how to set a refresh schedule and receive alerts of the imported data to your email or a Slack channel so that you always have the latest information at your fingertips, click here.
This is how you can integrate Alpha Vantage To Google Sheets. There are several types of data that you can import to Google Sheets from various sources using the Amigo Data add-on. A few examples are Indian government Open Data, Wikipedia data, Reddit Data, AccuWeather, and Binance. Visit our blog for a full list of the articles.
Here are some similar articles that you may be interested in: