1. Code
  2. APIs

Get Real-Time Exchange Rates With exchangeratesapi

Read Time:5 minsLanguages:
Sponsored Content

This sponsored post features a product relevant to our readers while meeting our editorial guidelines for being objective and educational.

For most people, money is simply that: money. They work, get paid, and exchange their money for goods and services at local shops or online retailers. But average people forget one very important thing: money makes the world go around. Most people don’t have to worry about any other type of currency than what they’re paid with. Businesses, on the other hand (especially online businesses), must handle currency on a global scale.

People say dealing with the concept of time in software development is difficult. I’ll give them that, but working with multiple types of currency is a very close second. At the heart of the global economy is the idea of exchange rates. These are probably the most important prices because they affect the price of every country’s imports and exports.

As you might expect, these rates constantly change. If you need to add currency exchange rate information to your applications, then you need reliable up-to-date data. Here is where exchangeratesapi comes in; it’s a RESTful API that provides access to 170 global currencies, over 14,000 conversion pairs, historical and fluctuation data, and much more. So by using exchangeratesapi, you can incorporate almost any global currency data in your applications with ease, and without the headache of managing all of that information yourself.

What Is

exchangeratesapi is a RESTful API service that allows customers to query current and historical currency data for most countries worldwide. It covers an extensive scope of currency and exchange-rate data for almost the entire planet, and it offers cost-effective plans for companies (both big and small), developers, and individuals.

The service is a product of apilayer, a company that has built a highly scalable cloud infrastructure that also houses many other RESTful API services. It can handle anything from hundreds of requests a month to millions of requests a minute, and while there are many other exchange-rate services, none are as responsive, resilient, and easy to integrate into your applications as exchangeratesapi. 

exchangeratesapi relies upon multiple sources for its data. So, with it, you can:

  • cater to a worldwide customer base with reliable and up-to-date currency data
  • power your financial estimate or planning tools with historical data
  • convert between global currencies and precious metals

Features: Why Use exchangeratesapi?

Companies like Honda, GE, and Elders—as well as over 100,000 developers—rely upon exchangeratesapi to power their applications with up-to-date currency and foreign exchange, or forex, data. Here are a few reasons:

Accurate Forex Data

exchangeratesapi sources its data from a very broad base of commercial and financial institutions, ensuring the data it provides is incredibly accurate.

Up-to-Date Information

Spot forex rate data is collected within the 60-second market window. Your subscription level determines how often that information is refreshed.

Broad Currency Support

exchangeratesapi supports 170 global currencies and precious metals.

Speedy Response

exchangeratesapi is extremely fast and delivers its data in a lightweight JSON format.

Highly Scalable

The API is built upon apilayer’s cloud infrastructure, making it able to meet your smallest and largest demands.

Bank-Level Security

exchangeratesapi supports 256-bit encryption for all paid plans.

Extensive Documentation

Each endpoint is thoroughly documented, including a complete list of query parameters, request and response examples, and code samples to help you get started. 

Near 100% Uptime

Thanks to apilayer’s cloud infrastructure, you can rely on exchangeratesapi to be readily available to power your applications.

How It Works

exchangeratesapi is a RESTful API that returns a well-structured and lightweight JSON structure for every request. It exposes several endpoints that provide various pieces of information, such as supported symbols, latest and historical rates, conversion, and more.

Quick Tutorial

It’s easy to get started with exchangeratesapi. First, you need to register a free account to get an access key. After successfully creating your account, you’ll be taken to the Quickstart Guide. 

Access KeyAccess KeyAccess Key

Here, you’re greeted with your access key, a list of the supported endpoints, and a few request examples to help you get started.

Endpoint ExamplesEndpoint ExamplesEndpoint Examples

The guide provides links that you can simply click, each of which issues a request to exchangeratesapi using your access key. As mentioned earlier, the API always responds with JSON. So, regardless of whether your request resulted in a success or error, you will see a JSON structure. The following is a snippet from an actual response:

Resulting JSONResulting JSONResulting JSON

Naturally, consult the documentation to integrate the API into your applications. You’ll find each endpoint thoroughly documented, with code samples for several popular languages. 

The exchangeratesapi free plan is not encrypted; HTTPS is reserved for paid plans. Therefore, you will receive an error (in JSON format) if you attempt to use HTTPS with the free plan.


There are several subscription plans. The Free plan is great for testing and personal use, and you can make 250 requests per month. Forex data is updated daily for the Free plan.

Subscription PricingSubscription PricingSubscription Pricing

Of course, you can unlock more features by choosing one of the following paid plans:

Basic: This plan includes 10,000 monthly requests and hourly forex updates. You also gain access to the currency conversion endpoint and HTTPS.

Professional: In addition to the features provided by the Basic plan, the Professional plan unlocks premium support and grants access to the time-frame endpoint—allowing you to query historical rates between two dates. You also get 100,000 requests per month.

Business: This plan gives you everything. Not only does it allow 500,000 requests per month, but it also provides 60-second forex updates and access to more endpoints.


Money makes the world go ‘round. It is difficult to keep track of not only the many global currencies, but their constant changes and exchange rates. Thankfully, exchangeratesapi makes it easy to integrate global currency, forex, and even history data into your applications. Thousands of developers already trust exchangeratesapi for its stability and reliability, as well as accurate and up-to-date data for their projects. You should, too!

Register for free and try it today!

Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.