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:
- /v2/interestrate - Get a specific interest rate by name
- /v2/interestratehistorical - Get historical interest rate data
From 3,856 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 328ms | 370ms | 381ms | 718ms | 999ms |
Didn't find what you were looking for? Suggest an improvement
https://api.api-ninjas.com/v2/interestrate
Get a specific interest rate by name. Returns the rate value, name, and last updated timestamp.
Parameters
raterequiredName of the interest rate to retrieve. The following rates are supported:
Central bank rates
Rate Name 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
Rate Name 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-KeyrequiredAPI 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_nameThe name of the interest rate.
rate_pctThe interest rate value as a percentage.
last_updatedDate when the rate was last updated (MM-DD-YYYY format).
Live Demo
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
raterequiredThe specific interest rate identifier. Supports both central bank rates and benchmark rates.
Central bank rates
Rate Name 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
Rate Name 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_aLivret 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_dateoptionalStart date for the data range (inclusive) in
YYYY-MM-DDformat, e.g.2024-01-01. Dates are in UTC.end_dateoptionalEnd date for the data range (inclusive) in
YYYY-MM-DDformat, e.g.2024-12-31. Dates are in UTC.start_timeoptionalStart time for the data range, specified as a UNIX timestamp in seconds. Alternative to
start_date; do not set both.end_timeoptionalEnd time for the data range, specified as a UNIX timestamp in seconds. Alternative to
end_date; do not set both.pageoptionalPagination cursor. Pass the
nextvalue from a previous response to retrieve the following page of data points.
Headers
X-Api-KeyrequiredAPI 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.
nameThe name of the interest rate.
dataArray 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-DDin UTC) andrate_pct(interest rate as a percentage). All rates are daily or less frequent, sodateis the meaningful value; the time of day intimestampcarries no information.nextCursor for the next page of data points; pass it back as the
pageparameter.nullon the last page.
Live Demo
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
Can I use the Interest Rate API for commercial purposes?
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.How do I get an API key and start using the Interest Rate API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
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.What happens if a request to the Interest Rate API fails?
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.What rates can I retrieve with the Interest Rate API?
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 therateparameter on the/v2/interestrateendpoint. For LIBOR-specific tooling see the LIBOR API, and explore the full API catalog for related finance data.What does the /v2/interestrate response include?
A request to/v2/interestratereturns a JSON object withrate_name(the name of the rate),rate_pct(the rate value as a percentage), andlast_updated(the date the rate was last refreshed in MM-DD-YYYY format). See error codes for the response when a request is unsuccessful.How do I get historical interest rate data?
Use the/v2/interestratehistoricalendpoint with the samerateparameter plus an optional date range, eitherstart_dateandend_dateinYYYY-MM-DDformat orstart_timeandend_timeUNIX timestamps (in seconds); it returns up to 100 data points per call as adataarray of objects withtimestamp,date(YYYY-MM-DD) andrate_pct. Both endpoints are Premium only, so check our pricing page for access details.How fresh is the data and what can I build with it?
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.
Explore API integration use cases for recommended APIs and workflow examples.