Today I’m going to show you how to import foreign exchange rate data into Google Sheets using the free exchangerate.host API and the Apipheny API integrator.
Exchangerate.host is a free foreign exchange rate JSON API that you can use to pull info on current and historical foreign exchange data that’s been published by the European Central Bank. This API has 19 years worth of data available to query and supports 33 different currencies.
The API has different endpoints that you can use to get everything from the latest exchange rates, convert a value from one currency to another, retrieve Time-Series data, and the API can also return data on daily fluctuations.
Here’s the steps to import data from exchangerate.host into Google Sheets:
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
Every API URL should include an endpoint, which is the part of the URL that tells the API what specific data you’re requesting.
The exchangerate.host API has 6 different endpoints to choose from.
Click here to read the API’s documentation.
Here’s a summary of the available endpoints:
1. Latest Rates: use this endpoint to get the latest foreign exchange rates.
https://api.exchangerate.host/latest
2. Convert Currency: you can use this endpoint to convert any value from one currency to a different currency.
https://api.exchangerate.host/convert?from=USD&to=EUR
3. Historial Rates: you can query the historical rates endpoint all the way back to 1999.
https://api.exchangerate.host/[YYYY-MM-DD]
4. Time Series: The time series endpoint is for pulling the daily historical rate between two dates. The maximum timeframe is 365 days.
https://api.exchangerate.host/timeseries?start_date=2020-01-01&end_date=2020-01-04
5. Fluctuation: With the fluctuation endpoint you can pull data on how currencies fluctuate on a daily basis.
https://api.exchangerate.host/fluctuation?start_date=2020-01-01&end_date=2020-01-04
6. Supported Symbols: query this endpoint to get a list of all the available currencies.
https://api.exchangerate.host/symbols
You can find more information, parameters, etc. in the API’s documentation.
Now that you’ve chosen your endpoint, so you can get the exact data you need, all you need to do is enter your API URL into Apipheny.
All you need to do is copy and paste your API URL into the “API URL Path” field in the Apipheny add-on, like so:
Any of the available endpoint URLs I mentioned in the previous step will work.
After you’ve chosen your endpoint and entered your API URL into Apipheny, just click the “Run” button at the bottom of the Apipheny add-on and your foreign exchange rate data will automatically import into your Google Sheet.
That’s it! Importing foreign exchange rate data into Google Sheets is as simple as plugging in your API URL into the Apipheny add-on and clicking Run.
Once you successfully run an API request to the exchangerate.host API, try querying a different endpoint or try using some of the other features in the Apipheny add-on.
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