RapidAPI is one of the largest platforms for API discovery and integration. It features thousands of APIs that developers can search, test, and connect to.
In this tutorial we will show you how to connect RapidAPI to your Google Sheets without any coding, using 2 different examples.
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.
Tip: you can open a new Google Sheet by entering this URL in your browser: sheet.new
In this first example we are going to get data from the Gas Prices API.
1.) Get a subscription if necessary
After choosing an API in RapidAPI, go to the Pricing tab and choose a plan. We are using this Gas Prices API as the first example.
For this API, we chose the Basic plan:
After choosing a plan, you’ll receive a confirmation message:
2.) Find the cURL command
Next, in the APIs dashboard, go to the Endpoints tab:
In the Code Snippets section, choose Shell > cURL to display the cURL command:
3.) Choose an endpoint
Next, you’ll need to browse the available endpoints to find an endpoint that retrieves the exact data that you want. If you already know the API URL you want to use, or you want to use the same example URL as us, just skip to Step 4.
To browse the available endpoints, click on the Endpoints tab. On the left side, you’ll see a list of endpoints available for the API:
An example endpoint from the Gas API is canada, which will have data on the gas prices in Canada.
Each endpoint’s documentation contains the HTTP method and request URL, a short description of the endpoint’s purpose, the header parameters, the cURL command and example responses:
For this example, as we can see in the cURL command, all endpoints can be accessed from the following base domain: https://gas-price.p.rapidapi.com/
4.) Enter your 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 endpoint that you need. Now copy and paste your complete 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 europeanCountries endpoint, which is the service that brings up the current gasoline prices in European countries. This is what the whole URL looks like:
https://gas-price.p.rapidapi.com/europeanCountries
In the Headers section of Apipheny, add two rows with the following key and value:
Header 1 Key: x-rapidapi-host Value: gas-price.p.rapidapi.com Header 2 Key: x-rapidapi-key Value: api-key
When entering Header 2 Value, replace api-key with your own API key that you’ll find in the Header Parameters section in RapidAPI.
5.) Run the API request
Finally, the last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the API data to be imported into your Google Sheet. Here’s what our request looked like when completed:
In this second example we are going to get data from the Shazam API. The steps are very similar to Example 1.
1.) Get a subscription if necessary
Go to Pricing tab and choose a plan. We chose the Basic plan:
You’ll get a confirmation message:
2.) Find the cURL command:
Go to the Endpoints tab:
In the Code Snippets section choose Shell > cURL to display the cURL command:
3.) Choose an endpoint
Click on the Endpoints tab. On the left side, there will be a list of endpoints available for the API:
An example endpoint is songs/get-details, which gets information for a specific song:
https://shazam.p.rapidapi.com/songs/get-details?key=key_value&locale=en-US
For this endpoint, the key_value is the key field returned by calling the /songs/detect or /search endpoints.
Each endpoint’s documentation contains the HTTP method and URL, a short description of the endpoint’s purpose, the header parameters, its cURL command and example responses:
As you can see in the cURL command, these endpoints can be accessed with this base domain: https://shazam.p.rapidapi.com/
4.) Enter your 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 Shazam API endpoint that you need. Now copy and paste your complete 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 endpoint, which searches for songs and artists that match an input term. This is what the whole URL looks like:
https://shazam.p.rapidapi.com/search?term=kiss%20the%20rain&locale=en-US&offset=0&limit=5
In the Headers section of Apipheny, add two rows with the following keys and values:
Header 1 Key: x-rapidapi-host Value: shazam.p.rapidapi.com Header 2 Key: x-rapidapi-key Value: api-key
Don’t forget to replace api-key with your own API key, which you’ll find in the endpoint’s Header Parameters section in RapidAPI.
5.) Run the API request
Finally, the last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the API data to be imported into your Google Sheet. Here’s what our request looked like when completed:
Crypto API tutorials and more:
Sponsored by Zink Virtual Tip Jar & Rewording.io Paraphrasing Tool
Accept donations on Twitch | Accept donations on Discord | Accept donations on YouTube | Accept donations on Telegram | Accept donations on Twitter | Accept donations on TikTok | Accept donations on Instagram | Accept donations on LinkedIn | Accept donations on Facebook | Accept donations on your Website