Today, I’ll teach you how to use the free currencyapi.com API and the Apipheny API integrator to import currency rate data into Google Sheets.
Currencyapi.com is a currency rate JSON API that allows you to retrieve current and historical international exchange rates dating back to 1999. The API supports over 170 currencies and provides 60 seconds update rates.
The API provides many endpoints via which you can obtain everything from the most recent exchange rates to converting a value from one currency to another, retrieving range data, and listing all supported currencies and their data.
To import data from currencyapi.com into Google Sheets, follow these 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:
Every API URL should have an endpoint, which is the component of the URL that tells the API what kind of data you’re looking for. The currencyapi.com API has five different endpoints to choose from.
1. Latest Endpoint: use this endpoint to get the latest currency data. (The
currencies parameters are optional)
2. Convert Endpoint: you can use this endpoint to convert any value from one currency to another.
If you specify a
date parameter, you can also convert with the end-of-day rate of a certain date like below:
3. Historical Endpoint: you can query the historical rates endpoint all the way back to 1999.
4. Range Endpoint: The range endpoint pulls the historical rate between two date time pairs. The maximum timeframes for each accuracy are defined in the documentation
5. Currency List: query this endpoint to get a list of all the available currencies.
You can find more information, parameters, etc., in the API’s documentation.
You only need to input your API URI into Apipheny now that you’ve picked your endpoint to retrieve the exact data you want.
All you have to do is copy and paste your API URL into the API URL Path box, as shown below:
You can choose any of the supported API endpoints.
When you’ve selected your endpoint and inserted your API URL into Apipheny, simply click the “Run” button at the bottom of the Apipheny add-on, and your foreign exchange rate data will be imported into your Google Sheet instantly.
That’s all! To import currency rate data into Google Sheets, just enter your API URL into the Apipheny add-on and click Run.
After successfully executing an API request to the currencyapi.com API, try querying a different endpoint or utilizing other Apipheny add-on capabilities.
Crypto API Tutorials: