Interest Rate API

The Interest Rate API provides current central bank interest rates for over 2 dozen countries, all major benchmark interest rates (such as LIBOR, EURIBOR, and SOFR), and prime rates.

Looking for historical interest rate data? Go to the Historical Interest Rate endpoint.

/v1/interestrate GET

https://api.api-ninjas.com/v1/interestrate

Get current interest rates from given parameters. Returns a list of interest rates that satisfy the parameters.


Parameters

  • name  optional

    Name of central bank or interest rate. The following rates are supported:

    premiumprime_us (United States prime rate)
    premiumprime_canada (Canada prime rate)
    premiumprime_japan (Japan prime rate)
    premiumusd_libor_overnight (USD LIBOR Overnight)
    premiumusd_libor_1_month (USD LIBOR - 1 month)
    premiumusd_libor_3_months (USD LIBOR - 3 months)
    premiumusd_libor_6_months (USD LIBOR - 6 months)
    premiumusd_libor_12_months (USD LIBOR - 12 months)
    premiumeuribor_1_week (Euribor - 1 week)
    premiumeuribor_1_month (Euribor - 1 month)
    premiumeuribor_3_months (Euribor - 3 months)
    premiumeuribor_6_months (Euribor - 6 months)
    premiumeuribor_12_months (Euribor - 12 months)
    ester (ESTER)
    sonia (SONIA)
    saron (SARON)
    tonar (TONAR)
    sofr (SOFR - overnight)
    premiumsofr_30d_avg (SOFR 30-day average)
    premiumsofr_90d_avg (SOFR 90-day average)
    premiumsofr_180d_avg (SOFR 180-day average)
    premiumeffr (Effective Federal Funds Rate - EFFR)
  • country  optional

    Name of the country (case-insensitive). The following countries are supported:

    Australia (Reserve Bank of Australia)
    premiumBrazil (Central Bank of Brazil)
    premiumCanada (Bank of Canada)
    China (People's Bank of China)
    Czech Republic (Czech National Bank)
    Denmark (Danmarks Nationalbank)
    premiumEurope (European Central Bank)
    premiumHungary (Hungarian National Bank)
    premiumIndia (Indian Central Bank)
    premiumIsrael (Bank of Israel)
    Mexico (Bank of Mexico)
    New Zealand (Reserve Bank of New Zealand)
    Norway (Norges Bank)
    Poland (Narodowy Bank Polski)
    Russia (Central Bank of Russia)
    premiumSouth Africa (South African Reserve Bank)
    premiumSouth Korea (Bank of Korea)
    Sweden (Sveriges Riksbank)
    Switzerland (Swiss National Bank)
    Türkiye (Central Bank of the Republic of Türkiye)
    United Kingdom (Bank of England)
    premiumUnited States (American Federal Reserve)
  • central_bank_only  optional

    Only show central bank interest rates (filters out non-central bank rates like LIBOR, EURIBOR, etc.). Must be either true or false. If unset, default value of false will be used.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Sample Request Live Demo!

country
https://api.api-ninjas.com/v1/interestrate?country=United Kingdom

Sample Response

JSON
1 2 3 4 5 6 7 8 9 10 { "central_bank_rates": [ { "central_bank": "British Central Bank", "country": "United Kingdom", "rate_pct": 5.25, "last_updated": "08-03-2023" } ] }

Code Examples

1 2 3 4 5 6 7 8 import requests api_url = 'https://api.api-ninjas.com/v1/interestrate?country=United Kingdom' response = requests.get(api_url, headers={'X-Api-Key': 'YOUR_API_KEY'}) if response.status_code == requests.codes.ok: print(response.text) else: print("Error:", response.status_code, response.text)

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.


/v1/interestratehistorical GET

Developer and Business tier only

https://api.api-ninjas.com/v1/interestratehistorical

Returns historical interest rates for specific central banks or benchmark rates. You can specify a time range to retrieve data from. The maximum number of data points returned per API call is 100.

Parameters

  • name  required for non-central bank rates

    Name of the benchmark interest rate. The following rates are supported:

    usd_libor_overnight (USD LIBOR Overnight)
    usd_libor_1_month (USD LIBOR - 1 month)
    usd_libor_3_months (USD LIBOR - 3 months)
    usd_libor_6_months (USD LIBOR - 6 months)
    usd_libor_12_months (USD LIBOR - 12 months)
    euribor_1_week (Euribor - 1 week)
    euribor_1_month (Euribor - 1 month)
    euribor_3_months (Euribor - 3 months)
    euribor_6_months (Euribor - 6 months)
    euribor_12_months (Euribor - 12 months)
    ester (ESTER)
    sonia (SONIA)
    saron (SARON)
    tonar (TONAR)
    sofr (SOFR - overnight)
  • country  required for central bank rates

    Name of the country for which you want the central bank rate.

    Australia (Reserve Bank of Australia)
    Brazil (Central Bank of Brazil)
    Canada (Bank of Canada)
    China (People's Bank of China)
    Czech Republic (Czech National Bank)
    Denmark (Danmarks Nationalbank)
    Europe (European Central Bank)
    Hungary (Hungarian National Bank)
    India (Indian Central Bank)
    Israel (Bank of Israel)
    Mexico (Bank of Mexico)
    New Zealand (Reserve Bank of New Zealand)
    Norway (Norges Bank)
    Poland (Narodowy Bank Polski)
    Russia (Central Bank of Russia)
    South Africa (South African Reserve Bank)
    South Korea (Bank of Korea)
    Sweden (Sveriges Riksbank)
    Switzerland (Swiss National Bank)
    Türkiye (Central Bank of the Republic of Türkiye)
    United Kingdom (Bank of England)
    United States (American Federal Reserve)
  • start_time  optional

    Start time for the data range, specified as a UNIX timestamp in seconds.

  • end_time  optional

    End time for the data range, specified as a UNIX timestamp in seconds.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Sample Request

https://api.api-ninjas.com/v1/interestratehistorical

Sample Response

JSON
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 { "type": "non_central_bank", "name": "USD LIBOR - 3 months", "data": [ { "timestamp": 1701648000, "rate_pct": 5.62458 }, { "timestamp": 1701734400, "rate_pct": 5.63784 }, { "timestamp": 1701820800, "rate_pct": 5.64174 }, { "timestamp": 1701907200, "rate_pct": 5.63344 }, ... ] }