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:

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

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.

  • 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

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.