GET
/
macro
/
interest-rates
curl --request GET \
  --url https://api.financialdatasets.ai/macro/interest-rates \
  --header 'X-API-KEY: <api-key>'
{
  "interest_rates": [
    {
      "bank": "<string>",
      "name": "<string>",
      "rate": 123,
      "date": "<string>"
    }
  ]
}

πŸ‘‹ Overview

The Interest Rates API lets you pull historical published interest rate data for all major central banks in the world.

We source our data directly from global central banks like the Federal Reserve, People’s Bank of China, European Central Bank, Bank of Japan, and other major monetary authorities. The real-time interest rate data comes from official monetary policy announcements.

To get started, please create an account and grab your API key at financialdatasets.ai.

You will use the API key to authenticate your API requests.

πŸ“Š Available Central Banks

You can fetch a list of available central banks with a GET request to: https://api.financialdatasets.ai/macro/interest-rates/banks/

πŸš€ Getting Started

There are only 3 steps for making a successful API call:

  1. Add your API key to the header of the request as X-API-KEY.
  2. Add the bank parameter, which is required
  3. Execute the API request.

πŸ’» Example

Interest Rates
import requests

# add your API key to the headers
headers = {
    "X-API-KEY": "your_api_key_here"
}

# set parameters
bank = 'FED'  # required
start_date = '2000-01-01'  # optional
end_date = '2025-01-01'    # optional

# create the URL with parameters
url = (
    f'https://api.financialdatasets.ai/macro/interest-rates'
    f'?bank={bank}'
    f'&start_date={start_date}'
    f'&end_date={end_date}'
)

# make API request
response = requests.get(url, headers=headers)

# parse snapshot from the response
interest_rates = response.json().get('interest_rates')

Authorizations

X-API-KEY
string
header
required

API key for authentication.

Query Parameters

bank
string
required

The bank whose interest rates to return. Use the /macro/interest-rates/banks endpoint to get a list of available banks.

start_date
string

The start date of the interest rates to return in YYYY-MM-DD format.

end_date
string

The end date of the interest rates to return in YYYY-MM-DD format.

Response

200
application/json

Interest rates response

The response is of type object.