Crypto API Tutorials:

How to connect the Messari API to Google Sheets

Messari is an online database for the crypto industry that provides data insights, pricing, and research on crypto-assets through an open-source library of information. We can use the Messari API to import data from Messari into Google Sheets. In this tutorial, we’ll show you how to connect the Messari REST API to Google Sheets in 5 steps:

  1. Install the Apipheny add-on
  2. Obtain an API key
  3. Choose a Messari endpoint
  4. Enter your Messari API request into Apipheny
  5. Run the Messari API request in your Google Sheet

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

Apipheny is an API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to unlimited API data sources, make unlimited API requests, and more. There is a 30 day free trial included.

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

2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.

In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.

open apipheny

Tip: you can open a new Google Sheet by entering this URL in your browser: sheet.new

Step 2.) Obtain an API key

After logging into your Messari account, click the account icon, then click API:

Messari account dashboard
Messari account dashboard

In the API section, click the Create New API Key button:

API section page
API section page

The API key will be displayed on the screen:

API key displayed on the screen
API key displayed on the screen

Copy it to a safe location, because you’ll need it in the next steps.

Step 3.) Choose a Messari endpoint

In this section, we’ll show you how to browse the Messari API documentation to find the endpoint that retrieves the information you need from your 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 Messari API documentation page: https://messari.io/api/docs 

This page contains a list of categorized endpoints:

Messari API documentation page
Messari API documentation page

If we click the Assets category, a drop-down list of its endpoints will be displayed:

Assets category page
Assets category page

An example endpoint is Get all AssetsV2,which gets the paginated list of all assets and their metrics and profiles. The URL for this endpoint is:

https://data.messari.io/api/v2/assets

The endpoint’s documentation contains a short description of the endpoint’s purpose, its HTTP method (GET) and URI, a list of accepted query parameters and example requests and responses:

Get all Assets endpoint documentation
Get all Assets endpoint documentation

All endpoints can be accessed from the following base domain: https://data.messari.io/api/v2

Step 4.) Enter your Messari API request into Apipheny

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) required by your API endpoint. For this example, we are using the GET method.

API URL: In Step 3, we explained how you can find the Messari API endpoint that you need. Now copy and paste your complete Messari API URL into the Apipheny add-on, where it says API URL Path, followed by any parameters required for your query (if applicable).

For this example, we are using the Get all News endpoint, which gets the latest (paginated) news and analysis for all assets. This is what the whole URL looks like:

https://data.messari.io/api/v1/news

Headers: In the Headers section of Apipheny, add one row with the following key and value:

Key:
x-messari-api-key

Value:
your_api_key

Make sure to replace your_api_key with the value you previously obtained in Step 2.

Here’s what our API request looks like in Apipheny:

Messari API request entered into Apipheny
Messari API request entered into Apipheny

Step 5.) Run the Messari API request in your Google Sheet

Finally, the last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the Messari API data to be imported into your Google Sheet. Here’s what our request looked like when completed:

  Messari data imported into Google Sheets
Messari data imported into Google Sheets

That’s it! You’ve successfully connected your Messari account to Google Sheets using the Messari API, Google Sheets API, and the Apipheny add-on.

After making a successful request to the Messari API, try querying a different Messari API endpoint, or try using one of the more advanced features in the Apipheny add-on.


Crypto API Tutorials:


API Tutorials


API Knowledge

What is an API?

What is an API URL?

What are parameters?

What is an endpoint?

What is an API key/token?

What is basic authentication?

What are headers?

What is a GET request?

What is a POST request?


Crypto API Tutorials: