Crypto API tutorials and more:


How to import data from Rarify into Google Sheets

Rarify is a platform to search, retrieve metadata, and get insights for NFTs and collections across multiple blockchains. We can use the Rarify API to import data from Rarify into Google Sheets. In this tutorial, we’ll show you how to connect the Rarify REST API to Google Sheets in 5 steps:

  1. Install the Apipheny add-on
  2. Obtain an API key
  3. Choose a Rarify endpoint
  4. Enter your Rarify API request into Apipheny
  5. Run the Rarify 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 creating your Rarify account and app, go to the Dashboard > My Apps and you’ll find your API key there:

My Apps section
My Apps section

Copy your API key to a safe location, because you’ll need it later.

Step 3.) Choose a Rarify endpoint

In this section, we’ll show you how to browse the Rarify API documentation to find an endpoint that retrieves the data you need from Rarify. 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 Rarify API documentation page: https://docs.rarify.tech/reference/

The menu on the left contains general information about the Rarify API and a list of categorized endpoints:

Rarify API documentation page
Rarify API documentation page

If we click the Tokens category, a list of its endpoints will be displayed:

The Tokens category
The Tokens category

An example endpoint is Get token, which returns information about the specified token, by its ID:

https://api.rarify.tech/data/tokens/id_value

If you use this URL, don’t forget to replace id_value with your own value!

The endpoint’s documentation contains a short description of the endpoint’s purpose, its HTTP method (GET), the URI, the cURL command, the request parameters and example responses:

Get Token endpoint
Get Token endpoint

All API calls to the Rarify should be made to the base URL: https://api.rarify.tech/

Step 4.) Enter your Rarify 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, POST, PUT, etc) 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 Rarify REST API endpoint that you need. Now copy and paste your complete Rarify 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 Search contracts endpoint, which Searches the specified networks for contracts that manage collections of NFTs, including ERC721 and ERC1155 contracts. This is what the whole URL looks like:

https://api.rarify.tech/data/contracts/?filter[name]=CryptoPunks

If you use this URL, don’t forget to replace CryptoPunks with your own value!

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

Header Key:
Authorization

Header Value:
Bearer your_key

Make sure to replace your_key with the value of the API key you obtained previously, in Step 2. There should be a literal space between Bearer and your_token.

Rarify API request entered into Apipheny
Rarify API request entered into Apipheny

Step 5.) Run the Rarify 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 Rarify API data to be imported into your Google Sheet. Here’s what our request looked like when completed:

Rarify data imported into Google Sheets
Rarify data imported into Google Sheets

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

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


Crypto API tutorials and more:



Crypto API tutorials and more:


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?