Crypto API Tutorials:
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:
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.
Tip: you can open a new Google Sheet by entering this URL in your browser:
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:
If we click the Wallets category, a list with its endpoints will be displayed:
In this case, we will describe the GET /wallets/:wallet_address/tokens endpoint, which returns tokens owned by a wallet:
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:
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.
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:
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.
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.
Crypto API Tutorials:
Need website help? Hire an SEO Consultant.