Import MacroTrends Data To Google Sheets

Reading Time: 4 minutes

MacroTrends is a premier research platform for long-term investors that enables their users to fetch real-time and historical data related to stocks, commodities, exchange rates, inflation rates, and many more. It’s a one-stop solution for fetching all sorts of financial data to make data-driven decisions.

In this article, we will learn how to import MacroTrends data to Google Sheets using Amigo Data Add-on. You will be able to import various kinds of financial statement data like cash statement, balance sheet, and income statement.  Amigo Data gives you the flexibility to update your data automatically, just set it up once and let Amigo Data do the job for you.

To import MacroTrends data to Google Sheets, we will follow the steps below:

MacroTrends data imports to Google Sheets

Here’s the step-by-step guide to import MacroTrends data to Google Sheets.

Install the Amigo Data add-on

Install the Amigo Data Google Sheets add-on from the Google Workspace Marketplace.

Amigo Data in Google Workspace Marketplace

Click here to install.

Alternatively, you can get it from Google Sheets.

  • Open a new sheet
  • Go to Extensions→Add-ons→Get add-ons
  • Search for Amigo Data and install

Generate the API key

Sign up for  RapidAPI

RapidAPI page to sign up

Once you’re logged in, go to the MacroTrends Finance API in RapidAPI

Learn how to import MacroTrends Data to Google Sheets using RapidAPI

Choose a subscription plan from the Pricing menu. In this tutorial, we will choose the Basic option

Click on the endpoints and scroll down a bit. You will find your API key under the Header Parameters.

Choose an endpoint

For this tutorial, we will import from the FinancialBalanceSheet endpoint. This endpoint provides us with 15+ years of balance sheet data cash on hand, inventory, prepaid expenses, and many more. In the required parameters section, you can enter frequency details (A: annual, Q: quarterly) and the ticker symbol.

Click the Test Endpoint option to run the query

The success message indicates that the endpoints are functioning correctly. 

On the right side under Code Snippets, select Shell-> cURL from the dropdown menu

Select the cURL from Shell

Copy the URL excluding the apostrophes and also note the headers. This is the endpoint URL for the data to import to Google Sheets.

Import data to Google Sheets

Go back to Google Sheets and launch the Amigo Data extension.

Launching Amigo Data in Google Sheets

Select Custom API from the list of sources

Selecting the source in Amigo Data

Paste the endpoint in the API URL bar

Pasting the endpoint

Then expand the Details tab and enter the following as headers:

Name: X-RapidAPI-Host, Value: macrotrends-finance.p.rapidapi.com

Name: X-RapidAPI-Key, Value: your_key

Replace your_key with your RapidAPI key.

Then click the PREVIEW button

Flatten the data points and then click IMPORT.

Click to preview, flatten and import data

A snippet of the imported data.

Snippet of imported data

You can likewise import other types of data from MacroTrends Finance API. Following are some other examples.

Financial cash statement data

Using a FinancialCashStatement endpoint, you can import the 15+ years of data of cash statements of an organization. In the required parameters section, you can enter freq (A: annual, Q: quarterly) and the ticker symbol.

Financial Income Statement

Using a FinancialInStatement endpoint, you can import the 15+ years of data of income statements of an organization. In the required parameters section, you can enter freq (A: annual, Q: quarterly) and the ticker symbol.

After importing the data, you can also set a refresh schedule so that the data are updated automatically at regular intervals. By this, you can automate importing financial market data to Google Sheets. To learn how to set a refresh schedule, follow this link.

There are several other types of data that you can import into Google Sheets using Amigo Data such as CNBC data, Trading View data, Coinranking data, and many more. Visit our blog to find out the kinds of data you can import to Google Sheets.

Some related articles you may be interested in:

Import CNBC Data To Google Sheets

Automate Trading View Data Imports To Google Sheets

Automate Coinranking Data Imports To Google Sheets