How to connect the Magic Eden API to Google Sheets

Magic Eden is the leading cross-chain NFT platform. We can use the Magic Eden API to import data from Magic Eden into Google Sheets. In this tutorial, we’ll show you how to connect the Magic Eden REST API to Google Sheets in 4 steps:

  1. Install the Apipheny add-on
  2. Choose a Magic Eden endpoint
  3. Enter your Magic Eden API request into Apipheny
  4. Run the Magic Eden API request in your Google Sheet

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

Apipheny is a free API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to API data sources, easily.

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.) Choose a Magic Eden endpoint

In this section, we’ll show you how to browse the available endpoints to find an API URL that retrieves the specific data you need from Magic Eden. If you already know your API URL, or you want to use the same example URL as us, just skip to Step 3.

First, open the Magic Eden API documentation page: https://api.magiceden.dev/#intro

The menu on the left contains the Magic Eden API’s endpoints organized by categories:

Magic Eden API documentation page
Magic Eden API documentation page

If we click the Wallets category, a list with its endpoints will be displayed:

The Wallets category
The Wallets category

In this case, we will describe the GET /wallets/:wallet_address/tokens endpoint, which returns tokens owned by a wallet:

https://api-devnet.magiceden.dev/v2/wallets/EWmtsfBA8EikR3vvhsXgxn7cBQCUZfXJ7jMwXUpYRzXY/tokens?offset=0&limit=100&listStatus=listed

The documentation for this endpoint contains its HTTP method and URL path, a short description of the endpoint’s purpose, the parameters, the path variables, the cURL command and and example response:

 GET /wallets/:wallet_address/tokens endpoint description
GET /wallets/:wallet_address/tokens endpoint description

All API calls to the Magic Eden API should be made using the https://api-devnet.magiceden.dev/v2/ base domain. All endpoints and parameters would be appended to this base domain.

Step 3.) Enter your Magic Eden 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, POST, PUT, PATCH or DELETE)as required by your Magic Eden API endpoint. For this example, we are using the GET method.

API URL: In Step 2, I explained how you can find the Magic Eden API endpoint that you need. Now copy the complete API URL into the Apipheny add-on, where it says API URL Path, followed by any GET parameters required for your query.

For this example, we are using the GET /wallets/:wallet_address/activities that gets the activities of a wallet. The corresponding URL for this endpoint is:

https://api-devnet.magiceden.dev/v2/wallets/4wejSnr97csngztZ5SU7A6iZRXJD7B3Y1R1koCQ5NjmD/activities?offset=0&limit=100
Magic Eden API request entered in the Apipheny add-on
Magic Eden API request entered in the Apipheny add-on

Some endpoints need authentication with a Bearer token. To obtain a token (or an API key) you need to complete this form: https://airtable.com/shrsYtSEJ8M8ESaNq. The endpoints that need authentication are in the Instructions category.

Once you get an API key, and you want to access one of the Instructions endpoints, you just need to add some values to the Headers section in Apipheny:

Header Key: 
Authorization
Header Value: 
Bearer API_key

Just replace API_key with your real API key.

Step 4.) Run the Magic Eden API Request in your Google Sheet

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

Magic Eden data imported into Google Sheets using the Apipheny add-on
Magic Eden data imported into Google Sheets using the Apipheny add-on


Popular 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?

Import JSON to Google Sheets


SEO by SearchCyrus