How to get foreign exchange rates data into Google Sheets

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:

  1. Install Apipheny
  2. Choose your endpoint
  3. Enter your API request
  4. Run your API request

Step 1.) Install and open the Apipheny add-on for Google Sheets

Apipheny is an API integrator for Google Sheets. You can use Apipheny to connect to unlimited API data sources, make unlimited API requests to any endpoint, and more. Click here to learn more about Apipheny.

1.)  Install Apipheny by opening the following link on desktop and then clicking the Install button on the page: https://gsuite.google.com/marketplace/app/apipheny/966163326746

2.) After you’ve installed Apipheny, open a Google Sheet and then click on Add-Ons in the menu at the top.

When the menu opens, you should see Apipheny.

Click Apipheny > Import API to open the Apipheny sidebar in your Google Sheet.

Step 2.) Choose your endpoint

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.

Step 3.) Enter your API request in Apipheny

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:

Exchangerate.host API URL entered into Apipheny
exchangerate.host API URL entered into Apipheny

Any of the available endpoint URLs I mentioned in the previous step will work.

Step 4.) Run your API request

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.

Foreign exchange rate data in Google Sheets
Foreign exchange rate data in Google Sheets

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.

Related articles:

Related Posts

Leave a Comment