NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server →

Interest Rate API

The Interest Rate API provides current central bank interest rates for 22 countries (including the US Federal Reserve, ECB, and Bank of England), major benchmark rates such as SOFR, EFFR, and EURIBOR, and bank prime and base lending rates for the US, Canada, Japan, South Africa, China, Malaysia and Brazil.

"Prime" means different instruments in different markets — a surveyed bank prime rate in the US, a quoted Loan Prime Rate in China, an average of published bank base lending rates in Malaysia. Prime and base lending rate responses therefore include a rate_type and a source field describing exactly what the number is and who publishes it.

Interest rates are refreshed hourly, so new prints from each publisher are picked up promptly.

Available endpoints:

Online
(4.4)

From 3,856 users

1,000+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
328ms370ms381ms718ms999ms

Didn't find what you were looking for? Suggest an improvement

2 endpoints

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

Get a specific interest rate by name. Returns the rate value, name, and last updated timestamp.


Parameters

  • rate  required

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

    Central bank rates

    RateName
    central_bank_auReserve Bank of Australia
    central_bank_brCentral Bank of Brazil
    central_bank_caBank of Canada
    central_bank_cnPeople's Bank of China
    central_bank_czCzech National Bank
    central_bank_dkDanmarks Nationalbank
    central_bank_euEuropean Central Bank
    central_bank_huHungarian National Bank
    central_bank_inReserve Bank of India
    central_bank_ilBank of Israel
    central_bank_mxBank of Mexico
    central_bank_nzReserve Bank of New Zealand
    central_bank_noNorges Bank
    central_bank_plNarodowy Bank Polski
    central_bank_ruCentral Bank of Russia
    central_bank_saSouth African Reserve Bank
    central_bank_skBank of Korea
    central_bank_seSveriges Riksbank
    central_bank_chSwiss National Bank
    central_bank_trCentral Bank of the Republic of Türkiye
    central_bank_gbBank of England
    central_bank_usUnited States Federal Reserve

    Benchmark rates

    RateName
    prime_usUnited States Prime Rate
    prime_caCanada Prime Rate
    prime_jpJapan Prime Rate
    prime_zaSouth Africa Prime Lending Rate
    lpr_cn_1yChina Loan Prime Rate - 1 year
    lpr_cn_5yChina Loan Prime Rate - over 5 years
    br_myMalaysia Average Base Rate
    blr_myMalaysia Average Base Lending Rate
    tpb_brBrazil Taxa Preferencial Brasileira
    euribor_1_weekEuribor - 1 week
    euribor_1_monthEuribor - 1 month
    euribor_3_monthsEuribor - 3 months
    euribor_6_monthsEuribor - 6 months
    euribor_12_months (Euribor - 12 months)
    esterESTER
    soniaSONIA
    saronSARON
    tonarTONAR
    sofrSOFR - overnight
    sofr_30d_avgSOFR 30-day average
    sofr_90d_avgSOFR 90-day average
    sofr_180d_avgSOFR 180-day average
    effrEffective Federal Funds Rate - EFFR
    corraCanadian Overnight Repo Rate Average - CORRA
    livret_aLivret A rate - France

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v2/interestrate endpoint returns a JSON object with the following fields, or an error if the request is unsuccessful.

  • rate_name

    The name of the interest rate.

  • rate_pct

    The interest rate value as a percentage.

  • last_updated

    Date when the rate was last updated (MM-DD-YYYY format).

Live Demo

Live demo · no API key required
Query parameters
rate

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v2/interestrate?rate=central_bank_us
Sample response
{
"rate_name": "United States Federal Reserve",
"rate_pct": 4.5,
"last_updated": "12-18-2024"
}

Code Examples

curl -X GET "https://api.api-ninjas.com/v2/interestrate?rate=central_bank_us" \ -H "X-Api-Key: YOUR_API_KEY"

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.

Premium only

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

Returns historical interest rates for specific central banks or benchmark rates using a single rate parameter. You can specify a time range to retrieve data from. Data points are returned oldest first, and the maximum number returned per API call is 100. When more data is available the response includes a next cursor — pass it back as the page parameter to retrieve the following page.

History depth varies by publisher: the US and Canadian prime rates go back to 1990, Japan to 1989 and Brazil to 2011, while South Africa, China and Malaysia start from when we began collecting them, since their publishers only serve current values.

Parameters

  • rate  required

    The specific interest rate identifier. Supports both central bank rates and benchmark rates.

    Central bank rates

    RateName
    central_bank_auAustralia - Reserve Bank of Australia
    central_bank_brBrazil - Central Bank of Brazil
    central_bank_caCanada - Bank of Canada
    central_bank_cnChina - People's Bank of China
    central_bank_czCzech Republic - Czech National Bank
    central_bank_dkDenmark - Danmarks Nationalbank
    central_bank_euEurozone - European Central Bank
    central_bank_huHungary - Hungarian National Bank
    central_bank_inIndia - Reserve Bank of India
    central_bank_ilIsrael - Bank of Israel
    central_bank_mxMexico - Bank of Mexico
    central_bank_nzNew Zealand - Reserve Bank of New Zealand
    central_bank_noNorway - Norges Bank
    central_bank_plPoland - Narodowy Bank Polski
    central_bank_ruRussia - Central Bank of Russia
    central_bank_saSouth Africa - South African Reserve Bank
    central_bank_skSouth Korea - Bank of Korea
    central_bank_seSweden - Sveriges Riksbank
    central_bank_chSwitzerland - Swiss National Bank
    central_bank_trTürkiye - Central Bank of the Republic of Türkiye
    central_bank_gbUnited Kingdom - Bank of England
    central_bank_usUnited States - United States Federal Reserve

    Benchmark rates

    RateName
    prime_usUnited States Prime Rate
    prime_caCanada Prime Rate
    prime_jpJapan Short-Term Prime Rate — one point per rate change
    prime_zaSouth Africa Prime Lending Rate
    lpr_cn_1yChina Loan Prime Rate - 1 year
    lpr_cn_5yChina Loan Prime Rate - over 5 years
    br_myMalaysia Average Base Rate
    blr_myMalaysia Average Base Lending Rate
    tpb_brBrazil Taxa Preferencial Brasileira
    euribor_1_weekEuribor - 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)
    esterESTER
    soniaSONIA
    saronSARON
    tonarTONAR
    sofrSOFR - overnight
    sofr_30d_avgSOFR 30-day average
    sofr_90d_avgSOFR 90-day average
    sofr_180d_avgSOFR 180-day average
    effrEffective Federal Funds Rate - EFFR
    corraCanadian Overnight Repo Rate Average - CORRA
    livret_a Livret A rate (France)
    usd_libor_overnight (USD LIBOR Overnight)
    usd_libor_1_monthUSD LIBOR - 1 month
    usd_libor_3_monthsUSD LIBOR - 3 months
    usd_libor_6_monthsUSD LIBOR - 6 months
    usd_libor_12_months (USD LIBOR - 12 months)
  • start_date  optional

    Start date for the data range (inclusive) in YYYY-MM-DD format, e.g. 2024-01-01. Dates are in UTC.

  • end_date  optional

    End date for the data range (inclusive) in YYYY-MM-DD format, e.g. 2024-12-31. Dates are in UTC.

  • start_time  optional

    Start time for the data range, specified as a UNIX timestamp in seconds. Alternative to start_date; do not set both.

  • end_time  optional

    End time for the data range, specified as a UNIX timestamp in seconds. Alternative to end_date; do not set both.

  • page  optional

    Pagination cursor. Pass the next value from a previous response to retrieve the following page of data points.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v2/interestratehistorical endpoint returns a JSON object with the following fields, or an error if the request is unsuccessful.

  • name

    The name of the interest rate.

  • data

    Array of historical rate data objects, oldest first (up to 100 per call), each containing timestamp (UNIX timestamp in seconds), date (the date the rate applies to, YYYY-MM-DD in UTC) and rate_pct (interest rate as a percentage). All rates are daily or less frequent, so date is the meaningful value; the time of day in timestamp carries no information.

  • next

    Cursor for the next page of data points; pass it back as the page parameter. null on the last page.

Live Demo

Live demo
Query parameters
rate
start_date
end_date

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v2/interestratehistorical?rate=central_bank_us
Sample response
{
"name": "United States Federal Reserve",
"data": [
{
"timestamp": 647827200,
"date": "1990-07-13",
"rate_pct": 8
},
{
"timestamp": 657158400,
"date": "1990-10-29",
"rate_pct": 7.75
},
{
"timestamp": 658454400,
"date": "1990-11-13",
"rate_pct": 7.5
},
{
"timestamp": 660528000,
"date": "1990-12-07",
"rate_pct": 7.25
},
{
"timestamp": 661478400,
"date": "1990-12-18",
"rate_pct": 7
},
{
"timestamp": 663379200,
"date": "1991-01-09",
"rate_pct": 6.75
},
{
"timestamp": 665366400,
"date": "1991-02-01",
"rate_pct": 6.25
},
{
"timestamp": 668390400,
"date": "1991-03-08",
"rate_pct": 6
},
"..."
],
"next": "eyJvIjogMTAwfQ=="
}

Code Examples

curl -X GET "https://api.api-ninjas.com/v2/interestratehistorical?rate=central_bank_us" \ -H "X-Api-Key: YOUR_API_KEY"

Frequently Asked Questions

  • Yes, but you must have a premium subscription. Commercial use of the Interest Rate API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.
  • The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.
  • The API covers current central bank policy rates for 22 countries plus major benchmark and prime rates, including SOFR, EURIBOR, ESTER, SONIA, SARON, TONAR, CORRA, EFFR, and Livret A, all queried via the rate parameter on the /v2/interestrate endpoint. For LIBOR-specific tooling see the LIBOR API, and explore the full API catalog for related finance data.
  • A request to /v2/interestrate returns a JSON object with rate_name (the name of the rate), rate_pct (the rate value as a percentage), and last_updated (the date the rate was last refreshed in MM-DD-YYYY format). See error codes for the response when a request is unsuccessful.
  • Use the /v2/interestratehistorical endpoint with the same rate parameter plus an optional date range, either start_date and end_date in YYYY-MM-DD format or start_time and end_time UNIX timestamps (in seconds); it returns up to 100 data points per call as a data array of objects with timestamp, date (YYYY-MM-DD) and rate_pct. Both endpoints are Premium only, so check our pricing page for access details.
  • Rates are refreshed every 4 hours, making the API suitable for finance dashboards, mortgage and loan calculators, and macroeconomic monitoring tools. Pair it with the Mortgage Rate API, Inflation API, or Exchange Rate API for richer financial applications.