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

Mortgage Rate API

The Mortgage Rate API provides access to current daily and historical mortgage rate data going back decades.

(4.2)

From 9,633 users

1,800+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
299ms327ms382ms760ms1212ms

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


/v2/mortgagerate GET

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

Returns the daily 30-year and 15-year fixed-rate mortgage (FRM) data. If no parameters are set, the mortgage rate data for the most recent day is returned.

Parameters

  • date  optional premium only

    Individual date to query in YYYY-MM-DD format.

  • min_date  optional premium only

    Minimum date range to query in YYYY-MM-DD format. Must be used with max_date.

  • max_date  optional premium only

    Maximum date range to query in YYYY-MM-DD format. Must be used with min_date.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON array of objects, each containing the following fields, or an error if the request is unsuccessful.

  • date

    Date for the rate data in YYYY-MM-DD format.

  • frm_30

    30-year fixed-rate mortgage (FRM) rate as a percentage.

  • frm_15

    15-year fixed-rate mortgage (FRM) rate as a percentage.

Sample Request Live Demo!

date
min_date
max_date

Try our APIs in the API playground

Sign up for a free API key to get started — no credit card required.

https://api.api-ninjas.com/v2/mortgagerate?date=2026-05-12

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
[
    {
      date:"2026-05-12",
      frm_30:6.395,
      frm_15:5.72
    }
]

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v2/mortgagerate" \ -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.

Frequently Asked Questions

  • Yes, but you must have a premium subscription. Commercial use of the Mortgage 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.
  • Each object in the JSON array includes a date along with frm_30 and frm_15, the 30-year and 15-year fixed-rate mortgage (FRM) rates as percentages. To turn these rates into monthly payment estimates, pair them with the Mortgage Calculator API.
  • Use the min_date and max_date parameters together (both in YYYY-MM-DD format) to retrieve every daily record in that window, or use date for a single day; these date parameters are premium-only, so see pricing for access. Calling the endpoint with no parameters returns the most recent day's rates.
  • The API provides current daily and historical fixed-rate mortgage data going back decades. To compare against other rate benchmarks over time, check the Interest Rate API or the LIBOR API.
  • Mortgage rates are published on business days, so querying a weekend or holiday may return no matching record, and an unsuccessful request returns an error instead of rate fields. See the full list of status codes on the error codes page.