Crypto API Tutorials:
Coinranking is a website to check prices of cryptocurrencies like Bitcoin, Ethereum, and more. We can use the Coinranking API to import data from Coinranking into Google Sheets. In this tutorial, we’ll show you how to connect the Coinranking REST API to Google Sheets in 5 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: sheet.new
After logging into your Coinranking developer account, in the Dashboard section you’ll see the API key. Copy your key to a safe location, because you’ll need it in the next steps.
In this section, we’ll show you how to browse the Coinranking API documentation to find an endpoint that retrieves the information you need from Coinranking. 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 Coinranking API documentation page: https://developers.coinranking.com/api/documentation
The menu on the left contains general information about the Coinranking API and a list of endpoint groups:
An example endpoint is GET /stats which gets global statistics about the data available on Coinranking. This is the URL for the endpoint:
https://api.coinranking.com/v2/stats
The endpoint’s documentation contains a short description of the endpoint’s purpose, its HTTP method (GET), the URI, the query parameters, an example cURL request and example parameters and responses:
All API calls for Coinranking should be made to the https://api.coinranking.com/v2 base domain.
Once you’ve chosen an endpoint, go to the next step.
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 Coinranking API endpoint that you need. Now copy and paste your complete Coinranking 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 /coins endpoint, which gets a list of coins. This is what the whole URL looks like:
https://api.coinranking.com/v2/coins
Headers: In the Headers section of Apipheny, add one row with the following key and value:
Key: x-access-token Value: API_key
Replace API_key with the key you previously obtained in Step 2.
Finally, the last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the Coinranking API data to be imported into your Google Sheet. Here’s what our request looked like when completed:
That’s it! You’ve successfully connected your Coinranking account to Google Sheets using the Coinranking API, Google Sheets API, and the Apipheny add-on.
After making a successful request to the Coinranking API, try querying a different Coinranking API endpoint, or try using one of the more advanced features in the Apipheny add-on.
Crypto API Tutorials:
Schedule requests for automatic updates
Reference cell values in requests
Stack multiple URLs in a single request
Crypto API Tutorials: